From a3f809eb998275fb1f8decb2c1a5e18206e8f44d Mon Sep 17 00:00:00 2001 From: Sagi Shnaidman Date: Fri, 15 Jan 2021 19:34:30 +0200 Subject: [PATCH] Remove protocols choice in security rules Security group rule can support a lot of protocols now and their integer representations in 0-255 range. Let's not limit for this option anymore. Change-Id: I0432e5d5d6d5f5ce935cf59a00f35153649c22dd --- plugins/modules/security_group_rule.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/plugins/modules/security_group_rule.py b/plugins/modules/security_group_rule.py index 6a0e0c99..87f0f0b9 100644 --- a/plugins/modules/security_group_rule.py +++ b/plugins/modules/security_group_rule.py @@ -19,8 +19,7 @@ options: type: str protocol: description: - - IP protocols ANY TCP UDP ICMP 112 (VRRP) 132 (SCTP) - choices: ['any', 'tcp', 'udp', 'icmp', '112', '132', None] + - IP protocols ANY TCP UDP ICMP and others, also number in range 0-255 type: str port_range_min: description: @@ -246,14 +245,11 @@ class SecurityGroupRuleModule(OpenStackModule): argument_spec = dict( security_group=dict(required=True), - # NOTE(Shrews): None is an acceptable protocol value for - # Neutron, but Nova will balk at this. - protocol=dict(default=None, - choices=[None, 'any', 'tcp', 'udp', 'icmp', '112', '132']), + protocol=dict(type='str'), port_range_min=dict(required=False, type='int'), port_range_max=dict(required=False, type='int'), - remote_ip_prefix=dict(required=False, default=None), - remote_group=dict(required=False, default=None), + remote_ip_prefix=dict(required=False), + remote_group=dict(required=False), ethertype=dict(default='IPv4', choices=['IPv4', 'IPv6']), direction=dict(default='ingress',