|
|
@ -720,7 +720,7 @@ class ELBListenerRules(object):
|
|
|
|
current_condition['SourceIpConfig']['Values'][0] == condition['SourceIpConfig']['Values'][0]):
|
|
|
|
current_condition['SourceIpConfig']['Values'][0] == condition['SourceIpConfig']['Values'][0]):
|
|
|
|
condition_found = True
|
|
|
|
condition_found = True
|
|
|
|
break
|
|
|
|
break
|
|
|
|
elif current_condition['Field'] == condition['Field'] and current_condition['Values'][0] == condition['Values'][0]:
|
|
|
|
elif current_condition['Field'] == condition['Field'] and current_condition['Values'] == condition['Values']:
|
|
|
|
condition_found = True
|
|
|
|
condition_found = True
|
|
|
|
break
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
|
@ -735,7 +735,7 @@ class ELBListenerRules(object):
|
|
|
|
modified_rule = {}
|
|
|
|
modified_rule = {}
|
|
|
|
|
|
|
|
|
|
|
|
# Priority
|
|
|
|
# Priority
|
|
|
|
if int(current_rule['Priority']) != new_rule['Priority']:
|
|
|
|
if int(current_rule['Priority']) != int(new_rule['Priority']):
|
|
|
|
modified_rule['Priority'] = new_rule['Priority']
|
|
|
|
modified_rule['Priority'] = new_rule['Priority']
|
|
|
|
|
|
|
|
|
|
|
|
# Actions
|
|
|
|
# Actions
|
|
|
@ -757,8 +757,6 @@ class ELBListenerRules(object):
|
|
|
|
if len(current_rule['Actions']) == 1 and len(new_rule['Actions']) == 1:
|
|
|
|
if len(current_rule['Actions']) == 1 and len(new_rule['Actions']) == 1:
|
|
|
|
if current_rule['Actions'] != new_rule['Actions']:
|
|
|
|
if current_rule['Actions'] != new_rule['Actions']:
|
|
|
|
modified_rule['Actions'] = new_rule['Actions']
|
|
|
|
modified_rule['Actions'] = new_rule['Actions']
|
|
|
|
print("modified_rule:")
|
|
|
|
|
|
|
|
print(new_rule['Actions'])
|
|
|
|
|
|
|
|
# if actions have multiple elements, we'll have to order them first before comparing.
|
|
|
|
# if actions have multiple elements, we'll have to order them first before comparing.
|
|
|
|
# multiple actions will have an 'Order' key for this purpose
|
|
|
|
# multiple actions will have an 'Order' key for this purpose
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|