From d9b07ee6de209f55f151b6857d4f5c4909f36e95 Mon Sep 17 00:00:00 2001 From: Anurag Dwivedi Date: Mon, 10 Apr 2017 08:56:51 -0400 Subject: [PATCH] RIFT-16103 : Adding VDU Name field in YAML File. YAML File generated has vdu name information for manually triggered eventsi Signed-off-by: Anurag Dwivedi --- .../rwconman/rift/tasklets/rwconmantasklet/RiftCA.py | 6 +++--- .../rwconman/rift/tasklets/rwconmantasklet/RiftCM_rpc.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/RiftCA.py b/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/RiftCA.py index 0400a54a..267d6df4 100644 --- a/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/RiftCA.py +++ b/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/RiftCA.py @@ -197,11 +197,11 @@ class RiftCAConfigPlugin(riftcm_config_plugin.RiftCMConfigPluginBase): vnfr_data_dict['connection_point'].append(cp_dict) vnfr_data_dict['vdur'] = [] - vdu_data = [(vdu['name'], vdu['management_ip'], vdu['vm_management_ip'], vdu['id']) + vdu_data = [(vdu['name'], vdu['management_ip'], vdu['vm_management_ip'], vdu['id'], vdu['vdu_id_ref']) for vdu in vnfr.vnfr['vdur']] for data in vdu_data: - data = dict(zip(['name', 'management_ip', 'vm_management_ip', 'id'] , data)) + data = dict(zip(['name', 'management_ip', 'vm_management_ip', 'id', 'vdu_id_ref'] , data)) vnfr_data_dict['vdur'].append(data) vnfr_data_map[vnfr.member_vnf_index] = vnfr_data_dict @@ -235,7 +235,7 @@ class RiftCAConfigPlugin(riftcm_config_plugin.RiftCMConfigPluginBase): data["init_config"] = init_data data["vnfr_index_map"] = vnfr_index_map data["vnfr_data_map"] = vnfr_data_map - + tmp_file = None with tempfile.NamedTemporaryFile(delete=False) as tmp_file: tmp_file.write(yaml.dump(data, default_flow_style=True) diff --git a/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/RiftCM_rpc.py b/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/RiftCM_rpc.py index 5f330249..4a8dab8d 100644 --- a/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/RiftCM_rpc.py +++ b/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/RiftCM_rpc.py @@ -164,11 +164,11 @@ class RiftCMRPCHandler(object): try: vnfr_data_dict['vdur'] = [] - vdu_data = [(vdu['name'], vdu['management_ip'], vdu['vm_management_ip'], vdu['id']) + vdu_data = [(vdu['name'], vdu['management_ip'], vdu['vm_management_ip'], vdu['id'], vdu['vdu_id_ref']) for vdu in vnfr.vnfr['vdur']] for data in vdu_data: - data = dict(zip(['name', 'management_ip', 'vm_management_ip', 'id'] , data)) + data = dict(zip(['name', 'management_ip', 'vm_management_ip', 'id', 'vdu_id_ref'] , data)) vnfr_data_dict['vdur'].append(data) vnfr_data_map[vnfr.member_vnf_index] = vnfr_data_dict -- 2.25.1