Browse Source

Fix issue updating single segment networks

Updating single segment networks created with this
module failed with:
  "Cannot update provider:physical_network in
   existing network"

Single segment networks have the physical_network
set at the network level. For multi-segment networks
the physical_network is only set on the segments.

Due to the incremental addition of support for multiple
segments in THT the nameing convention for the base
segment and additional segments are not identical.

This change relaxes the test for physical_network
change not allowed so that it accepts both naming
conventions.

Change-Id: Ie66907eb1953b671031bd42ad9e40760cfe1a84c
changes/00/763800/2
Harald Jensås 5 months ago
parent
commit
feb3ce7e9a
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      tripleo_ansible/ansible_plugins/modules/tripleo_composable_network.py

+ 2
- 2
tripleo_ansible/ansible_plugins/modules/tripleo_composable_network.py View File

@ -167,8 +167,8 @@ def validate_network_update(module, network, net_spec):
# NOTE(hjensas): When a network have multiple segments,
# attributes provider:network_type, provider:physical_network is None
# for the network.
if (network.provider_physical_network != net_spec.pop(
'provider:physical_network')
if (net_spec.pop('provider:physical_network')
not in [network.provider_physical_network, net_spec['name']]
and network.provider_physical_network is not None):
module.fail_json(
msg='Cannot update provider:physical_network in existing network')


Loading…
Cancel
Save