Skip to content

Commit

Permalink
fix issue #77
Browse files Browse the repository at this point in the history
- fix the logic to determine API version
  • Loading branch information
tchiapuziowong committed Aug 1, 2023
1 parent e10436c commit 9903d54
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tags: [
hpe,
datacenter
]
version: 1.6.0
version: 1.7.0
authors:
- "Ti Chiapuzio-Wong"
- "Sunil Veeramachaneni"
Expand Down
6 changes: 4 additions & 2 deletions plugins/action/arubaoss.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ def run(self, tmp=None, task_vars=None):

display.vvvv('connection transport is %s for %s'
% (transport, self._play_context.remote_addr))
if not provider.get('api_version') is None:
if provider.get('api_version') != "None":
api = provider.get('api_version')
if api not in ['v1.0', 'v2.0', 'v2.1', 'v2.2',
'v3.0', 'v3.1', 'v4.0', 'v5.0']:
provider['api_version'] = None
# Latest API version is discovered in another
# function - this is a backup in case failure
provider['api_version'] = "v6.0"
display.vvvv('%s is not valid api version.'
'using aossapi v6.0 instead' % api)
else:
Expand Down

0 comments on commit 9903d54

Please sign in to comment.