mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
ec2 network_interfaces fix
This commit is contained in:
parent
f65e663353
commit
7a393df080
@ -1152,10 +1152,17 @@ def _create_eni_if_necessary(interface):
|
||||
|
||||
for subnet_query_result in subnet_query:
|
||||
if 'item' in subnet_query_result:
|
||||
for subnet in subnet_query_result['item']:
|
||||
if subnet['subnetId'] == interface['SubnetId']:
|
||||
found = True
|
||||
break
|
||||
if type(subnet_query_result['item']) is dict:
|
||||
for key, value in subnet_query_result['item'].iteritems():
|
||||
if key == "subnetId":
|
||||
if value == interface['SubnetId']:
|
||||
found = True
|
||||
break
|
||||
else:
|
||||
for subnet in subnet_query_result['item']:
|
||||
if subnet['subnetId'] == interface['SubnetId']:
|
||||
found = True
|
||||
break
|
||||
|
||||
if not found:
|
||||
raise SaltCloudConfigError(
|
||||
|
Loading…
Reference in New Issue
Block a user