Browse code

Merge "Add a more accurate expression for obtaining (IPV6_)ROUTER_GW_IP"

Jenkins authored on 2015/12/18 08:50:29
Showing 1 changed files
... ...
@@ -1337,7 +1337,7 @@ function _neutron_configure_router_v4 {
1337 1337
                 sudo ip addr add $ext_gw_ip/$cidr_len dev $ext_gw_interface
1338 1338
                 sudo ip link set $ext_gw_interface up
1339 1339
             fi
1340
-            ROUTER_GW_IP=`neutron port-list -c fixed_ips -c device_owner | grep router_gateway | awk -F '"' -v subnet_id=$PUB_SUBNET_ID '$4 == subnet_id { print $8; }'`
1340
+            ROUTER_GW_IP=`neutron port-list -c fixed_ips -c device_owner | grep router_gateway | awk -F'ip_address'  '{ print $2 }' | cut -f3 -d\" | tr '\n' ' '`
1341 1341
             die_if_not_set $LINENO ROUTER_GW_IP "Failure retrieving ROUTER_GW_IP"
1342 1342
             sudo ip route replace  $FIXED_RANGE via $ROUTER_GW_IP
1343 1343
         fi
... ...
@@ -1368,7 +1368,7 @@ function _neutron_configure_router_v6 {
1368 1368
         sudo sysctl -w net.ipv6.conf.all.forwarding=1
1369 1369
         # Configure and enable public bridge
1370 1370
         # Override global IPV6_ROUTER_GW_IP with the true value from neutron
1371
-        IPV6_ROUTER_GW_IP=`neutron port-list -c fixed_ips | grep $ipv6_pub_subnet_id | awk -F '"' -v subnet_id=$ipv6_pub_subnet_id '$4 == subnet_id { print $8; }'`
1371
+        IPV6_ROUTER_GW_IP=`neutron port-list -c fixed_ips | grep $ipv6_pub_subnet_id | awk -F'ip_address' '{ print $2 }' | cut -f3 -d\" | tr '\n' ' '`
1372 1372
         die_if_not_set $LINENO IPV6_ROUTER_GW_IP "Failure retrieving IPV6_ROUTER_GW_IP"
1373 1373
 
1374 1374
         if is_neutron_ovs_base_plugin; then