quantum_network should not default network provider type to local

It should allow the Quantum service to decide based on its configuration.
This commit is contained in:
Darragh O'Reilly 2013-08-15 19:51:22 +01:00
parent 10a0f03cdc
commit fb42efc355

View file

@ -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'),