mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
use old discover_extensions if available
This was moved in 2.24.0, but this should work for everything back to 2.6.1 Closes #29557
This commit is contained in:
parent
ecbc60ba05
commit
d0ffa520f4
@ -46,7 +46,7 @@ def check_nova():
|
||||
min_ver = LooseVersion(NOVACLIENT_MINVER)
|
||||
if novaclient_ver >= min_ver:
|
||||
return HAS_NOVA
|
||||
log.debug('Newer novaclient version required. Minimum: 2.6.1')
|
||||
log.debug('Newer novaclient version required. Minimum: {0}'.format(NOVACLIENT_MINVER))
|
||||
return False
|
||||
|
||||
|
||||
@ -143,7 +143,7 @@ class SaltNova(OpenStackComputeShell):
|
||||
self.kwargs = kwargs.copy()
|
||||
|
||||
if not novaclient.base.Manager._hooks_map:
|
||||
self.extensions = client.discover_extensions('1.1')
|
||||
self.extensions = getattr(self, '_discover_extensions', client.discover_extensions)('1.1')
|
||||
for extension in self.extensions:
|
||||
extension.run_hooks('__pre_parse_args__')
|
||||
self.kwargs['extensions'] = self.extensions
|
||||
|
Loading…
Reference in New Issue
Block a user