mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #25170 from rallytime/bp-24982
Back-port #24982 to 2015.5
This commit is contained in:
commit
3e06602545
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