fixes from vCPE testing 57/72557/2
authorBrian Freeman <bf1936@att.com>
Tue, 13 Nov 2018 16:34:48 +0000 (11:34 -0500)
committerBrian Freeman <bf1936@att.com>
Tue, 13 Nov 2018 17:34:20 +0000 (12:34 -0500)
Issue-ID: INT-717
Change-Id: If2c44e08288eee955b7a3548a802be37a15a601e
Signed-off-by: Brian Freeman <bf1936@att.com>
test/vcpe/cleanvGMUX.sh [new file with mode: 0755]
test/vcpe/preload_templates/template.vcpe_bng_vfmodule.json
test/vcpe/preload_templates/template.vcpe_brgemu_vfmodule.json
test/vcpe/preload_templates/template.vcpe_gwgra_vfmodule.json
test/vcpe/preload_templates/template.vcpe_infra_vfmodule.json
test/vcpe/preload_templates/template_sniro_request.json
test/vcpe/soutils.py
test/vcpe/vcpe.py
test/vcpe/vcpe_custom_service.py
test/vcpe/vcpecommon.py

diff --git a/test/vcpe/cleanvGMUX.sh b/test/vcpe/cleanvGMUX.sh
new file mode 100755 (executable)
index 0000000..3b8dabc
--- /dev/null
@@ -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
+
+
+
index f57c90e..7ef2fb7 100644 (file)
                "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"
                },
index eb68436..7072f68 100644 (file)
@@ -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",
index 856212b..ced57ca 100644 (file)
                                ] },
                                "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": {},
index 2725954..d2072e2 100644 (file)
        },
        {
        "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",
        },
        {
        "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",
index 565e14c..6fdbb70 100644 (file)
@@ -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"
     }
   }
 }
index 623f12c..3749689 100755 (executable)
@@ -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": [
index 81e45f3..8bd3996 100755 (executable)
@@ -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():
index ad55ed5..f028023 100755 (executable)
@@ -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)
index 8977170..23d4a33 100755 (executable)
@@ -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'