From 6e4c2c61bda2aff34e402f7b50c8f6804bb7a4d8 Mon Sep 17 00:00:00 2001 From: Dominik Holler Date: Sun, 7 Jul 2019 11:00:09 +0200 Subject: [PATCH] Remove redundant line in os_port (#57838) * Remove redundant line in os_port The renaming of the key 'vnic_type' to 'binding:vnic_type' is reduced to a single line. The old key is removed to avoid to possibility of inconsistency. * Add missing parameter in example of os_port In the example "Create port of type 'direct'" the parameter "network" is added, because this parameter is required on creating new ports. --- lib/ansible/modules/cloud/openstack/os_port.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/cloud/openstack/os_port.py b/lib/ansible/modules/cloud/openstack/os_port.py index 5eb3801631c..e1e9df73c5a 100644 --- a/lib/ansible/modules/cloud/openstack/os_port.py +++ b/lib/ansible/modules/cloud/openstack/os_port.py @@ -162,6 +162,7 @@ EXAMPLES = ''' password: admin project_name: admin name: port1 + network: foo vnic_type: direct ''' @@ -356,8 +357,7 @@ def main(): # Neutron API accept 'binding:vnic_type' as an argument # for the port type. - module.params['binding:vnic_type'] = module.params['vnic_type'] - module.params.pop('vnic_type', None) + module.params['binding:vnic_type'] = module.params.pop('vnic_type') port = None network_id = None