diff --git a/requirements.txt b/requirements.txt index c284bfde6..a4fac76d3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,7 @@ pbr>=0.5.21,<1.0 os-client-config +six python-novaclient python-keystoneclient>=0.11.0 diff --git a/shade/meta.py b/shade/meta.py index c0baa0078..992247ec3 100644 --- a/shade/meta.py +++ b/shade/meta.py @@ -13,6 +13,11 @@ # limitations under the License. +import six + +NON_CALLABLES = (six.string_types, bool, dict, int, list, type(None)) + + def find_nova_addresses(addresses, ext_tag=None, key_name=None, version=4): ret = [] @@ -133,6 +138,6 @@ def obj_to_dict(obj): instance = {} for key in dir(obj): value = getattr(obj, key) - if not callable(value) and not key.startswith('_'): + if isinstance(value, NON_CALLABLES) and not key.startswith('_'): instance[key] = value return instance