mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fixed 'all' protocol case for boto_secgroup state.
This commit is contained in:
parent
0361d39342
commit
78e22e6d38
1 changed files with 4 additions and 1 deletions
|
@ -274,10 +274,13 @@ def _get_rule_changes(rules, _rules):
|
|||
raise SaltInvocationError('ip_protocol, to_port, and from_port are'
|
||||
' required arguments for security group'
|
||||
' rules.')
|
||||
supported_protocols = ['tcp', 'udp', 'icmp', 'all']
|
||||
supported_protocols = ['tcp', 'udp', 'icmp', 'all', '-1']
|
||||
if ip_protocol not in supported_protocols:
|
||||
msg = ('Invalid ip_protocol {0} specified in security group rule.')
|
||||
raise SaltInvocationError(msg.format(ip_protocol))
|
||||
# For the 'all' case, we need to change the protocol name to '-1'.
|
||||
if ip_protocol == 'all':
|
||||
rule['ip_protocol'] = '-1'
|
||||
cidr_ip = rule.get('cidr_ip', None)
|
||||
group_name = rule.get('source_group_name', None)
|
||||
group_id = rule.get('source_group_group_id', None)
|
||||
|
|
Loading…
Add table
Reference in a new issue