|
|
|
@ -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.
|
|
|
|
@ -200,6 +200,11 @@ 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'),
|
|
|
|
|