mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #3861 from djoreilly/quantum_net_types
quantum_network should not default network provider type to local
This commit is contained in:
commit
4ca5db0a57
1 changed files with 10 additions and 5 deletions
|
@ -64,11 +64,11 @@ options:
|
|||
- Name to be assigned to the nework
|
||||
required: true
|
||||
default: None
|
||||
network_type:
|
||||
provider_network_type:
|
||||
description:
|
||||
- The type of the network to be created, gre, vlan, local.
|
||||
- The type of the network to be created, gre, vlan, local. Available types depend on the plugin. The Quantum service decides if not specified.
|
||||
required: false
|
||||
default: local
|
||||
default: None
|
||||
provider_physical_network:
|
||||
description:
|
||||
- The physical network which would realize the virtual network for flat and vlan networks.
|
||||
|
@ -199,7 +199,12 @@ def _create_network(module, quantum):
|
|||
|
||||
if module.params['provider_network_type'] == 'gre':
|
||||
network.pop('provider:physical_network', None)
|
||||
|
||||
|
||||
if module.params['provider_network_type'] is None:
|
||||
network.pop('provider:network_type', None)
|
||||
network.pop('provider:physical_network', None)
|
||||
network.pop('provider:segmentation_id', None)
|
||||
|
||||
try:
|
||||
net = quantum.create_network({'network':network})
|
||||
except Exception as e:
|
||||
|
@ -225,7 +230,7 @@ def main():
|
|||
region_name = dict(default=None),
|
||||
name = dict(required=True),
|
||||
tenant_name = dict(default=None),
|
||||
provider_network_type = dict(default='local', choices=['local', 'vlan', 'flat', 'gre']),
|
||||
provider_network_type = dict(default=None, choices=['local', 'vlan', 'flat', 'gre']),
|
||||
provider_physical_network = dict(default=None),
|
||||
provider_segmentation_id = dict(default=None),
|
||||
router_external = dict(default=False, type='bool'),
|
||||
|
|
Loading…
Reference in a new issue