Beispiel #1
0
 def test_get_schema_coalesces_known_schema(self):
     """Every cloudconfig module with schema is listed in allOf keyword."""
     schema = get_schema()
     self.assertCountEqual([
         'cc_apk_configure',
         'cc_apt_configure',
         'cc_bootcmd',
         'cc_locale',
         'cc_ntp',
         'cc_resizefs',
         'cc_runcmd',
         'cc_snap',
         'cc_ubuntu_advantage',
         'cc_ubuntu_drivers',
         'cc_write_files',
         'cc_write_files_deferred',
         'cc_zypper_add_repo',
         'cc_chef',
         'cc_install_hotplug',
     ], [subschema['id'] for subschema in schema['allOf']])
     self.assertEqual('cloud-config-schema', schema['id'])
     self.assertEqual('http://json-schema.org/draft-04/schema#',
                      schema['$schema'])
     # FULL_SCHEMA is updated by the get_schema call
     from cloudinit.config.schema import FULL_SCHEMA
     self.assertCountEqual(['id', '$schema', 'allOf'], FULL_SCHEMA.keys())
Beispiel #2
0
 def test_get_schema_coalesces_known_schema(self):
     """Every cloudconfig module with schema is listed in allOf keyword."""
     schema = get_schema()
     self.assertItemsEqual([
         'cc_bootcmd', 'cc_ntp', 'cc_resizefs', 'cc_runcmd',
         'cc_zypper_add_repo'
     ], [subschema['id'] for subschema in schema['allOf']])
     self.assertEqual('cloud-config-schema', schema['id'])
     self.assertEqual('http://json-schema.org/draft-04/schema#',
                      schema['$schema'])
     # FULL_SCHEMA is updated by the get_schema call
     from cloudinit.config.schema import FULL_SCHEMA
     self.assertItemsEqual(['id', '$schema', 'allOf'], FULL_SCHEMA.keys())
Beispiel #3
0
 def test_get_schema_coalesces_known_schema(self):
     """Every cloudconfig module with schema is listed in allOf keyword."""
     schema = get_schema()
     self.assertItemsEqual(
         [
             'cc_bootcmd',
             'cc_ntp',
             'cc_resizefs',
             'cc_runcmd',
             'cc_snap',
             'cc_ubuntu_advantage',
             'cc_ubuntu_drivers',
             'cc_zypper_add_repo'
         ],
         [subschema['id'] for subschema in schema['allOf']])
     self.assertEqual('cloud-config-schema', schema['id'])
     self.assertEqual(
         'http://json-schema.org/draft-04/schema#',
         schema['$schema'])
     # FULL_SCHEMA is updated by the get_schema call
     from cloudinit.config.schema import FULL_SCHEMA
     self.assertItemsEqual(['id', '$schema', 'allOf'], FULL_SCHEMA.keys())