Add groups under topology_template in vnf_dict
This patch will include `groups` in `topology_template` of `vnf_dict`. Closes-Bug: #1929811 Change-Id: Ic05b58a2c4a605459822936b21a87a97b1899ce5
This commit is contained in:
parent
67685f06bf
commit
9e9741b132
@ -175,6 +175,8 @@ def _populate_flavour_data(tosca):
|
||||
|
||||
# get from lower-vnfd data
|
||||
tpl_dict['topology_template'] = dict()
|
||||
tpl_dict['topology_template']['groups'] = \
|
||||
tp.tpl.get('groups')
|
||||
tpl_dict['topology_template']['policies'] = \
|
||||
tp.tpl.get('policies')
|
||||
tpl_dict['topology_template']['node_templates'] = \
|
||||
|
@ -1074,7 +1074,7 @@ def vnf_dict():
|
||||
' flavour for Sample VNF\n\nimports:\n' + \
|
||||
' - etsi_nfv_sol001_common_types.yaml\n' + \
|
||||
' - etsi_nfv_sol001_vnfd_types.yaml\n\n' + \
|
||||
'topology_template:\n node_templates:\n' + \
|
||||
'topology_template:\n groups:\n node_templates:\n' + \
|
||||
' VNF:\n type: nec.ossmano.VNF\n' + \
|
||||
' properties:\n' + \
|
||||
' flavour_description: A simple flavour\n' + \
|
||||
@ -1198,6 +1198,7 @@ def vnf_dict():
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return vnf_dict
|
||||
|
||||
|
||||
|
@ -57,3 +57,10 @@ class VnfLcmUtilsTestCase(base.TestCase):
|
||||
expected_flavour_description = 'A simple flavor'
|
||||
self.assertEqual(expected_flavour_description,
|
||||
param_value['flavour_description'])
|
||||
|
||||
def test_topology_template_param_of_vnf_dict(self):
|
||||
vnf_dict = fakes.vnf_dict()
|
||||
vnf_keys = vnf_dict['vnfd']['attributes']['vnfd_simple']
|
||||
self.assertIn('node_templates', vnf_keys)
|
||||
self.assertIn('policies', vnf_keys)
|
||||
self.assertIn('groups', vnf_keys)
|
||||
|
Loading…
Reference in New Issue
Block a user