Add Message Router IP address to vDHCP template 81/8681/1
authorMarco Platania <platania@research.att.com>
Thu, 24 Aug 2017 19:53:20 +0000 (15:53 -0400)
committerMarco Platania <platania@research.att.com>
Thu, 24 Aug 2017 19:53:20 +0000 (15:53 -0400)
- Add MR IP to vCPE-Infra Heat template
- Modify kea-sdnc-notify.conf for Nexus
- Update v_dhcp_install.sh to change the fake MR IP via sed

Change-Id: I90faff7142739ca209ab2ad0efe9fd7a8d8dfe95
Issue-ID: UCA-35
Signed-off-by: Marco Platania <platania@research.att.com>
heat/vCPE/infra/base_vcpe_infra_rackspace.env
heat/vCPE/infra/base_vcpe_infra_rackspace.yaml
vnfs/vCPE/scripts/kea-sdnc-notify.conf
vnfs/vCPE/scripts/v_dhcp_install.sh

index 4de6090..790949b 100644 (file)
@@ -17,6 +17,7 @@ parameters:
   vdns_private_ip_1: 10.0.101.3
   vweb_private_ip_0: 10.2.0.10
   vweb_private_ip_1: 10.0.101.40
+  mr_ip_addr: 10.0.11.1
   vaaa_name_0: zdcpe1cpe01aaa01
   vdns_name_0: zdcpe11cpe01dns01
   vdhcp_name_0: zdcpe1cpe01dhcp01
index 6b9160b..c0a1875 100644 (file)
@@ -76,7 +76,7 @@ parameters:
   vaaa_private_ip_0:
     type: string
     label: vAAA private IP address towards the CPE_SIGNAL private network
-    description: Private IP address that is assigned to the vAAA to communicate with the vCPE components 
+    description: Private IP address that is assigned to the vAAA to communicate with the vCPE components
   vaaa_private_ip_1:
     type: string
     label: vAAA private IP address towards the ONAP management network
@@ -137,6 +137,10 @@ parameters:
     type: string
     label: DCAE collector port
     description: Port of the DCAE collector
+  mr_ip_addr:
+    type: string
+    label: Message Router IP address
+    description: IP address of the Message Router that for vDHCP configuration 
   key_name:
     type: string
     label: Key pair name
@@ -370,9 +374,10 @@ resources:
         str_replace:
           params:
             __oam_ipaddr__ : { get_param: vdhcp_private_ip_1 }
-            __cpe_signal_ipaddr__: { get_param: vdhcp_private_ip_0 }
-            __oam_cidr__: { get_param: onap_private_net_cidr }
-            __cpe_signal_net_cidr__: { get_param: cpe_signal_net_cidr }
+            __cpe_signal_ipaddr__ : { get_param: vdhcp_private_ip_0 }
+            __oam_cidr__ : { get_param: onap_private_net_cidr }
+            __cpe_signal_net_cidr__ : { get_param: cpe_signal_net_cidr }
+            __mr_ip_addr__ : { get_param: mr_ip_addr }
             __repo_url_blob__ : { get_param: repo_url_blob }
             __repo_url_artifacts__ : { get_param: repo_url_artifacts }
             __demo_artifacts_version__ : { get_param: demo_artifacts_version }
@@ -387,6 +392,7 @@ resources:
             echo "__cpe_signal_ipaddr__" > /opt/config/cpe_signal_ipaddr.txt
             echo "__oam_cidr__" > /opt/config/oam_cidr.txt
             echo "__cpe_signal_net_cidr__" > /opt/config/cpe_signal_net_cidr.txt
+            echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
             echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
             echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
             echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
index 1a8ee2e..6fd0984 100644 (file)
@@ -1,3 +1,4 @@
-{"url": "http://localhost/sdnc.php?macaddr=",
+{
+ "url": "http://DMAAP_IPADDR:3904/events/VCPE-DHCP-EVENT/",
  "siaddr": "siaddr"
 }
index d88ed50..f9ea25b 100644 (file)
@@ -5,6 +5,7 @@ REPO_URL_ARTIFACTS=$(cat /opt/config/repo_url_artifacts.txt)
 DEMO_ARTIFACTS_VERSION=$(cat /opt/config/demo_artifacts_version.txt)
 INSTALL_SCRIPT_VERSION=$(cat /opt/config/install_script_version.txt)
 CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
+MR_IP_ADDR=$(cat /opt/config/mr_ip_addr.txt)
 
 # Convert Network CIDR to Netmask
 cdr2mask () {
@@ -78,6 +79,7 @@ update-rc.d v_dhcp.sh defaults
 # Configure DHCP
 cp kea-dhcp4.conf /etc/kea-dhcp4-server.conf
 mv kea-dhcp4.conf /etc/kea/kea-dhcp4.conf
+sed -i "s/DMAAP_IPADDR/"$MR_IP_ADDR"/g" kea-sdnc-notify.conf
 mv kea-sdnc-notify.conf /etc/kea/kea-sdnc-notify.conf
 sleep 1