-
Notifications
You must be signed in to change notification settings - Fork 911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
schema: add json for modules K-L #1321
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good. I left some comments inline. Additionally,
For landscape, we might want a way to indicate that the schema params are optional. Doesn't necessarily need to be inline in every parameter, but it's probably worth mentioning in the module description.
General comment: When setting distros
or frequency
in the meta schema, I don't think we need a separate variable definition if that's the only place it's used. E.g., use "distros": ["all"],
and "frequency": PER_INSTANCE,
instead of using new variables that don't get used anywhere else.
Rebase will be needed too.
1c73d5b
to
3033124
Compare
Move definition into cloud-init-schema.json
Turns out we do need them (see CI failures :)) because cloudinit.stages and cloudinit.config.fixup_module looks for module.frequency and module.distros attributes directly, which I think we need to fix to instead look for module.meta[]. I've added a separate jira card #888 for this. We can drop the module.frequency attribute from our schema definitions if the frequency is PER_INSTANCE as fixup_module will properly set the default when "absent" to PER_INSTANCE anyway. |
Definition cc_keys_to_console schema in into cloud-init-schema.json
Move definition into cloud-init-schema.json Add test that get_schema parses packaged cloud-init-schema.json.
Definition cc_lxd schema in into cloud-init-schema.json
Definition cc_landscape schema in into cloud-init-schema.json Supplement schema defs with known typical landscape config options.
Ooph, that's bad. We should add a test (not part of this PR) that we're not getting that warning anywhere. I may have changed that in previous modules such that modules are now running per-instance rather than what they're being declared to run as. |
Proposed Commit Message
Additional Context
Test Steps
PYTHONPATH=. python3 -m cloudinit.cmd.main devel schema --docs cc_landscape
Checklist: