|
|
@ -338,8 +338,6 @@ except ImportError:
|
|
|
|
# This is handled in azure_rm_common
|
|
|
|
# This is handled in azure_rm_common
|
|
|
|
pass
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
NAME_PATTERN = re.compile(r"^[a-zA-Z0-9._-]+$")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def validate_rule(rule, rule_type=None):
|
|
|
|
def validate_rule(rule, rule_type=None):
|
|
|
|
'''
|
|
|
|
'''
|
|
|
@ -352,8 +350,6 @@ def validate_rule(rule, rule_type=None):
|
|
|
|
|
|
|
|
|
|
|
|
if not rule.get('name'):
|
|
|
|
if not rule.get('name'):
|
|
|
|
raise Exception("Rule name value is required.")
|
|
|
|
raise Exception("Rule name value is required.")
|
|
|
|
if not NAME_PATTERN.match(rule.get('name')):
|
|
|
|
|
|
|
|
raise Exception("Rule name must contain only word characters plus '.','-','_'")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
priority = rule.get('priority', None)
|
|
|
|
priority = rule.get('priority', None)
|
|
|
|
if not priority:
|
|
|
|
if not priority:
|
|
|
@ -551,9 +547,6 @@ class AzureRMSecurityGroup(AzureRMModuleBase):
|
|
|
|
# Set default location
|
|
|
|
# Set default location
|
|
|
|
self.location = resource_group.location
|
|
|
|
self.location = resource_group.location
|
|
|
|
|
|
|
|
|
|
|
|
if not NAME_PATTERN.match(self.name):
|
|
|
|
|
|
|
|
self.fail("Parameter error: name must contain only word characters and '.','-','_'")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if self.rules:
|
|
|
|
if self.rules:
|
|
|
|
for rule in self.rules:
|
|
|
|
for rule in self.rules:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|