Skip to content

Commit

Permalink
Merge pull request #25394 from rallytime/bp-25355
Browse files Browse the repository at this point in the history
Back-port #25355 to 2015.8
  • Loading branch information
jfindlay committed Jul 14, 2015
2 parents 2b5c2b3 + 9f1d4ab commit 17daf76
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions salt/cloud/clouds/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ def get_availability_zone(vm_):
if avz is None:
return None

zones = _list_availability_zones()
zones = _list_availability_zones(vm_)

# Validate user-specified AZ
if avz not in zones:
Expand Down Expand Up @@ -1084,17 +1084,17 @@ def get_provider(vm_=None):
return provider


def _list_availability_zones():
def _list_availability_zones(vm_=None):
'''
List all availability zones in the current region
'''
ret = {}

params = {'Action': 'DescribeAvailabilityZones',
'Filter.0.Name': 'region-name',
'Filter.0.Value.0': get_location()}
'Filter.0.Value.0': get_location(vm_)}
result = aws.query(params,
location=get_location(),
location=get_location(vm_),
provider=get_provider(),
opts=__opts__,
sigver='4')
Expand Down

0 comments on commit 17daf76

Please sign in to comment.