Skip to content

Commit

Permalink
Merge pull request #25311 from ruzarowski/2015.8-Add-ability-to-attac…
Browse files Browse the repository at this point in the history
…h-existing-interface

[cloud:EC2] Add ability to attach an existing eni
  • Loading branch information
Nicole Thomas committed Jul 13, 2015
2 parents 2fe94b7 + 2c72bd8 commit b16d86a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions salt/cloud/clouds/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1141,6 +1141,10 @@ def _create_eni_if_necessary(interface):
'''
Create an Elastic Interface if necessary and return a Network Interface Specification
'''
if 'NetworkInterfaceId' in interface and interface['NetworkInterfaceId'] is not None:
return {'DeviceIndex': interface['DeviceIndex'],
'NetworkInterfaceId': interface['NetworkInterfaceId']}

params = {'Action': 'DescribeSubnets'}
subnet_query = aws.query(params,
return_root=True,
Expand Down

0 comments on commit b16d86a

Please sign in to comment.