Sort version list on azure_rm_aksversion_facts (#60820)
This commit is contained in:
parent
dae2040717
commit
5027416fb5
1 changed files with 4 additions and 2 deletions
|
@ -101,7 +101,7 @@ class AzureRMAKSVersion(AzureRMModuleBase):
|
|||
def get_all_versions(self, location, version):
|
||||
'''
|
||||
Get all kubernetes version supported by AKS
|
||||
:return: version list
|
||||
:return: ordered version list
|
||||
'''
|
||||
try:
|
||||
result = dict()
|
||||
|
@ -112,7 +112,9 @@ class AzureRMAKSVersion(AzureRMModuleBase):
|
|||
if version:
|
||||
return result.get(version) or []
|
||||
else:
|
||||
return result.keys()
|
||||
keys = list(result.keys())
|
||||
keys.sort()
|
||||
return keys
|
||||
except Exception as exc:
|
||||
self.fail('Error when getting AKS supported kubernetes version list for location {0} - {1}'.format(self.location, exc.message or str(exc)))
|
||||
|
||||
|
|
Loading…
Reference in a new issue