mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
EC2 cloud: Fix another availability zone mismatch, preventing cloud.profile state from working correctly
This commit is contained in:
parent
c02ab4d278
commit
9f1d4ab9b0
@ -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:
|
||||
@ -1084,7 +1084,7 @@ 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
|
||||
'''
|
||||
@ -1092,9 +1092,9 @@ def _list_availability_zones():
|
||||
|
||||
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')
|
||||
|
Loading…
Reference in New Issue
Block a user