Merge "To enable odl_l3 and l2gw feature work together"
[releng/builder.git] / jjb / integration / include-raw-integration-deploy-openstack-run-test.sh
index 35e23adbefc08191a3f0d046093565dce0416fe4..fd0d97e80be8f3605e40a30f6cd47c57b097a2f2 100644 (file)
@@ -419,7 +419,8 @@ do
     scp extra_debug.sh ${!OS_CTRL_IP}:/tmp
     ${SSH} ${!OS_CTRL_IP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log"
     scp ${!OS_CTRL_IP}:/tmp/extra_debug.log ${OS_CTRL_FOLDER}/extra_debug.log
-    scp ${!OS_CTRL_IP}:/opt/stack/devstack/local.conf ${OS_CTRL_FOLDER}/local.conf
+    scp ${!OS_CTRL_IP}:/tmp/*.xz ${OS_CTRL_FOLDER}/
+    mv local.conf_control_${!OS_CTRL_IP} ${OS_CTRL_FOLDER}/local.conf
     mv ${OS_CTRL_FOLDER} ${WORKSPACE}/archives/
 done
 
@@ -436,6 +437,7 @@ do
     scp extra_debug.sh ${!OSIP}:/tmp
     ${SSH} ${!OSIP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log"
     scp ${!OSIP}:/tmp/extra_debug.log ${OS_COMPUTE_FOLDER}/extra_debug.log
+    scp ${!OSIP}:/tmp/*.xz ${OS_COMPUTE_FOLDER}/
     mv local.conf_compute_${!OSIP} ${OS_COMPUTE_FOLDER}/local.conf
     mv ${OS_COMPUTE_FOLDER} ${WORKSPACE}/archives/
 done
@@ -719,11 +721,36 @@ do
     fi
 
     # Control Node - PUBLIC_BRIDGE will act as the external router
-    GATEWAY_IP="10.10.10.250" # FIXME this should be a parameter, also shared with integration-test
-    GATEWAY_VLAN_ID=167
-    ${SSH} ${!CONTROLIP} "sudo ip link add link ${PUBLIC_BRIDGE} name ${PUBLIC_BRIDGE}.${GATEWAY_VLAN_ID} type vlan id ${GATEWAY_VLAN_ID}"
-    ${SSH} ${!CONTROLIP} "sudo ifconfig ${PUBLIC_BRIDGE} up"
-    ${SSH} ${!CONTROLIP} "sudo ifconfig ${PUBLIC_BRIDGE}.${GATEWAY_VLAN_ID} up ${GATEWAY_IP}/24"
+    # Parameter values below are used in integration/test - changing them requires updates in intergration/test as well
+    EXTNET_GATEWAY_IP="10.10.10.250"
+    EXTNET_VLAN_ID=167
+    EXTNET_INTERNET_IP="10.9.9.9"
+    EXTNET_PNF_IP="10.10.10.253"
+    if [[ ${CONTROLLERFEATURES} == *"odl-ovsdb-openstack"* ]]; then
+        ${SSH} ${!CONTROLIP} "sudo ifconfig ${PUBLIC_BRIDGE} up ${EXTNET_GATEWAY_IP}/24"
+    else
+        ${SSH} ${!CONTROLIP} "sudo ip link add link ${PUBLIC_BRIDGE} name ${PUBLIC_BRIDGE}.${EXTNET_VLAN_ID} type vlan id ${EXTNET_VLAN_ID}"
+        ${SSH} ${!CONTROLIP} "sudo ifconfig ${PUBLIC_BRIDGE} up"
+        ${SSH} ${!CONTROLIP} "sudo ifconfig ${PUBLIC_BRIDGE}.${EXTNET_VLAN_ID} up ${EXTNET_GATEWAY_IP}/24"
+
+        # Control Node - external net PNF simulation
+        ${SSH} ${!CONTROLIP} "
+            sudo ip netns add pnf_ns;
+            sudo ip link add pnf_veth0 type veth peer name pnf_veth1;
+            sudo ip link set pnf_veth1 netns pnf_ns;
+            sudo ip link set pnf_veth0 up;
+            sudo ip netns exec pnf_ns ifconfig pnf_veth1 up;
+            sudo ip netns exec pnf_ns ip link add link pnf_veth1 name pnf_veth1.${EXTNET_VLAN_ID} type vlan id ${EXTNET_VLAN_ID};
+            sudo ip netns exec pnf_ns ifconfig pnf_veth1.${EXTNET_VLAN_ID} up ${EXTNET_PNF_IP}/24;
+            sudo ovs-vsctl add-port br-physnet1 pnf_veth0;
+        "
+
+        # Control Node - external net internet address simulation
+        ${SSH} ${!CONTROLIP} "
+            sudo ip tuntap add dev internet_tap mode tap;
+            sudo ifconfig internet_tap up ${EXTNET_INTERNET_IP}/24;
+        "
+    fi
 
     # Computes
     compute_index=1