Added an option to make subnetpools to be optional
as it ignores the public network specified in
FIXED_RANGE.
DocImpact
Change-Id: Ic89ceca76afda67da5545111972c3348011f294f
Closes-Bug: #1628267
| ... | ... |
@@ -392,6 +392,7 @@ controller node. |
| 392 | 392 |
PROVIDER_SUBNET_NAME="provider_net" |
| 393 | 393 |
PROVIDER_NETWORK_TYPE="vlan" |
| 394 | 394 |
SEGMENTATION_ID=2010 |
| 395 |
+ USE_SUBNETPOOL=False |
|
| 395 | 396 |
|
| 396 | 397 |
In this configuration we are defining FIXED_RANGE to be a |
| 397 | 398 |
publicly routed IPv4 subnet. In this specific instance we are using |
| ... | ... |
@@ -577,6 +578,7 @@ you do not require them. |
| 577 | 577 |
PROVIDER_SUBNET_NAME="provider_net" |
| 578 | 578 |
PROVIDER_NETWORK_TYPE="vlan" |
| 579 | 579 |
SEGMENTATION_ID=2010 |
| 580 |
+ USE_SUBNETPOOL=False |
|
| 580 | 581 |
|
| 581 | 582 |
[[post-config|/$Q_PLUGIN_CONF_FILE]] |
| 582 | 583 |
[macvtap] |
| ... | ... |
@@ -80,6 +80,7 @@ PRIVATE_SUBNET_NAME=${PRIVATE_SUBNET_NAME:-"private-subnet"}
|
| 80 | 80 |
PUBLIC_SUBNET_NAME=${PUBLIC_SUBNET_NAME:-"public-subnet"}
|
| 81 | 81 |
|
| 82 | 82 |
# Subnetpool defaults |
| 83 |
+USE_SUBNETPOOL=${USE_SUBNETPOOL:-True}
|
|
| 83 | 84 |
SUBNETPOOL_NAME=${SUBNETPOOL_NAME:-"shared-default-subnetpool"}
|
| 84 | 85 |
|
| 85 | 86 |
SUBNETPOOL_PREFIX_V4=${SUBNETPOOL_PREFIX_V4:-10.0.0.0/8}
|
| ... | ... |
@@ -168,11 +169,13 @@ function create_neutron_initial_network {
|
| 168 | 168 |
fi |
| 169 | 169 |
|
| 170 | 170 |
if is_networking_extension_supported "auto-allocated-topology"; then |
| 171 |
- if [[ "$IP_VERSION" =~ 4.* ]]; then |
|
| 172 |
- 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) |
|
| 173 |
- fi |
|
| 174 |
- if [[ "$IP_VERSION" =~ .*6 ]]; then |
|
| 175 |
- 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) |
|
| 171 |
+ if [[ "$USE_SUBNETPOOL" == "True" ]]; then |
|
| 172 |
+ if [[ "$IP_VERSION" =~ 4.* ]]; then |
|
| 173 |
+ 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) |
|
| 174 |
+ fi |
|
| 175 |
+ if [[ "$IP_VERSION" =~ .*6 ]]; then |
|
| 176 |
+ 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) |
|
| 177 |
+ fi |
|
| 176 | 178 |
fi |
| 177 | 179 |
fi |
| 178 | 180 |
|