From ed83db3c55c10fe6f36fd217a42c2fba595d9140 Mon Sep 17 00:00:00 2001 From: Bartek Grzybowski Date: Tue, 26 Nov 2019 12:32:55 +0100 Subject: Get VfModuleModelInvariantUuid from service csar at runtime VfModuleModelInvariantUuid no longer needs manual assignment, it will be gathered from service csar at runtime. Change-Id: I5d0da822dd4ce7b574dae8ce80db2a2d1e5de297 Signed-off-by: Bartek Grzybowski Issue-ID: INT-1389 --- docs/docs_vCPE.rst | 4 ---- test/vcpe/soutils.py | 10 ++++++---- test/vcpe/vcpecommon.py | 7 ------- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/docs/docs_vCPE.rst b/docs/docs_vCPE.rst index 25ea35e06..39a1837b5 100644 --- a/docs/docs_vCPE.rst +++ b/docs/docs_vCPE.rst @@ -66,10 +66,6 @@ Here are the main steps to run the use case in Integration lab environment, wher 'public_net_id': 'xxxxxxxxxxxxx' } -:: - - # CHANGEME: vgw_VfModuleModelInvariantUuid is in rescust service csar, open service template with filename like service-VcpesvcRescust1118-template.yml and look for vfModuleModelInvariantUUID under groups vgw module metadata. - self.vgw_VfModuleModelInvariantUuid = 'xxxxxxxxxxxxxxx' 5. If running with oom_mode=False initialize SDNC ip pool by running below command from k8s control node. It will be done automatically otherwise. diff --git a/test/vcpe/soutils.py b/test/vcpe/soutils.py index 627d74b6a..8d2e56d12 100755 --- a/test/vcpe/soutils.py +++ b/test/vcpe/soutils.py @@ -183,10 +183,11 @@ class SoUtils: req_details['owningEntity'] = {'owningEntityId': self.vcpecommon.owning_entity_id, 'owningEntityName': self.vcpecommon.owning_entity_name} - def generate_custom_service_request(self, instance_name, model, brg_mac): + def generate_custom_service_request(self, instance_name, svc_model, + vfmodule_models, brg_mac): brg_mac_enc = brg_mac.replace(':', '-') req_details = { - 'modelInfo': model, + 'modelInfo': svc_model, 'subscriberInfo': {'subscriberName': 'Kaneohe', 'globalSubscriberId': self.vcpecommon.global_subscriber_id}, 'cloudConfiguration': {"lcpCloudRegionId": 'RegionOne', #self.vcpecommon.os_region_name, @@ -201,7 +202,7 @@ class SoUtils: 'name': 'VfModuleNames', 'value': [ { - 'VfModuleModelInvariantUuid': self.vcpecommon.vgw_VfModuleModelInvariantUuid, + 'VfModuleModelInvariantUuid': vfmodule_models[0]['modelInvariantId'], 'VfModuleName': 'VGW2BRG-{0}'.format(brg_mac_enc) } ] @@ -237,7 +238,8 @@ class SoUtils: instance_name = '_'.join([self.vcpecommon.instance_name_prefix['service'], parser.svc_model['modelName'][0:10], name_suffix]) instance_name = instance_name.lower() - req = self.generate_custom_service_request(instance_name, parser.svc_model, brg_mac) + req = self.generate_custom_service_request(instance_name, parser.svc_model, + parser.vfmodule_models, brg_mac) self.logger.info(json.dumps(req, indent=2, sort_keys=True)) self.logger.info('Creating custom service {0}.'.format(instance_name)) req_id, svc_instance_id = self.submit_create_req(req, 'service') diff --git a/test/vcpe/vcpecommon.py b/test/vcpe/vcpecommon.py index ffc63347f..0041a567b 100755 --- a/test/vcpe/vcpecommon.py +++ b/test/vcpe/vcpecommon.py @@ -95,13 +95,6 @@ class VcpeCommon: self.logger.setLevel(logging.DEBUG) self.logger.info('Initializing configuration') - ################################################################################################################################## - # following param must be updated e.g. from csar file (grep for VfModuleModelInvariantUuid string) before vcpe.py customer call !! - # vgw_VfModuleModelInvariantUuid is in rescust service csar, - # look in service-VcpesvcRescust1118-template.yml for groups vgw module metadata. TODO: read this value automatically - # CHANGEME part - self.vgw_VfModuleModelInvariantUuid = '26d6a718-17b2-4ba8-8691-c44343b2ecd2' - # OOM: this is the address that the brg and bng will nat for sdnc access - 10.0.0.x address of k8 host for sdnc-0 container self.sdnc_oam_ip = self.get_pod_node_oam_ip(self.sdnc_controller_pod) # OOM: this is a k8s host external IP, e.g. oom-k8s-01 IP -- cgit 1.2.3-korg