mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #28058 from rallytime/bp-28041
Back-port #28041 to 2015.8
This commit is contained in:
commit
9adcd3b90d
1 changed files with 6 additions and 2 deletions
|
@ -14,7 +14,11 @@ import salt.ext.six as six
|
|||
HAS_NOVA = False
|
||||
# pylint: disable=import-error
|
||||
try:
|
||||
from novaclient.v1_1 import client
|
||||
try:
|
||||
from novaclient.v2 import client
|
||||
except ImportError:
|
||||
from novaclient.v1_1 import client
|
||||
from novaclient import client as nclient
|
||||
from novaclient.shell import OpenStackComputeShell
|
||||
import novaclient.utils
|
||||
import novaclient.auth_plugin
|
||||
|
@ -134,7 +138,7 @@ class SaltNova(OpenStackComputeShell):
|
|||
self.kwargs = kwargs.copy()
|
||||
|
||||
if not novaclient.base.Manager._hooks_map:
|
||||
self.extensions = self._discover_extensions('1.1')
|
||||
self.extensions = nclient.discover_extensions('1.1')
|
||||
for extension in self.extensions:
|
||||
extension.run_hooks('__pre_parse_args__')
|
||||
self.kwargs['extensions'] = self.extensions
|
||||
|
|
Loading…
Add table
Reference in a new issue