Fix failure due to API version check

(cherry picked from commit dfe02d1ff4)
pull/62026/head
Simon Dodsley 5 years ago committed by Toshio Kuratomi
parent 97100bbea2
commit 93e8f4cef0

@ -0,0 +1,3 @@
bugfixes:
- purefa_info - Fix missing API version check when calling I(admins) or I(all) as the subset
- _purefa_facts - Fix missing API version check when calling I(admins) or I(all) as the subset

@ -340,6 +340,7 @@ from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.pure import get_system, purefa_argument_spec
ADMIN_API_VERSION = '1.14'
S3_REQUIRED_API_VERSION = '1.16'
LATENCY_REQUIRED_API_VERSION = '1.16'
AC_REQUIRED_API_VERSION = '1.14'
@ -461,7 +462,9 @@ def generate_config_dict(array):
def generate_admin_dict(array):
api_version = array._list_available_rest_versions()
admin_facts = {}
if ADMIN_API_VERSION in api_version:
admins = array.list_admins()
for admin in range(0, len(admins)):
admin_name = admins[admin]['name']

@ -408,6 +408,7 @@ from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.pure import get_system, purefa_argument_spec
import time
ADMIN_API_VERSION = '1.14'
S3_REQUIRED_API_VERSION = '1.16'
LATENCY_REQUIRED_API_VERSION = '1.16'
AC_REQUIRED_API_VERSION = '1.14'
@ -530,6 +531,8 @@ def generate_config_dict(array):
def generate_admin_dict(array):
admin_info = {}
api_version = array._list_available_rest_versions()
if ADMIN_API_VERSION in api_version:
admins = array.list_admins()
for admin in range(0, len(admins)):
admin_name = admins[admin]['name']

Loading…
Cancel
Save