diff --git a/lib/ansible/module_utils/avi.py b/lib/ansible/module_utils/avi.py index 2a62107a36..6c7196f3a9 100644 --- a/lib/ansible/module_utils/avi.py +++ b/lib/ansible/module_utils/avi.py @@ -33,13 +33,13 @@ from __future__ import absolute_import import os -from pkg_resources import parse_version +from distutils.version import LooseVersion HAS_AVI = True try: import avi.sdk sdk_version = getattr(avi.sdk, '__version__', None) - if ((sdk_version is None) or (sdk_version and (parse_version(sdk_version) < parse_version('17.1')))): + if ((sdk_version is None) or (sdk_version and (LooseVersion(sdk_version) < LooseVersion('17.1')))): # It allows the __version__ to be '' as that value is used in development builds raise ImportError from avi.sdk.utils.ansible_utils import avi_ansible_api diff --git a/test/sanity/import/skip.txt b/test/sanity/import/skip.txt index 17b71f528f..1e9de8c2d0 100644 --- a/test/sanity/import/skip.txt +++ b/test/sanity/import/skip.txt @@ -1,5 +1,4 @@ lib/ansible/module_utils/ansible_tower.py -lib/ansible/module_utils/avi.py lib/ansible/modules/cloud/amazon/cloudtrail.py lib/ansible/modules/cloud/amazon/ec2_vpc_igw.py lib/ansible/modules/cloud/amazon/ec2_vpc_route_table.py