Restore 'deployments' key to cfn Metadata
In recent changes support was added to explode the deployment key into multiple json files for merging by os-apply-config. But this breaks other users who want direct access to the full deployments structure. There seems to be no real reason to delete the key other than tidiness, so we will stop deleting it from the main cfn structure. Change-Id: Icf9479376e32c3ad8f9be29359e6100c1aeda2a5 Closes-Bug: #1299110
This commit is contained in:
parent
f164c5e86d
commit
8cfe571c70
|
@ -151,6 +151,5 @@ class Collector(object):
|
|||
continue
|
||||
final_list.append((deployment['name'],
|
||||
deployment['config']))
|
||||
del final_content[depkey]
|
||||
final_list.insert(0, ('cfn', final_content))
|
||||
return final_list
|
||||
|
|
|
@ -235,7 +235,16 @@ class TestCfnSoftwareConfig(TestCfnBase):
|
|||
self.assertThat(cfn_md, matchers.IsInstance(list))
|
||||
self.assertEqual('cfn', cfn_md[0][0])
|
||||
cfn_config = cfn_md[0][1]
|
||||
self.assertEqual({'old-style': 'value'}, cfn_config)
|
||||
self.assertThat(cfn_config, matchers.IsInstance(dict))
|
||||
self.assertEqual(set(['old-style', 'deployments']),
|
||||
set(cfn_config.keys()))
|
||||
self.assertIn('deployments', cfn_config)
|
||||
self.assertThat(cfn_config['deployments'], matchers.IsInstance(list))
|
||||
self.assertEqual(1, len(cfn_config['deployments']))
|
||||
deployment = cfn_config['deployments'][0]
|
||||
self.assertIn('inputs', deployment)
|
||||
self.assertThat(deployment['inputs'], matchers.IsInstance(list))
|
||||
self.assertEqual(1, len(deployment['inputs']))
|
||||
self.assertEqual('dep-name1', cfn_md[1][0])
|
||||
config = cfn_md[1][1]
|
||||
self.assertEqual('value1', config['config1'])
|
||||
|
|
Loading…
Reference in New Issue