summaryrefslogtreecommitdiff
path: root/novaclient/base.py
diff options
context:
space:
mode:
authorJens Rosenboom <j.rosenboom@x-ion.de>2016-07-19 12:10:26 +0200
committerAndrey Kurilin <akurilin@mirantis.com>2016-08-03 12:18:14 +0300
commit454350ff6d4351c573addb93377f9794d26c7c79 (patch)
tree3f9b4d42c55b744094406e60e7d420559fb4b19f /novaclient/base.py
parent48da89e2a297e44125cb88aa284cf99bf87c2b1f (diff)
downloadpython-novaclient-454350ff6d4351c573addb93377f9794d26c7c79.tar.gz
Fix python35 job failures
- Installation of the cryptography module fails on Ubuntu Xenial because the libssl-dev package needs to be installed first, so we add this to other-requirements.txt - inspect.getargspec()` was deprecated in Python 3.0 and will be removed in 3.6 (ETA late 2016). From Python 3.5 it started throwing a deprecation warning which leds some tests failures. Co-Authored-By: Andrey Kurilin <andr.kurilin@gmail.com> Change-Id: Ic094ca5c636af9ac1e212914df910a020d92702d
Diffstat (limited to 'novaclient/base.py')
-rw-r--r--novaclient/base.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/novaclient/base.py b/novaclient/base.py
index 6ef27168..14485e5e 100644
--- a/novaclient/base.py
+++ b/novaclient/base.py
@@ -23,10 +23,10 @@ import abc
import contextlib
import copy
import hashlib
-import inspect
import os
import threading
+from oslo_utils import reflection
from oslo_utils import strutils
from requests import Response
import six
@@ -407,14 +407,14 @@ class ManagerWithFind(Manager):
detailed = True
list_kwargs = {}
- list_argspec = inspect.getargspec(self.list)
- if 'detailed' in list_argspec.args:
+ list_argspec = reflection.get_callable_args(self.list)
+ if 'detailed' in list_argspec:
detailed = ("human_id" not in kwargs and
"name" not in kwargs and
"display_name" not in kwargs)
list_kwargs['detailed'] = detailed
- if 'is_public' in list_argspec.args and 'is_public' in kwargs:
+ if 'is_public' in list_argspec and 'is_public' in kwargs:
is_public = kwargs['is_public']
list_kwargs['is_public'] = is_public
if is_public is None:
@@ -422,7 +422,7 @@ class ManagerWithFind(Manager):
del tmp_kwargs['is_public']
searches = tmp_kwargs.items()
- if 'search_opts' in list_argspec.args:
+ if 'search_opts' in list_argspec:
# pass search_opts in to do server side based filtering.
# TODO(jogo) not all search_opts support regex, find way to
# identify when to use regex and when to use string matching.