Skip to content

schema: add jsonschema definition to cc_locale #3561

@ubuntu-server-builder

Description

@ubuntu-server-builder

This bug was originally filed in Launchpad as LP: #1858901

Launchpad details
affected_projects = []
assignee = chad.smith
assignee_name = Chad Smith
date_closed = 2022-05-18T16:51:11.104927+00:00
date_created = 2020-01-08T21:28:46.727084+00:00
date_fix_committed = 2022-04-08T21:01:35.836212+00:00
date_fix_released = 2022-05-18T16:51:11.104927+00:00
id = 1858901
importance = low
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1858901
milestone = None
owner = chad.smith
owner_name = Chad Smith
private = False
status = fix_released
submitter = chad.smith
submitter_name = Chad Smith
tags = ['bitesize']
duplicates = []

Launchpad user Chad Smith(chad.smith) wrote on 2020-01-08T21:28:46.727084+00:00

Add initial jsonschema definition for validation of cloud-config
user data to cloudinit/config/cc_locale.py.

Add a schema dictionary to the cc_*.py module which describes allowed
cloud-config properties which are honored by the module.

jsonschema support for a cloud-config module should entail:

  • module-level schema dict definition in cc_*py
    • schema should contain the keys:
      id, name, title, description, distros, examples, frequency, type,
      properties
  • handler should call validate_cloudconfig_schema(cfg, schema) if valid
    top-level config module keys are provided

Good examples are:

  • cloudinit/config/cc_runcmd.py
  • cloudinit/config/cc_ubuntu_drivers.py
  • cloudinit/config/cc_zypper_add_repo.py
  • cloudinit/config/cc_ntp.py

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions