Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quantum_network should not default network provider type to local #3861

Merged
merged 1 commit into from
Aug 27, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 10 additions & 5 deletions library/cloud/quantum_network
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand All @@ -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'),
Expand Down