mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #26044 from rallytime/fix-25616
Make sure the key we're comparing is also lowercase
This commit is contained in:
commit
dedcadc37e
@ -515,17 +515,16 @@ if HAS_LINODEPY:
|
||||
# No, let's try to match it against the full
|
||||
# name and the abbreviation and return the id
|
||||
for key in locations:
|
||||
if str(loc).lower() in (key,
|
||||
if str(loc).lower() in (str(key).lower(),
|
||||
str(locations[key]['id']).lower(),
|
||||
str(locations[key]['abbreviation']).
|
||||
lower()):
|
||||
str(locations[key]['abbreviation']).lower()):
|
||||
return locations[key]['id']
|
||||
else:
|
||||
return loc
|
||||
|
||||
# No match. Return None, cloud provider will
|
||||
# use a default or throw an exception
|
||||
return None
|
||||
# No match. Return default Linode data center location, which is Dallas
|
||||
# Dallas is represented by '2' in the Linode API.
|
||||
return 2
|
||||
|
||||
def get_disk_size(vm_, size, swap):
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user