aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorYang Xu <yang.xu3@huawei.com>2018-11-22 10:56:52 -0500
committerYang Xu <yang.xu3@huawei.com>2018-11-22 16:04:42 +0000
commit9f935b29ee41f455922efcd7467a02ca0384a9e7 (patch)
treedba99dc65f6a5b4ec348d2a925003d362ee02f6a /test
parent5f85af35b6435da9f28ca6097a6ff152ef87ed0c (diff)
Change vgw module name for vCPE test script
Change-Id: I17308f23812cc1a335155fd4e9e789bed04dec00 Issue-ID: INT-717 Signed-off-by: Yang Xu <yang.xu3@huawei.com>
Diffstat (limited to 'test')
-rwxr-xr-x[-rw-r--r--]test/vcpe/cleanvGMUX.py1
-rwxr-xr-x[-rw-r--r--]test/vcpe/healthcheck-k8s.py0
-rwxr-xr-xtest/vcpe/loop.py2
-rw-r--r--test/vcpe/preload_templates/template.vcpe_gwgra_vfmodule.json2
-rw-r--r--test/vcpe/preload_templates/template.vcpe_vgw_vfmodule.json8
-rwxr-xr-xtest/vcpe/soutils.py5
-rwxr-xr-xtest/vcpe/vcpe.py2
-rwxr-xr-xtest/vcpe/vcpe_custom_service.py3
-rwxr-xr-xtest/vcpe/vcpecommon.py2
9 files changed, 14 insertions, 11 deletions
diff --git a/test/vcpe/cleanvGMUX.py b/test/vcpe/cleanvGMUX.py
index fe586fe53..29f35ae52 100644..100755
--- a/test/vcpe/cleanvGMUX.py
+++ b/test/vcpe/cleanvGMUX.py
@@ -61,4 +61,3 @@ if __name__ == '__main__':
logger.debug('---------------------------------------------------------------')
logger.debug('list interfaces after cleaning gmux')
list_interface()
-
diff --git a/test/vcpe/healthcheck-k8s.py b/test/vcpe/healthcheck-k8s.py
index 0aea3fb9e..0aea3fb9e 100644..100755
--- a/test/vcpe/healthcheck-k8s.py
+++ b/test/vcpe/healthcheck-k8s.py
diff --git a/test/vcpe/loop.py b/test/vcpe/loop.py
index ad5879715..d0243960e 100755
--- a/test/vcpe/loop.py
+++ b/test/vcpe/loop.py
@@ -25,7 +25,7 @@ hosts = cpecommon.get_vm_ip(nodes)
custom.del_vgmux_ves_mode(hosts['mux'])
time.sleep(2)
custom.del_vgmux_ves_collector(hosts['mux'])
-exit()
+#exit()
time.sleep(2)
logging.info('Setting vGMUX DCAE collector IP address')
diff --git a/test/vcpe/preload_templates/template.vcpe_gwgra_vfmodule.json b/test/vcpe/preload_templates/template.vcpe_gwgra_vfmodule.json
index ced57ca6a..b9e7c3dc6 100644
--- a/test/vcpe/preload_templates/template.vcpe_gwgra_vfmodule.json
+++ b/test/vcpe/preload_templates/template.vcpe_gwgra_vfmodule.json
@@ -112,7 +112,7 @@
] },
"vf-module-assignments": {},
"vf-module-topology-identifier": {
- "vf-module-name": "zRegionOne${vgw_vfmod_name_index}_base_vcpe_vgw_0"
+ "vf-module-name": "VGW2BRG-${brg_mac}"
}
},
"vnf-resource-assignments": {},
diff --git a/test/vcpe/preload_templates/template.vcpe_vgw_vfmodule.json b/test/vcpe/preload_templates/template.vcpe_vgw_vfmodule.json
index fef5cbb96..f56e8f431 100644
--- a/test/vcpe/preload_templates/template.vcpe_vgw_vfmodule.json
+++ b/test/vcpe/preload_templates/template.vcpe_vgw_vfmodule.json
@@ -47,15 +47,15 @@
},
{
"vnf-parameter-name": "vgw_private_ip_0",
- "vnf-parameter-value": "10.5.0.111"
+ "vnf-parameter-value": "10.5.0.116"
},
{
"vnf-parameter-name": "vgw_private_ip_1",
- "vnf-parameter-value": "10.0.101.111"
+ "vnf-parameter-value": "10.0.101.116"
},
{
"vnf-parameter-name": "vgw_private_ip_2",
- "vnf-parameter-value": "10.2.0.26"
+ "vnf-parameter-value": "10.2.0.31"
},
{
"vnf-parameter-name": "vgw_name_0",
@@ -67,7 +67,7 @@
},
{
"vnf-parameter-name": "vg_vgmux_tunnel_vni",
- "vnf-parameter-value": "111"
+ "vnf-parameter-value": "116"
},
{
"vnf-parameter-name": "onap_private_net_id",
diff --git a/test/vcpe/soutils.py b/test/vcpe/soutils.py
index 76031276e..6d6a27ef0 100755
--- a/test/vcpe/soutils.py
+++ b/test/vcpe/soutils.py
@@ -166,6 +166,7 @@ class SoUtils:
'owningEntityName': self.vcpecommon.owning_entity_name}
def generate_custom_service_request(self, instance_name, model, brg_mac):
+ brg_mac_enc = brg_mac.replace(':', '-')
req_details = {
'modelInfo': model,
'subscriberInfo': {'subscriberName': 'Kaneohe',
@@ -182,8 +183,8 @@ class SoUtils:
'name': 'VfModuleNames',
'value': [
{
- 'VfModuleModelInvariantUuid': 'c16ad38c-2c2c-49ae-bbe8-66c7ffbcc30a',
- 'VfModuleName': 'VGW2BRG-fa:16:3e:5c:27:8b'
+ 'VfModuleModelInvariantUuid': self.vcpecommon.vgw_VfModuleModelInvariantUuid,
+ 'VfModuleName': 'VGW2BRG-{0}'.format(brg_mac_enc)
}
]
},
diff --git a/test/vcpe/vcpe.py b/test/vcpe/vcpe.py
index 925f11df4..3fb96c55e 100755
--- a/test/vcpe/vcpe.py
+++ b/test/vcpe/vcpe.py
@@ -159,7 +159,7 @@ def closed_loop(lossrate=0):
time.sleep(2)
vcpecommon.del_vgmux_ves_collector()
- logger.info('Staring vGMUX data reporting to DCAE')
+ logger.info('Starting vGMUX data reporting to DCAE')
time.sleep(2)
vcpecommon.set_vgmux_ves_collector()
diff --git a/test/vcpe/vcpe_custom_service.py b/test/vcpe/vcpe_custom_service.py
index 408f8a8c4..36012f7b0 100755
--- a/test/vcpe/vcpe_custom_service.py
+++ b/test/vcpe/vcpe_custom_service.py
@@ -72,6 +72,7 @@ class CustomService:
brg_mac = str(raw_input("Enter the BRG MAC address: "))
else:
brg_mac = self.vcpecommon.get_brg_mac_from_sdnc()
+ brg_mac_enc = brg_mac.replace(':', '-')
# get name index
self.vgw_vfmod_name_index= self.vcpecommon.load_object(self.vcpecommon.vgw_vfmod_name_index_file)
self.vgw_vfmod_name_index=self.vgw_vfmod_name_index + 1
@@ -83,7 +84,7 @@ class CustomService:
self.vcpecommon.increase_ip_address_or_vni_in_template(vgw_template_file, parameters_to_change)
preloader.preload_vgw(vgw_template_file, brg_mac, preload_dict, name_suffix)
# preload vGW-GRA
- preloader.preload_vgw_gra(vgw_gra_template_file, brg_mac, preload_dict, name_suffix, str(self.vgw_vfmod_name_index))
+ preloader.preload_vgw_gra(vgw_gra_template_file, brg_mac_enc, preload_dict, name_suffix, str(self.vgw_vfmod_name_index))
# create service
so = soutils.SoUtils(self.vcpecommon, 'v5')
diff --git a/test/vcpe/vcpecommon.py b/test/vcpe/vcpecommon.py
index 29aad1960..18390f7fa 100755
--- a/test/vcpe/vcpecommon.py
+++ b/test/vcpe/vcpecommon.py
@@ -67,6 +67,8 @@ class VcpeCommon:
self.logger = logging.getLogger(__name__)
self.logger.info('Initializing configuration')
+ # vgw_VfModuleModelInvariantUuid is in rescust service csar, look in service-VcpesvcRescust1118-template.yml for groups vgw module metadata. TODO: read this value automcatically
+ self.vgw_VfModuleModelInvariantUuid = 'c16ad38c-2c2c-49ae-bbe8-66c7ffbcc30a'
# OOM: this is the address that the brg and bng will nat for config of brg - 10.0.0.x address of k8 host for sdnc
self.sdnc_oam_ip = '10.0.0.20'
# OOM: this is a k8 host external IP