summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_snap.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/config/cc_snap.py')
-rw-r--r--cloudinit/config/cc_snap.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/cloudinit/config/cc_snap.py b/cloudinit/config/cc_snap.py
index 3bf2e250..8178562e 100644
--- a/cloudinit/config/cc_snap.py
+++ b/cloudinit/config/cc_snap.py
@@ -93,6 +93,13 @@ schema = {
- ['snap', 'install', 'vlc']
- snap install vlc
- 'snap install vlc'
+ """), dedent("""\
+ # You can use a list of assertions
+ snap:
+ assertions:
+ - signed_assertion_blob_here
+ - |
+ signed_assertion_blob_here
""")],
'frequency': PER_INSTANCE,
'type': 'object',
@@ -106,7 +113,8 @@ schema = {
'additionalItems': False, # Reject items non-string
'minItems': 1,
'minProperties': 1,
- 'uniqueItems': True
+ 'uniqueItems': True,
+ 'additionalProperties': {'type': 'string'},
},
'commands': {
'type': ['object', 'array'], # Array of strings or dict
@@ -136,10 +144,6 @@ schema = {
}
}
-# TODO schema for 'assertions' and 'commands' are too permissive at the moment.
-# Once python-jsonschema supports schema draft 6 add support for arbitrary
-# object keys with 'patternProperties' constraint to validate string values.
-
__doc__ = get_schema_doc(schema) # Supplement python help()
SNAP_CMD = "snap"