aboutsummaryrefslogtreecommitdiffstats
path: root/products
diff options
context:
space:
mode:
authorzhaoliping123 <zhaoliping@chinamobile.com>2020-05-11 17:59:23 +0800
committerzhaoliping123 <zhaoliping@chinamobile.com>2020-05-11 17:59:40 +0800
commitadfa39d7f8e3f5daa1d6d05df95b64b31cffa7b9 (patch)
tree63963df8762e820673ffc4fa1cc84d4fb41eda0d /products
parent7f3a150c231da1dcff306ec1e74517416ff3c972 (diff)
update vnf-tosca-lcm.py
Issue-ID: CLI-272 Change-Id: I59a49482b93cb634edb5634a620cd7465cae1f54 Signed-off-by: zhaoliping123 <zhaoliping@chinamobile.com>
Diffstat (limited to 'products')
-rw-r--r--products/onap-dublin/features/integration/src/main/resources/script/vnf-tosca-lcm.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/products/onap-dublin/features/integration/src/main/resources/script/vnf-tosca-lcm.py b/products/onap-dublin/features/integration/src/main/resources/script/vnf-tosca-lcm.py
index af9cb9b2..d670a224 100644
--- a/products/onap-dublin/features/integration/src/main/resources/script/vnf-tosca-lcm.py
+++ b/products/onap-dublin/features/integration/src/main/resources/script/vnf-tosca-lcm.py
@@ -598,6 +598,17 @@ class ONAP:
'resource-version': self.service_type_version})
self.service_type_id = self.service_type_version = None
+ output = self.ocomp.run(command='tenant-list', params={
+ 'cloud': self.cloud_id,
+ 'region': self.conf['cloud']['region']
+ })
+
+ for tenant in output:
+ if tenant['tenant-name'] == self.conf['cloud']['tenant']:
+ self.tenant_id = tenant['tenant-id']
+ self.tenant_version = tenant['resource-version']
+ break
+
if self.tenant_id and self.tenant_version:
self.ocomp.run(command='tenant-delete',
params={'cloud': self.cloud_id,
@@ -625,6 +636,13 @@ class ONAP:
self.cloud_id = self.cloud_version = None
+ output = self.ocomp.run(command='complex-list')
+
+ for location in output:
+ if location['complex-name'] == self.location_id:
+ self.location_version = location['resource-version']
+ break
+
if self.location_id and self.location_version:
self.ocomp.run(command='complex-delete',
params={'complex-name': self.location_id,