mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-07-25 01:04:28 +00:00
Merge "Bump min openstacksdk version for os_network/{port_security_enabled,mtu}"
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
bugfixes:
|
||||||
|
- Bump the minimum openstacksdk version to 0.18.0 when os_network
|
||||||
|
uses the port_security_enabled or mtu arguments.
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
bugfixes:
|
bugfixes:
|
||||||
- bump the minimum openstacksdk version when os_network
|
- Bump the minimum openstacksdk version to 0.29.0 when os_network
|
||||||
uses the dns_domain argument
|
uses the dns_domain argument.
|
||||||
|
|||||||
@@ -67,13 +67,13 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Whether port security is enabled on the network or not.
|
- Whether port security is enabled on the network or not.
|
||||||
Network will use OpenStack defaults if this option is
|
Network will use OpenStack defaults if this option is
|
||||||
not utilised.
|
not utilised. Requires openstacksdk>=0.18.
|
||||||
type: bool
|
type: bool
|
||||||
mtu:
|
mtu:
|
||||||
description:
|
description:
|
||||||
- The maximum transmission unit (MTU) value to address fragmentation.
|
- The maximum transmission unit (MTU) value to address fragmentation.
|
||||||
Network will use OpenStack defaults if this option is
|
Network will use OpenStack defaults if this option is
|
||||||
not provided.
|
not provided. Requires openstacksdk>=0.18.
|
||||||
type: int
|
type: int
|
||||||
dns_domain:
|
dns_domain:
|
||||||
description:
|
description:
|
||||||
@@ -195,16 +195,22 @@ def main():
|
|||||||
provider_segmentation_id = module.params['provider_segmentation_id']
|
provider_segmentation_id = module.params['provider_segmentation_id']
|
||||||
project = module.params['project']
|
project = module.params['project']
|
||||||
|
|
||||||
net_create_kwargs = {
|
net_create_kwargs = {}
|
||||||
'port_security_enabled': module.params['port_security_enabled'],
|
min_version = None
|
||||||
'mtu_size': module.params['mtu']
|
|
||||||
}
|
if module.params['mtu'] is not None:
|
||||||
|
min_version = '0.18.0'
|
||||||
|
net_create_kwargs['mtu_size'] = module.params['mtu']
|
||||||
|
|
||||||
|
if module.params['port_security_enabled'] is not None:
|
||||||
|
min_version = '0.18.0'
|
||||||
|
net_create_kwargs['port_security_enabled'] = module.params['port_security_enabled']
|
||||||
|
|
||||||
if module.params['dns_domain'] is not None:
|
if module.params['dns_domain'] is not None:
|
||||||
sdk, cloud = openstack_cloud_from_module(module, min_version='0.29.0')
|
min_version = '0.29.0'
|
||||||
net_create_kwargs['dns_domain'] = module.params['dns_domain']
|
net_create_kwargs['dns_domain'] = module.params['dns_domain']
|
||||||
else:
|
|
||||||
sdk, cloud = openstack_cloud_from_module(module)
|
sdk, cloud = openstack_cloud_from_module(module, min_version)
|
||||||
try:
|
try:
|
||||||
if project is not None:
|
if project is not None:
|
||||||
proj = cloud.get_project(project)
|
proj = cloud.get_project(project)
|
||||||
|
|||||||
Reference in New Issue
Block a user