Browse code

Merge "Adopt openstack client for neutron commands"

Jenkins authored on 2016/11/16 00:34:51
Showing 5 changed files
... ...
@@ -66,21 +66,21 @@ Run stack.sh and do some sanity checks
66 66
     ./stack.sh
67 67
     . ./openrc
68 68
 
69
-    neutron net-list  # should show public and private networks
69
+    openstack network list  # should show public and private networks
70 70
 
71 71
 Create two nova instances that we can use as test http servers:
72 72
 
73 73
   ::
74 74
 
75 75
     #create nova instances on private network
76
-    nova boot --image $(nova image-list | awk '/ cirros-.*-x86_64-uec / {print $2}') --flavor 1 --nic net-id=$(neutron net-list | awk '/ private / {print $2}') node1
77
-    nova boot --image $(nova image-list | awk '/ cirros-.*-x86_64-uec / {print $2}') --flavor 1 --nic net-id=$(neutron net-list | awk '/ private / {print $2}') node2
76
+    nova boot --image $(nova image-list | awk '/ cirros-.*-x86_64-uec / {print $2}') --flavor 1 --nic net-id=$(openstack network list | awk '/ private / {print $2}') node1
77
+    nova boot --image $(nova image-list | awk '/ cirros-.*-x86_64-uec / {print $2}') --flavor 1 --nic net-id=$(openstack network list | awk '/ private / {print $2}') node2
78 78
     nova list # should show the nova instances just created
79 79
 
80 80
     #add secgroup rules to allow ssh etc..
81
-    neutron security-group-rule-create default --protocol icmp
82
-    neutron security-group-rule-create default --protocol tcp --port-range-min 22 --port-range-max 22
83
-    neutron security-group-rule-create default --protocol tcp --port-range-min 80 --port-range-max 80
81
+    openstack security group rule create default --protocol icmp
82
+    openstack security group rule create default --protocol tcp --dst-port 22:22
83
+    openstack security group rule create default --protocol tcp --dst-port 80:80
84 84
 
85 85
 Set up a simple web server on each of these instances. ssh into each instance (username 'cirros', password 'cubswin:)') and run
86 86
 
... ...
@@ -156,7 +156,7 @@ function get_role_id {
156 156
 function get_network_id {
157 157
     local NETWORK_NAME="$1"
158 158
     local NETWORK_ID
159
-    NETWORK_ID=`neutron net-list -F id  -- --name=$NETWORK_NAME | awk "NR==4" | awk '{print $2}'`
159
+    NETWORK_ID=`openstack network list | grep $NETWORK_NAME | awk '{print $2}'`
160 160
     echo $NETWORK_ID
161 161
 }
162 162
 
... ...
@@ -234,9 +234,9 @@ function create_network {
234 234
     PROJECT_ID=$(get_project_id $PROJECT)
235 235
     source $TOP_DIR/openrc $PROJECT $PROJECT
236 236
     local NET_ID
237
-    NET_ID=$(neutron net-create --project-id $PROJECT_ID $NET_NAME $EXTRA| grep ' id ' | awk '{print $4}' )
237
+    NET_ID=$(openstack network create --project $PROJECT_ID $NET_NAME $EXTRA| grep ' id ' | awk '{print $4}' )
238 238
     die_if_not_set $LINENO NET_ID "Failure creating NET_ID for $PROJECT_ID $NET_NAME $EXTRA"
239
-    neutron subnet-create --ip-version 4 --project-id $PROJECT_ID --gateway $GATEWAY --subnetpool None $NET_ID $CIDR
239
+    openstack subnet create --ip-version 4 --project $PROJECT_ID --gateway $GATEWAY --subnet-pool None --network $NET_ID --subnet-range $CIDR "${NET_NAME}_subnet"
240 240
     neutron_debug_admin probe-create --device-owner compute $NET_ID
241 241
     source $TOP_DIR/openrc demo demo
242 242
 }
... ...
@@ -325,10 +325,10 @@ function delete_network {
325 325
     PROJECT_ID=$(get_project_id $PROJECT)
326 326
     #TODO(nati) comment out until l3-agent merged
327 327
     #for res in port subnet net router;do
328
-    for net_id in `neutron net-list -c id -c name | grep $NET_NAME | awk '{print $2}'`;do
328
+    for net_id in `openstack network list -c ID -c Name | grep $NET_NAME | awk '{print $2}'`;do
329 329
         delete_probe $net_id
330
-        neutron subnet-list | grep $net_id | awk '{print $2}' | xargs -I% neutron subnet-delete %
331
-        neutron net-delete $net_id
330
+        openstack subnet list | grep $net_id | awk '{print $2}' | xargs -I% openstack subnet delete %
331
+        openstack network delete $net_id
332 332
     done
333 333
     source $TOP_DIR/openrc demo demo
334 334
 }
... ...
@@ -174,10 +174,10 @@ function create_neutron_initial_network {
174 174
     if is_networking_extension_supported "auto-allocated-topology"; then
175 175
         if [[ "$USE_SUBNETPOOL" == "True" ]]; then
176 176
             if [[ "$IP_VERSION" =~ 4.* ]]; then
177
-                SUBNETPOOL_V4_ID=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" subnetpool-create $SUBNETPOOL_NAME --default-prefixlen $SUBNETPOOL_SIZE_V4 --pool-prefix $SUBNETPOOL_PREFIX_V4 --shared --is-default=True | grep ' id ' | get_field 2)
177
+                SUBNETPOOL_V4_ID=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" subnet pool create $SUBNETPOOL_NAME --default-prefix-length $SUBNETPOOL_SIZE_V4 --pool-prefix $SUBNETPOOL_PREFIX_V4 --share --default | grep ' id ' | get_field 2)
178 178
             fi
179 179
             if [[ "$IP_VERSION" =~ .*6 ]]; then
180
-                SUBNETPOOL_V6_ID=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" subnetpool-create $SUBNETPOOL_NAME --default-prefixlen $SUBNETPOOL_SIZE_V6 --pool-prefix $SUBNETPOOL_PREFIX_V6 --shared --is-default=True | grep ' id ' | get_field 2)
180
+                SUBNETPOOL_V6_ID=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" subnet pool create $SUBNETPOOL_NAME --default-prefix-length $SUBNETPOOL_SIZE_V6 --pool-prefix $SUBNETPOOL_PREFIX_V6 --share --default | grep ' id ' | get_field 2)
181 181
             fi
182 182
         fi
183 183
     fi
... ...
@@ -185,14 +185,14 @@ function create_neutron_initial_network {
185 185
     if is_provider_network; then
186 186
         die_if_not_set $LINENO PHYSICAL_NETWORK "You must specify the PHYSICAL_NETWORK"
187 187
         die_if_not_set $LINENO PROVIDER_NETWORK_TYPE "You must specify the PROVIDER_NETWORK_TYPE"
188
-        NET_ID=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" net-create $PHYSICAL_NETWORK --tenant_id $project_id --provider:network_type $PROVIDER_NETWORK_TYPE --provider:physical_network "$PHYSICAL_NETWORK" ${SEGMENTATION_ID:+--provider:segmentation_id $SEGMENTATION_ID} --shared | grep ' id ' | get_field 2)
188
+        NET_ID=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" network create $PHYSICAL_NETWORK --project $project_id --provider-network-type $PROVIDER_NETWORK_TYPE --provider-physical-network "$PHYSICAL_NETWORK" ${SEGMENTATION_ID:+--provider-segment $SEGMENTATION_ID} --share | grep ' id ' | get_field 2)
189 189
         die_if_not_set $LINENO NET_ID "Failure creating NET_ID for $PHYSICAL_NETWORK $project_id"
190 190
 
191 191
         if [[ "$IP_VERSION" =~ 4.* ]]; then
192 192
             if [ -z $SUBNETPOOL_V4_ID ]; then
193 193
                 fixed_range_v4=$FIXED_RANGE
194 194
             fi
195
-            SUBNET_ID=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" subnet-create --tenant_id $project_id --ip_version 4 ${ALLOCATION_POOL:+--allocation-pool $ALLOCATION_POOL} --name $PROVIDER_SUBNET_NAME --gateway $NETWORK_GATEWAY ${SUBNETPOOL_V4_ID:+--subnetpool $SUBNETPOOL_V4_ID} $NET_ID $fixed_range_v4 | grep ' id ' | get_field 2)
195
+            SUBNET_ID=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" subnet create --project $project_id --ip-version 4 ${ALLOCATION_POOL:+--allocation-pool $ALLOCATION_POOL} $PROVIDER_SUBNET_NAME --gateway $NETWORK_GATEWAY ${SUBNETPOOL_V4_ID:+--subnet-pool $SUBNETPOOL_V4_ID} --network $NET_ID --subnet-range $fixed_range_v4 | grep ' id ' | get_field 2)
196 196
             die_if_not_set $LINENO SUBNET_ID "Failure creating SUBNET_ID for $PROVIDER_SUBNET_NAME $project_id"
197 197
         fi
198 198
 
... ...
@@ -202,7 +202,7 @@ function create_neutron_initial_network {
202 202
             if [ -z $SUBNETPOOL_V6_ID ]; then
203 203
                 fixed_range_v6=$IPV6_PROVIDER_FIXED_RANGE
204 204
             fi
205
-            SUBNET_V6_ID=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" subnet-create --tenant_id $project_id --ip_version 6 --ipv6-address-mode $IPV6_ADDRESS_MODE --gateway $IPV6_PROVIDER_NETWORK_GATEWAY --name $IPV6_PROVIDER_SUBNET_NAME ${SUBNETPOOL_V6_ID:+--subnetpool $SUBNETPOOL_V6_ID} $NET_ID $fixed_range_v6 | grep 'id' | get_field 2)
205
+            SUBNET_V6_ID=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" subnet create --project $project_id --ip-version 6 --ipv6-address-mode $IPV6_ADDRESS_MODE --gateway $IPV6_PROVIDER_NETWORK_GATEWAY $IPV6_PROVIDER_SUBNET_NAME ${SUBNETPOOL_V6_ID:+--subnet-pool $SUBNETPOOL_V6_ID} --network $NET_ID $fixed_range_v6 | grep 'id' | get_field 2)
206 206
             die_if_not_set $LINENO SUBNET_V6_ID "Failure creating SUBNET_V6_ID for $IPV6_PROVIDER_SUBNET_NAME $project_id"
207 207
         fi
208 208
 
... ...
@@ -212,7 +212,7 @@ function create_neutron_initial_network {
212 212
             sudo ip link set $PUBLIC_INTERFACE up
213 213
         fi
214 214
     else
215
-        NET_ID=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" net-create --tenant-id $project_id "$PRIVATE_NETWORK_NAME" | grep ' id ' | get_field 2)
215
+        NET_ID=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" network create --project $project_id "$PRIVATE_NETWORK_NAME" | grep ' id ' | get_field 2)
216 216
         die_if_not_set $LINENO NET_ID "Failure creating NET_ID for $PRIVATE_NETWORK_NAME $project_id"
217 217
 
218 218
         if [[ "$IP_VERSION" =~ 4.* ]]; then
... ...
@@ -230,23 +230,23 @@ function create_neutron_initial_network {
230 230
         # Create a router, and add the private subnet as one of its interfaces
231 231
         if [[ "$Q_L3_ROUTER_PER_TENANT" == "True" ]]; then
232 232
             # create a tenant-owned router.
233
-            ROUTER_ID=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" router-create --tenant-id $project_id $Q_ROUTER_NAME | grep ' id ' | get_field 2)
233
+            ROUTER_ID=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" router create --project $project_id $Q_ROUTER_NAME | grep ' id ' | get_field 2)
234 234
             die_if_not_set $LINENO ROUTER_ID "Failure creating ROUTER_ID for $project_id $Q_ROUTER_NAME"
235 235
         else
236 236
             # Plugin only supports creating a single router, which should be admin owned.
237
-            ROUTER_ID=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" router-create $Q_ROUTER_NAME | grep ' id ' | get_field 2)
237
+            ROUTER_ID=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" router create $Q_ROUTER_NAME | grep ' id ' | get_field 2)
238 238
             die_if_not_set $LINENO ROUTER_ID "Failure creating ROUTER_ID for $Q_ROUTER_NAME"
239 239
         fi
240 240
 
241
-        EXTERNAL_NETWORK_FLAGS="--router:external"
241
+        EXTERNAL_NETWORK_FLAGS="--external"
242 242
         if is_networking_extension_supported "auto-allocated-topology"; then
243
-            EXTERNAL_NETWORK_FLAGS="$EXTERNAL_NETWORK_FLAGS --is-default"
243
+            EXTERNAL_NETWORK_FLAGS="$EXTERNAL_NETWORK_FLAGS --default"
244 244
         fi
245 245
         # Create an external network, and a subnet. Configure the external network as router gw
246 246
         if [ "$Q_USE_PROVIDERNET_FOR_PUBLIC" = "True" ]; then
247
-            EXT_NET_ID=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" net-create "$PUBLIC_NETWORK_NAME" -- $EXTERNAL_NETWORK_FLAGS --provider:network_type=flat --provider:physical_network=${PUBLIC_PHYSICAL_NETWORK} | grep ' id ' | get_field 2)
247
+            EXT_NET_ID=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" network create "$PUBLIC_NETWORK_NAME" $EXTERNAL_NETWORK_FLAGS --provider-network-type flat --provider-physical-network ${PUBLIC_PHYSICAL_NETWORK} | grep ' id ' | get_field 2)
248 248
         else
249
-            EXT_NET_ID=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" net-create "$PUBLIC_NETWORK_NAME" -- $EXTERNAL_NETWORK_FLAGS | grep ' id ' | get_field 2)
249
+            EXT_NET_ID=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" network create "$PUBLIC_NETWORK_NAME" $EXTERNAL_NETWORK_FLAGS | grep ' id ' | get_field 2)
250 250
         fi
251 251
         die_if_not_set $LINENO EXT_NET_ID "Failure creating EXT_NET_ID for $PUBLIC_NETWORK_NAME"
252 252
 
... ...
@@ -268,16 +268,16 @@ function _neutron_create_private_subnet_v4 {
268 268
     if [ -z $SUBNETPOOL_V4_ID ]; then
269 269
         fixed_range_v4=$FIXED_RANGE
270 270
     fi
271
-    local subnet_params="--tenant-id $project_id "
272
-    subnet_params+="--ip_version 4 "
271
+    local subnet_params="--project $project_id "
272
+    subnet_params+="--ip-version 4 "
273 273
     if [[ -n "$NETWORK_GATEWAY" ]]; then
274 274
         subnet_params+="--gateway $NETWORK_GATEWAY "
275 275
     fi
276
-    subnet_params+="--name $PRIVATE_SUBNET_NAME "
277
-    subnet_params+="${SUBNETPOOL_V4_ID:+--subnetpool $SUBNETPOOL_V4_ID} "
278
-    subnet_params+="$NET_ID $fixed_range_v4"
276
+    subnet_params+="${SUBNETPOOL_V4_ID:+--subnet-pool $SUBNETPOOL_V4_ID} "
277
+    subnet_params+="${fixed_range_v4:+--subnet-range $fixed_range_v4} "
278
+    subnet_params+="--network $NET_ID $PRIVATE_SUBNET_NAME"
279 279
     local subnet_id
280
-    subnet_id=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" subnet-create $subnet_params | grep ' id ' | get_field 2)
280
+    subnet_id=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" subnet create $subnet_params | grep ' id ' | get_field 2)
281 281
     die_if_not_set $LINENO subnet_id "Failure creating private IPv4 subnet for $project_id"
282 282
     echo $subnet_id
283 283
 }
... ...
@@ -291,52 +291,50 @@ function _neutron_create_private_subnet_v6 {
291 291
     if [ -z $SUBNETPOOL_V6_ID ]; then
292 292
         fixed_range_v6=$FIXED_RANGE_V6
293 293
     fi
294
-    local subnet_params="--tenant-id $project_id "
295
-    subnet_params+="--ip_version 6 "
294
+    local subnet_params="--project $project_id "
295
+    subnet_params+="--ip-version 6 "
296 296
     if [[ -n "$IPV6_PRIVATE_NETWORK_GATEWAY" ]]; then
297 297
         subnet_params+="--gateway $IPV6_PRIVATE_NETWORK_GATEWAY "
298 298
     fi
299
-    subnet_params+="--name $IPV6_PRIVATE_SUBNET_NAME "
300
-    subnet_params+="${SUBNETPOOL_V6_ID:+--subnetpool $SUBNETPOOL_V6_ID} "
301
-    subnet_params+="$NET_ID $fixed_range_v6 $ipv6_modes"
299
+    subnet_params+="${SUBNETPOOL_V6_ID:+--subnet-pool $SUBNETPOOL_V6_ID} "
300
+    subnet_params+="${fixed_range_v6:+--subnet-range $fixed_range_v6 $ipv6_modes} "
301
+    subnet_params+="--network $NET_ID $IPV6_PRIVATE_SUBNET_NAME "
302 302
     local ipv6_subnet_id
303
-    ipv6_subnet_id=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" subnet-create $subnet_params | grep ' id ' | get_field 2)
303
+    ipv6_subnet_id=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" subnet create $subnet_params | grep ' id ' | get_field 2)
304 304
     die_if_not_set $LINENO ipv6_subnet_id "Failure creating private IPv6 subnet for $project_id"
305 305
     echo $ipv6_subnet_id
306 306
 }
307 307
 
308 308
 # Create public IPv4 subnet
309 309
 function _neutron_create_public_subnet_v4 {
310
-    local subnet_params="--ip_version 4 "
310
+    local subnet_params="--ip-version 4 "
311 311
     subnet_params+="${Q_FLOATING_ALLOCATION_POOL:+--allocation-pool $Q_FLOATING_ALLOCATION_POOL} "
312 312
     if [[ -n "$PUBLIC_NETWORK_GATEWAY" ]]; then
313 313
         subnet_params+="--gateway $PUBLIC_NETWORK_GATEWAY "
314 314
     fi
315
-    subnet_params+="--name $PUBLIC_SUBNET_NAME "
316
-    subnet_params+="$EXT_NET_ID $FLOATING_RANGE "
317
-    subnet_params+="-- --enable_dhcp=False"
315
+    subnet_params+="--network $EXT_NET_ID --subnet-range $FLOATING_RANGE --no-dhcp "
316
+    subnet_params+="$PUBLIC_SUBNET_NAME"
318 317
     local id_and_ext_gw_ip
319
-    id_and_ext_gw_ip=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" subnet-create $subnet_params | grep -e 'gateway_ip' -e ' id ')
318
+    id_and_ext_gw_ip=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" subnet create $subnet_params | grep -e 'gateway_ip' -e ' id ')
320 319
     die_if_not_set $LINENO id_and_ext_gw_ip "Failure creating public IPv4 subnet"
321 320
     echo $id_and_ext_gw_ip
322 321
 }
323 322
 
324 323
 # Create public IPv6 subnet
325 324
 function _neutron_create_public_subnet_v6 {
326
-    local subnet_params="--ip_version 6 "
325
+    local subnet_params="--ip-version 6 "
327 326
     subnet_params+="--gateway $IPV6_PUBLIC_NETWORK_GATEWAY "
328
-    subnet_params+="--name $IPV6_PUBLIC_SUBNET_NAME "
329
-    subnet_params+="$EXT_NET_ID $IPV6_PUBLIC_RANGE "
330
-    subnet_params+="-- --enable_dhcp=False"
327
+    subnet_params+="--network $EXT_NET_ID --subnet-range $IPV6_PUBLIC_RANGE --no-dhcp "
328
+    subnet_params+="$IPV6_PUBLIC_SUBNET_NAME"
331 329
     local ipv6_id_and_ext_gw_ip
332
-    ipv6_id_and_ext_gw_ip=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" subnet-create $subnet_params | grep -e 'gateway_ip' -e ' id ')
330
+    ipv6_id_and_ext_gw_ip=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" subnet create $subnet_params | grep -e 'gateway_ip' -e ' id ')
333 331
     die_if_not_set $LINENO ipv6_id_and_ext_gw_ip "Failure creating an IPv6 public subnet"
334 332
     echo $ipv6_id_and_ext_gw_ip
335 333
 }
336 334
 
337 335
 # Configure neutron router for IPv4 public access
338 336
 function _neutron_configure_router_v4 {
339
-    neutron --os-cloud devstack-admin --os-region "$REGION_NAME" router-interface-add $ROUTER_ID $SUBNET_ID
337
+    openstack --os-cloud devstack-admin --os-region "$REGION_NAME" router add subnet $ROUTER_ID $SUBNET_ID
340 338
     # Create a public subnet on the external network
341 339
     local id_and_ext_gw_ip
342 340
     id_and_ext_gw_ip=$(_neutron_create_public_subnet_v4 $EXT_NET_ID)
... ...
@@ -371,7 +369,7 @@ function _neutron_configure_router_v4 {
371 371
                 sudo ip addr add $ext_gw_ip/$cidr_len dev $ext_gw_interface
372 372
                 sudo ip link set $ext_gw_interface up
373 373
             fi
374
-            ROUTER_GW_IP=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" port-list -c fixed_ips -c device_owner | grep router_gateway | awk -F'ip_address'  '{ print $2 }' | cut -f3 -d\" | tr '\n' ' ')
374
+            ROUTER_GW_IP=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" port list -c 'Fixed IP Addresses' --device-owner network:router_gateway | awk -F'ip_address'  '{ print $2 }' | cut -f2 -d\' | tr '\n' ' ')
375 375
             die_if_not_set $LINENO ROUTER_GW_IP "Failure retrieving ROUTER_GW_IP"
376 376
             local replace_range=${SUBNETPOOL_PREFIX_V4}
377 377
             if [[ -z "${SUBNETPOOL_V4_ID}" ]]; then
... ...
@@ -385,7 +383,7 @@ function _neutron_configure_router_v4 {
385 385
 
386 386
 # Configure neutron router for IPv6 public access
387 387
 function _neutron_configure_router_v6 {
388
-    neutron --os-cloud devstack-admin --os-region "$REGION_NAME" router-interface-add $ROUTER_ID $IPV6_SUBNET_ID
388
+    openstack --os-cloud devstack-admin --os-region "$REGION_NAME" router add subnet $ROUTER_ID $IPV6_SUBNET_ID
389 389
     # Create a public subnet on the external network
390 390
     local ipv6_id_and_ext_gw_ip
391 391
     ipv6_id_and_ext_gw_ip=$(_neutron_create_public_subnet_v6 $EXT_NET_ID)
... ...
@@ -416,7 +414,7 @@ function _neutron_configure_router_v6 {
416 416
         sudo sysctl -w net.ipv6.conf.all.forwarding=1
417 417
         # Configure and enable public bridge
418 418
         # Override global IPV6_ROUTER_GW_IP with the true value from neutron
419
-        IPV6_ROUTER_GW_IP=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" port-list -c fixed_ips | grep $ipv6_pub_subnet_id | awk -F'ip_address' '{ print $2 }' | cut -f3 -d\" | tr '\n' ' ')
419
+        IPV6_ROUTER_GW_IP=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" port list -c 'Fixed IP Addresses' | grep $ipv6_pub_subnet_id | awk -F'ip_address' '{ print $2 }' | cut -f2 -d\' | tr '\n' ' ')
420 420
         die_if_not_set $LINENO IPV6_ROUTER_GW_IP "Failure retrieving IPV6_ROUTER_GW_IP"
421 421
 
422 422
         if is_neutron_ovs_base_plugin; then
... ...
@@ -446,6 +444,6 @@ function is_provider_network {
446 446
 function is_networking_extension_supported {
447 447
     local extension=$1
448 448
     # TODO(sc68cal) cache this instead of calling every time
449
-    EXT_LIST=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" ext-list -c alias -f value)
449
+    EXT_LIST=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" extension list --network -c Alias -f value)
450 450
     [[ $EXT_LIST =~ $extension ]] && return 0
451 451
 }
... ...
@@ -242,7 +242,7 @@ function configure_tempest {
242 242
     # the public network (for floating ip access) is only available
243 243
     # if the extension is enabled.
244 244
     if is_networking_extension_supported 'external-net'; then
245
-        public_network_id=$(neutron net-list | grep $PUBLIC_NETWORK_NAME | \
245
+        public_network_id=$(openstack network list | grep $PUBLIC_NETWORK_NAME | \
246 246
             awk '{print $2}')
247 247
     fi
248 248
 
... ...
@@ -54,7 +54,7 @@ fi
54 54
 REMAINING_ARGS="${@:2}"
55 55
 
56 56
 # BUG: with duplicate network names, this fails pretty hard.
57
-NET_ID=$(neutron net-list | grep "$NET_NAME" | awk '{print $2}')
57
+NET_ID=$(openstack network list | grep "$NET_NAME" | awk '{print $2}')
58 58
 PROBE_ID=$(neutron-debug probe-list -c id -c network_id | grep "$NET_ID" | awk '{print $2}' | head -n 1)
59 59
 
60 60
 # This runs a command inside the specific netns