coerce azure securitygroup priority to int (#27354)

* fixes #22686
* would be better served in the future by using subspec, but it's in too much flux right now
pull/24540/head
Matt Davis 7 years ago committed by GitHub
parent bfdf85e002
commit 53ebe8d441

@ -367,7 +367,11 @@ def validate_rule(rule, rule_type=None):
if not priority:
raise Exception("Rule priority is required.")
if not isinstance(priority, integer_types):
raise Exception("Rule priority attribute must be an integer.")
try:
priority = int(priority)
rule['priority'] = priority
except:
raise Exception("Rule priority attribute must be an integer.")
if rule_type != 'default' and (priority < 100 or priority > 4096):
raise Exception("Rule priority must be between 100 and 4096")

Loading…
Cancel
Save