Remove ordereddict as 2.6 is no longer supported
ordereddict, and a related workaround method, were removed as we no longer support python 2.6. Collections contains ordereddict on newer python versions. Change-Id: I48cc55a5c56fbc1f71442fc858eb4905f0213988
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
import collections
|
||||||
import functools
|
import functools
|
||||||
import inspect
|
import inspect
|
||||||
import threading
|
import threading
|
||||||
@@ -22,7 +23,6 @@ import six
|
|||||||
|
|
||||||
from ironic_python_agent import encoding
|
from ironic_python_agent import encoding
|
||||||
from ironic_python_agent import errors
|
from ironic_python_agent import errors
|
||||||
from ironic_python_agent import utils
|
|
||||||
|
|
||||||
LOG = log.getLogger()
|
LOG = log.getLogger()
|
||||||
|
|
||||||
@@ -206,7 +206,7 @@ class BaseAgentExtension(object):
|
|||||||
class ExecuteCommandMixin(object):
|
class ExecuteCommandMixin(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.command_lock = threading.Lock()
|
self.command_lock = threading.Lock()
|
||||||
self.command_results = utils.get_ordereddict()
|
self.command_results = collections.OrderedDict()
|
||||||
self.ext_mgr = None
|
self.ext_mgr = None
|
||||||
|
|
||||||
def get_extension(self, extension_name):
|
def get_extension(self, extension_name):
|
||||||
|
@@ -12,7 +12,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import collections
|
|
||||||
import copy
|
import copy
|
||||||
import glob
|
import glob
|
||||||
import os
|
import os
|
||||||
@@ -46,15 +45,6 @@ SUPPORTED_ROOT_DEVICE_HINTS = set(('size', 'model', 'wwn', 'serial', 'vendor'))
|
|||||||
AGENT_PARAMS_CACHED = dict()
|
AGENT_PARAMS_CACHED = dict()
|
||||||
|
|
||||||
|
|
||||||
def get_ordereddict(*args, **kwargs):
|
|
||||||
"""A fix for py26 not having ordereddict."""
|
|
||||||
try:
|
|
||||||
return collections.OrderedDict(*args, **kwargs)
|
|
||||||
except AttributeError:
|
|
||||||
import ordereddict
|
|
||||||
return ordereddict.OrderedDict(*args, **kwargs)
|
|
||||||
|
|
||||||
|
|
||||||
def execute(*cmd, **kwargs):
|
def execute(*cmd, **kwargs):
|
||||||
"""Convenience wrapper around oslo's execute() method."""
|
"""Convenience wrapper around oslo's execute() method."""
|
||||||
result = processutils.execute(*cmd, **kwargs)
|
result = processutils.execute(*cmd, **kwargs)
|
||||||
|
@@ -6,7 +6,6 @@ Babel>=1.3
|
|||||||
eventlet>=0.17.4
|
eventlet>=0.17.4
|
||||||
iso8601>=0.1.9
|
iso8601>=0.1.9
|
||||||
netifaces>=0.10.4
|
netifaces>=0.10.4
|
||||||
ordereddict
|
|
||||||
oslo.config>=2.3.0 # Apache-2.0
|
oslo.config>=2.3.0 # Apache-2.0
|
||||||
oslo.concurrency>=2.3.0 # Apache-2.0
|
oslo.concurrency>=2.3.0 # Apache-2.0
|
||||||
oslo.i18n>=1.5.0 # Apache-2.0
|
oslo.i18n>=1.5.0 # Apache-2.0
|
||||||
|
Reference in New Issue
Block a user