mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
ec2 network_interfaces fix
This commit is contained in:
parent
3599b8abab
commit
3e6eab3ae9
1 changed files with 11 additions and 4 deletions
|
@ -1148,10 +1148,17 @@ def _create_eni(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…
Add table
Reference in a new issue