mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Use int in the parameter list instead of casting
This commit is contained in:
parent
2c3fc61357
commit
4f2028439f
1 changed files with 5 additions and 5 deletions
|
@ -96,8 +96,8 @@ def _find_matching_rule(module, secgroup):
|
||||||
:returns: The matching rule dict, or None if no matches.
|
:returns: The matching rule dict, or None if no matches.
|
||||||
"""
|
"""
|
||||||
protocol = module.params['protocol']
|
protocol = module.params['protocol']
|
||||||
port_range_min = int(module.params['port_range_min'])
|
port_range_min = module.params['port_range_min']
|
||||||
port_range_max = int(module.params['port_range_max'])
|
port_range_max = module.params['port_range_max']
|
||||||
remote_ip_prefix = module.params['remote_ip_prefix']
|
remote_ip_prefix = module.params['remote_ip_prefix']
|
||||||
ethertype = module.params['ethertype']
|
ethertype = module.params['ethertype']
|
||||||
direction = module.params['direction']
|
direction = module.params['direction']
|
||||||
|
@ -145,8 +145,8 @@ def main():
|
||||||
security_group = dict(required=True),
|
security_group = dict(required=True),
|
||||||
protocol = dict(default='tcp',
|
protocol = dict(default='tcp',
|
||||||
choices=['tcp', 'udp', 'icmp']),
|
choices=['tcp', 'udp', 'icmp']),
|
||||||
port_range_min = dict(required=True),
|
port_range_min = dict(required=True, type='int'),
|
||||||
port_range_max = dict(required=True),
|
port_range_max = dict(required=True, type='int'),
|
||||||
remote_ip_prefix = dict(required=False, default=None),
|
remote_ip_prefix = dict(required=False, default=None),
|
||||||
# TODO(mordred): Make remote_group handle name and id
|
# TODO(mordred): Make remote_group handle name and id
|
||||||
remote_group = dict(required=False, default=None),
|
remote_group = dict(required=False, default=None),
|
||||||
|
@ -214,4 +214,4 @@ def main():
|
||||||
from ansible.module_utils.basic import *
|
from ansible.module_utils.basic import *
|
||||||
from ansible.module_utils.openstack import *
|
from ansible.module_utils.openstack import *
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Reference in a new issue