aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-11-13 21:26:32 +0000
committerGerrit Code Review <gerrit@onap.org>2018-11-13 21:26:32 +0000
commitb804a0524a40391584e88cf702a20b590530f343 (patch)
treee9fb0cb679b6c20d26851b362d90f0052595a32e
parentb10132e33370aabef8cb4d95d37f1dfc8e15fcee (diff)
parent8076a87e542a67f321f84311350d20946bee14a2 (diff)
Merge "fixes from vCPE testing"
-rwxr-xr-xtest/vcpe/cleanvGMUX.sh62
-rw-r--r--test/vcpe/preload_templates/template.vcpe_bng_vfmodule.json4
-rw-r--r--test/vcpe/preload_templates/template.vcpe_brgemu_vfmodule.json2
-rw-r--r--test/vcpe/preload_templates/template.vcpe_gwgra_vfmodule.json2
-rw-r--r--test/vcpe/preload_templates/template.vcpe_infra_vfmodule.json8
-rw-r--r--test/vcpe/preload_templates/template_sniro_request.json2
-rwxr-xr-xtest/vcpe/soutils.py2
-rwxr-xr-xtest/vcpe/vcpe.py4
-rwxr-xr-xtest/vcpe/vcpe_custom_service.py7
-rwxr-xr-xtest/vcpe/vcpecommon.py7
10 files changed, 86 insertions, 14 deletions
diff --git a/test/vcpe/cleanvGMUX.sh b/test/vcpe/cleanvGMUX.sh
new file mode 100755
index 000000000..3b8dabc8d
--- /dev/null
+++ b/test/vcpe/cleanvGMUX.sh
@@ -0,0 +1,62 @@
+#! /usr/bin/env bash
+#########################################################################################
+# Script to cleanpu vGMUX and other parts of the vCPE Use Case
+#
+# Edit the IP addresses and portas as appropriate
+#
+#######################################################################################
+
+
+VGMUX_IP=10.12.6.242
+#VBRG_IP=10.12.5.142
+#SDNC_IP=10.12.5.180
+
+#curl -X DELETE -u admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U http://$SDNC_IP:8282/restconf/config/GENERIC-RESOURCE-API:tunnelxconn-allotted-resources
+#curl -X DELETE -u admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U http://$SDNC_IP:8282/restconf/config/GENERIC-RESOURCE-API:brg-allotted-resources
+
+###################################
+# vGMUX
+curl -H 'Content-Type: application/json' -H 'Accept: application/json' -u admin:admin -X DELETE http://$VGMUX_IP:8183/restconf/config/ietf-interfaces:interfaces/interface/vxlanTun10.3.0.2/v3po:l2
+echo
+
+curl -H 'Content-Type: application/json' -H 'Accept: application/json' -u admin:admin -X DELETE http://$VGMUX_IP:8183/restconf/config/ietf-interfaces:interfaces/interface/vxlanTun10.5.0.22/v3po:l2
+echo
+
+curl -H 'Content-Type: application/json' -H 'Accept: application/json' -u admin:admin -X DELETE http://$VGMUX_IP:8183/restconf/config/ietf-interfaces:interfaces/interface/vxlanTun10.5.0.22
+echo
+
+curl -H 'Content-Type: application/json' -H 'Accept: application/json' -u admin:admin -X DELETE http://$VGMUX_IP:8183/restconf/config/ietf-interfaces:interfaces/interface/vxlanTun10.3.0.2
+echo
+
+
+curl -H 'Content-Type: application/json' -H 'Accept: application/json' -u admin:admin -X DELETE http://$VGMUX_IP:8183/restconf/config/ietf-interfaces:interfaces/interface/vxlanTun10.5.0.106
+echo
+curl -H 'Content-Type: application/json' -H 'Accept: application/json' -u admin:admin -X DELETE http://$VGMUX_IP:8183/restconf/config/ietf-interfaces:interfaces/interface/vxlanTun10.5.0.107
+
+curl -H 'Content-Type: application/json' -H 'Accept: application/json' -u admin:admin -X DELETE http://$VGMUX_IP:8183/restconf/config/ietf-interfaces:interfaces/interface/vxlanTun10.5.0.111
+
+curl -H 'Content-Type: application/json' -H 'Accept: application/json' -u admin:admin -X DELETE http://$VGMUX_IP:8183/restconf/config/ietf-interfaces:interfaces/interface/vxlanTun10.5.0.110
+
+# Check by listing interfaces
+echo "********************* vGMUX status ************************"
+curl -H 'Content-Type: application/json' -H 'Accept: application/json' -u admin:admin -X GET http://$VGMUX_IP:8183/restconf/config/ietf-interfaces:interfaces| python -m json.tool
+
+
+exit;
+
+#########################################################################################
+# remove above exit if you want to interact with the other components
+#########################################################################################
+
+
+
+###################################
+# vBRG
+curl -u admin:admin -X DELETE http://$VBRG_IP:8183/restconf/config/ietf-interfaces:interfaces/interface/vxlanTun10.1.0.21
+
+# check
+echo "********************* vBRG status ************************"
+curl -H 'Content-Type: application/json' -H 'Accept: application/json' -u admin:admin -X GET http://$VBRG_IP:8183/restconf/config/ietf-interfaces:interfaces| python -m json.tool
+
+
+
diff --git a/test/vcpe/preload_templates/template.vcpe_bng_vfmodule.json b/test/vcpe/preload_templates/template.vcpe_bng_vfmodule.json
index f57c90e2b..7ef2fb7db 100644
--- a/test/vcpe/preload_templates/template.vcpe_bng_vfmodule.json
+++ b/test/vcpe/preload_templates/template.vcpe_bng_vfmodule.json
@@ -84,6 +84,10 @@
"vnf-parameter-value": "10.4.0.0/24"
},
{
+ "vnf-parameter-name": "sdnc_ip_addr",
+ "vnf-parameter-value": "${sdnc_brg_bng_ip}"
+ },
+ {
"vnf-parameter-name": "vbng_private_ip_0",
"vnf-parameter-value": "10.3.0.1"
},
diff --git a/test/vcpe/preload_templates/template.vcpe_brgemu_vfmodule.json b/test/vcpe/preload_templates/template.vcpe_brgemu_vfmodule.json
index eb684369c..7072f6825 100644
--- a/test/vcpe/preload_templates/template.vcpe_brgemu_vfmodule.json
+++ b/test/vcpe/preload_templates/template.vcpe_brgemu_vfmodule.json
@@ -63,7 +63,7 @@
},
{
"vnf-parameter-name": "sdnc_ip",
- "vnf-parameter-value": "10.0.7.1"
+ "vnf-parameter-value": "${sdnc_brg_bng_ip}"
},
{
"vnf-parameter-name": "vbrgemu_name_0",
diff --git a/test/vcpe/preload_templates/template.vcpe_gwgra_vfmodule.json b/test/vcpe/preload_templates/template.vcpe_gwgra_vfmodule.json
index 856212bb3..ced57ca6a 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": "zRegionOne${vgw_vfmod_name_index}_base_vcpe_vgw_0"
}
},
"vnf-resource-assignments": {},
diff --git a/test/vcpe/preload_templates/template.vcpe_infra_vfmodule.json b/test/vcpe/preload_templates/template.vcpe_infra_vfmodule.json
index 27259546b..d2072e2e6 100644
--- a/test/vcpe/preload_templates/template.vcpe_infra_vfmodule.json
+++ b/test/vcpe/preload_templates/template.vcpe_infra_vfmodule.json
@@ -105,11 +105,11 @@
},
{
"vnf-parameter-name": "mr_ip_addr",
- "vnf-parameter-value": "10.12.5.239"
+ "vnf-parameter-value": "${mr_ip_addr}"
},
{
"vnf-parameter-name": "mr_ip_port",
- "vnf-parameter-value": "30227"
+ "vnf-parameter-value": "${mr_ip_port}"
},
{
"vnf-parameter-name": "vaaa_name_0",
@@ -153,11 +153,11 @@
},
{
"vnf-parameter-name": "demo_artifacts_version",
- "vnf-parameter-value": "1.3.0"
+ "vnf-parameter-value": "1.3.0-SNAPSHOT"
},
{
"vnf-parameter-name": "install_script_version",
- "vnf-parameter-value": "1.2.0-SNAPSHOT"
+ "vnf-parameter-value": "1.3.0-SNAPSHOT"
},
{
"vnf-parameter-name": "key_name",
diff --git a/test/vcpe/preload_templates/template_sniro_request.json b/test/vcpe/preload_templates/template_sniro_request.json
index 565e14cd1..6fdbb7072 100644
--- a/test/vcpe/preload_templates/template_sniro_request.json
+++ b/test/vcpe/preload_templates/template_sniro_request.json
@@ -14,7 +14,7 @@
},
"method" : "POST",
"base64Body" : "${base64_sniro_data}",
- "url" : "https://${sniro_ip}:8080/adapters/rest/SDNCNotify/SNIROResponse"
+ "url" : " http://so-bpmn-infra.onap:8081/mso/WorkflowMessage/SNIROResponse"
}
}
}
diff --git a/test/vcpe/soutils.py b/test/vcpe/soutils.py
index 623f12cc3..3749689f2 100755
--- a/test/vcpe/soutils.py
+++ b/test/vcpe/soutils.py
@@ -170,7 +170,7 @@ class SoUtils:
'modelInfo': model,
'subscriberInfo': {'subscriberName': 'Kaneohe',
'globalSubscriberId': self.vcpecommon.global_subscriber_id},
- 'cloudConfiguration': {"lcpCloudRegionId": 'CloudOwner_RegionOne', #self.vcpecommon.os_region_name,
+ 'cloudConfiguration': {"lcpCloudRegionId": 'RegionOne', #self.vcpecommon.os_region_name,
"tenantId": self.vcpecommon.os_tenant_id},
'requestParameters': {
"userParams": [
diff --git a/test/vcpe/vcpe.py b/test/vcpe/vcpe.py
index 81e45f334..8bd39960a 100755
--- a/test/vcpe/vcpe.py
+++ b/test/vcpe/vcpe.py
@@ -175,8 +175,8 @@ def init_so_sdnc():
vcpecommon = VcpeCommon()
config_sdnc_so.insert_customer_service_to_so(vcpecommon)
config_sdnc_so.insert_customer_service_to_sdnc(vcpecommon)
- vgw_vfmod_name_index=0
- self.save_object(vgw_vfmod_name_index, vgw_vfmod_name_index_file)
+ vgw_vfmod_name_index= 0
+ vcpecommon.save_object(vgw_vfmod_name_index, vcpecommon.vgw_vfmod_name_index_file)
def tmp_sniro():
diff --git a/test/vcpe/vcpe_custom_service.py b/test/vcpe/vcpe_custom_service.py
index ad55ed586..f02802353 100755
--- a/test/vcpe/vcpe_custom_service.py
+++ b/test/vcpe/vcpe_custom_service.py
@@ -68,15 +68,14 @@ class CustomService:
def create_custom_service(self, csar_file, vgw_template_file, vgw_gra_template_file, preload_dict=None):
name_suffix = datetime.now().strftime('%Y%m%d%H%M')
- self.load_object(vgw_vfmod_name_index,vgw_vfmod_name_index_file)
if self.vcpecommon.oom_mode:
brg_mac = str(raw_input("Enter the BRG MAC address: "))
else:
brg_mac = self.vcpecommon.get_brg_mac_from_sdnc()
# get name index
- self.load_object(vgw_vfmod_name_index,vgw_vfmod_name_index_file)
- vgw_vfmod_name_index=vgw_vfmod_name_index+1
- self.save_object(vgw_vfmod_name_index,vgw_vfmod_name_index_file)
+ 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
+ self.save_object(vgw_vfmod_name_index,self.vcpecommon.vgw_vfmod_name_index_file)
# preload vGW
if preload_dict:
preloader = preload.Preload(self.vcpecommon)
diff --git a/test/vcpe/vcpecommon.py b/test/vcpe/vcpecommon.py
index 89771707e..23d4a331d 100755
--- a/test/vcpe/vcpecommon.py
+++ b/test/vcpe/vcpecommon.py
@@ -71,8 +71,15 @@ class VcpeCommon:
self.logger = logging.getLogger(__name__)
self.logger.info('Initializing configuration')
+ # 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_brg_bng_ip = '10.0.0.17'
+ # OOM: this is a k8 host external IP
self.oom_so_sdnc_aai_ip = '10.12.5.18'
+ # OOM: this is a k8 host external IP can be same as oom_so_sdnc_aai_ip
self.oom_dcae_ves_collector = '10.12.5.18'
+ # OOM: this is a k8 host external IP can be same as oom_so_sdnc_aai_ip
+ self.mr_ip_addr = '10.12.5.18'
+ self.mr_ip_port = '30227'
self.so_nbi_port = '30277' if self.oom_mode else '8080'
self.sdnc_preloading_port = '30202' if self.oom_mode else '8282'
self.aai_query_port = '30233' if self.oom_mode else '8443'