summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2018-09-07 10:24:10 -0400
committerDR695H <dr695h@att.com>2018-09-07 10:24:17 -0400
commit5d5597da33bc4c487c7552fe468ce8184d2a0579 (patch)
treec6056243ecd3823830d3e25f5f02703fc4515286
parent7566254a056d51402ec0033ddf8620efc5ecfdc3 (diff)
add vnfid 2 relationship in vfmoudle in heatbridge
this allows correlation to be done on the more specific vfmodule id not just the vnf id Change-Id: Ied971c3fa017bb3662c66533ba6976ca51e73319 Issue-ID: TEST-116 Signed-off-by: DR695H <dr695h@att.com>
-rw-r--r--heatbridge/heatbridge/.gitignore1
-rw-r--r--heatbridge/heatbridge/AAIManager.py9
2 files changed, 6 insertions, 4 deletions
diff --git a/heatbridge/heatbridge/.gitignore b/heatbridge/heatbridge/.gitignore
new file mode 100644
index 0000000..0d20b64
--- /dev/null
+++ b/heatbridge/heatbridge/.gitignore
@@ -0,0 +1 @@
+*.pyc
diff --git a/heatbridge/heatbridge/AAIManager.py b/heatbridge/heatbridge/AAIManager.py
index 417db7a..ed5626a 100644
--- a/heatbridge/heatbridge/AAIManager.py
+++ b/heatbridge/heatbridge/AAIManager.py
@@ -52,10 +52,11 @@ class AAIManager:
data = self.__create_relationship_data("generic-vnf", "vnf-id", server_info_dict['metadata']['vnf_id']);
list = self.__create_relationship_data_list(data);
relations.append(self.__create_relationship("generic-vnf", list));
- if self.__exists(server_info_dict['metadata'], 'vf_module_id'):
- data = self.__create_relationship_data("vf-module", "vf-module-id", server_info_dict['metadata']['vf_module_id']);
- list = self.__create_relationship_data_list(data);
- relations.append(self.__create_relationship("vf-module", list));
+ if self.__exists(server_info_dict['metadata'], 'vf_module_id'):
+ data = self.__create_relationship_data("vf-module", "vf-module-id", server_info_dict['metadata']['vf_module_id']);
+ data2 = self.__create_relationship_data("generic-vnf", "vnf-id", server_info_dict['metadata']['vnf_id']);
+ list = self.__create_relationship_data_list(data, data2);
+ relations.append(self.__create_relationship("vf-module", list));
if self.__exists(server_info_dict['flavor'], 'id'):
data = self.__create_relationship_data("flavor", "flavor-id", server_info_dict['flavor']['id']);
data2 = self.__create_relationship_data("cloud-region", "cloud-owner", self.openstack_context.owner);