Merge "Solve some py3 compatibilty issues"
This commit is contained in:
		@@ -106,17 +106,17 @@ class ListCommand(Command, Lister):
 | 
			
		||||
 | 
			
		||||
class GetCommand(Command, ShowOne):
 | 
			
		||||
    def post_execute(self, results):
 | 
			
		||||
        return results.keys(), results.values()
 | 
			
		||||
        return list(six.iterkeys(results)), list(six.itervalues(results))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class CreateCommand(Command, ShowOne):
 | 
			
		||||
    def post_execute(self, results):
 | 
			
		||||
        return results.keys(), results.values()
 | 
			
		||||
        return list(six.iterkeys(results)), list(six.itervalues(results))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class UpdateCommand(Command, ShowOne):
 | 
			
		||||
    def post_execute(self, results):
 | 
			
		||||
        return results.keys(), results.values()
 | 
			
		||||
        return list(six.iterkeys(results)), list(six.itervalues(results))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class DeleteCommand(Command, ShowOne):
 | 
			
		||||
 
 | 
			
		||||
@@ -124,6 +124,6 @@ def Client(version, *args, **kwargs):  # noqa
 | 
			
		||||
    versions = get_versions()
 | 
			
		||||
    if version not in versions:
 | 
			
		||||
        msg = 'Version %s is not supported, use one of (%s)' % (
 | 
			
		||||
            version, versions.keys())
 | 
			
		||||
            version, list(six.iterkeys(versions)))
 | 
			
		||||
        raise exceptions.UnsupportedVersion(msg)
 | 
			
		||||
    return versions[version](*args, **kwargs)
 | 
			
		||||
 
 | 
			
		||||
@@ -23,6 +23,7 @@ from keystoneclient.auth.identity import generic
 | 
			
		||||
from keystoneclient.auth import token_endpoint
 | 
			
		||||
from keystoneclient import session as ks_session
 | 
			
		||||
import pkg_resources
 | 
			
		||||
import six
 | 
			
		||||
 | 
			
		||||
from designateclient import exceptions
 | 
			
		||||
 | 
			
		||||
@@ -94,7 +95,8 @@ def get_columns(data):
 | 
			
		||||
    def _seen(col):
 | 
			
		||||
        columns.add(str(col))
 | 
			
		||||
 | 
			
		||||
    map(lambda item: map(_seen, item.keys()), data)
 | 
			
		||||
    six.moves.map(lambda item: six.moves.map(_seen,
 | 
			
		||||
                  list(six.iterkeys(item))), data)
 | 
			
		||||
    return list(columns)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -20,6 +20,7 @@ import copy
 | 
			
		||||
import logging
 | 
			
		||||
 | 
			
		||||
import jsonschema
 | 
			
		||||
import six
 | 
			
		||||
 | 
			
		||||
LOG = logging.getLogger(__name__)
 | 
			
		||||
 | 
			
		||||
@@ -112,19 +113,19 @@ def model_factory(schema):
 | 
			
		||||
            dict.update(self, other)
 | 
			
		||||
 | 
			
		||||
        def iteritems(self):
 | 
			
		||||
            return copy.deepcopy(dict(self)).iteritems()
 | 
			
		||||
            return six.iteritems(copy.deepcopy(dict(self)))
 | 
			
		||||
 | 
			
		||||
        def items(self):
 | 
			
		||||
            return copy.deepcopy(dict(self)).items()
 | 
			
		||||
            return list(six.iteritems(copy.deepcopy(dict(self))))
 | 
			
		||||
 | 
			
		||||
        def itervalues(self):
 | 
			
		||||
            return copy.deepcopy(dict(self)).itervalues()
 | 
			
		||||
            return six.itervalues(copy.deepcopy(dict(self)))
 | 
			
		||||
 | 
			
		||||
        def keys(self):
 | 
			
		||||
            return copy.deepcopy(dict(self)).keys()
 | 
			
		||||
            return list(six.iterkeys(copy.deepcopy(dict(self))))
 | 
			
		||||
 | 
			
		||||
        def values(self):
 | 
			
		||||
            return copy.deepcopy(dict(self)).values()
 | 
			
		||||
            return list(six.itervalues(copy.deepcopy(dict(self))))
 | 
			
		||||
 | 
			
		||||
        @property
 | 
			
		||||
        def changes(self):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user