From 4df55bea2f638974aa060e2aa397d0f06721c67a Mon Sep 17 00:00:00 2001 From: Dominik Holler Date: Tue, 19 Feb 2019 00:26:03 +0100 Subject: [PATCH] provider_segmentation_id is int (#51600) According to the OpenStack Networking API the attribute provider:segmentation_id of a network has to be an integer. Even if neutron accepts provider:segmentation_id to be a string, other implementations may not. --- .../fragments/51600-provider_segmentation_id-is-int.yaml | 5 +++++ lib/ansible/modules/cloud/openstack/os_network.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/51600-provider_segmentation_id-is-int.yaml diff --git a/changelogs/fragments/51600-provider_segmentation_id-is-int.yaml b/changelogs/fragments/51600-provider_segmentation_id-is-int.yaml new file mode 100644 index 0000000000..f8a1e4c07f --- /dev/null +++ b/changelogs/fragments/51600-provider_segmentation_id-is-int.yaml @@ -0,0 +1,5 @@ +--- +bugfixes: + - os_network - According to the OpenStack Networking API the attribute + provider:segmentation_id of a network has to be an integer. + (https://github.com/ansible/ansible/issues/51655) diff --git a/lib/ansible/modules/cloud/openstack/os_network.py b/lib/ansible/modules/cloud/openstack/os_network.py index f699b4ac2f..f717707288 100644 --- a/lib/ansible/modules/cloud/openstack/os_network.py +++ b/lib/ansible/modules/cloud/openstack/os_network.py @@ -161,7 +161,7 @@ def main(): external=dict(default=False, type='bool'), provider_physical_network=dict(required=False), provider_network_type=dict(required=False), - provider_segmentation_id=dict(required=False), + provider_segmentation_id=dict(required=False, type='int'), state=dict(default='present', choices=['absent', 'present']), project=dict(default=None), port_security_enabled=dict(default=False, type='bool')