Neutron L3 may implement a variety of extensions: router, external-net,
dvr, ext-gw-mode, extraroute, l3-ha, etc. The public network uuid is
only going to be made available if and only if the external-net extension
is available, because that's the one that provides Floating IP support.
Rather than making Tempest aware of q-l3 service (when q-* services
are supposed to be legacy), it is better to tune this configuration
based on the extension availability. This decouples Tempest from
Neutron setup internals.
Change-Id: I4889fc3d21bd221785b507995f1b3da0e8f52b46
Related-bug: 1582119
| ... | ... |
@@ -238,7 +238,10 @@ function configure_tempest {
|
| 238 | 238 |
|
| 239 | 239 |
ssh_connect_method=${TEMPEST_SSH_CONNECT_METHOD:-$ssh_connect_method}
|
| 240 | 240 |
|
| 241 |
- if is_service_enabled q-l3; then |
|
| 241 |
+ # the public network (for floating ip access) is only available |
|
| 242 |
+ # if the extension is enabled. |
|
| 243 |
+ EXTERNAL_NETWORK_EXT=$(neutron ext-list | grep 'external-net' | get_field 1) |
|
| 244 |
+ if [[ -n $EXTERNAL_NETWORK_EXT ]]; then |
|
| 242 | 245 |
public_network_id=$(neutron net-list | grep $PUBLIC_NETWORK_NAME | \ |
| 243 | 246 |
awk '{print $2}')
|
| 244 | 247 |
fi |