From c046bd1ce0a591495114c99bde80e8ee82a2a96e Mon Sep 17 00:00:00 2001 From: slivik Date: Thu, 11 Oct 2018 15:45:13 +0200 Subject: [PATCH] pylint error --- salt/modules/nova.py | 1 + salt/utils/openstack/nova.py | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/salt/modules/nova.py b/salt/modules/nova.py index 29ebf723021e..10f80d61d857 100644 --- a/salt/modules/nova.py +++ b/salt/modules/nova.py @@ -87,6 +87,7 @@ HAS_NOVA = True except NameError as exc: HAS_NOVA = False + # Define the module's virtual name __virtualname__ = 'nova' diff --git a/salt/utils/openstack/nova.py b/salt/utils/openstack/nova.py index c30753d40a10..6ed638cdb536 100644 --- a/salt/utils/openstack/nova.py +++ b/salt/utils/openstack/nova.py @@ -78,6 +78,12 @@ def check_nova(): NOVACLIENT_MINVER) return False +if check_nova(): + try: + import novaclient.auth_plugin + except ImportError: + log.debug('Using novaclient version 7.0.0 or newer. Authentication ' + 'plugin auth_plugin.py is not available anymore.') # kwargs has to be an object instead of a dictionary for the __post_parse_arg__ class KwargsStruct(object):