From d1b78db89aab171028a1c9278c5c0ce914806ef4 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 19 Jul 2013 23:22:57 +0200 Subject: [PATCH] Sync requirements with OpenStack/requirements Fixes proper casing of requirements Allows usage of Hacking 0.6, which has a few extra checks (Fix fallout). Raises keystoneclient minimum requirement to match those required by other projects. Change-Id: I4604a62aa07e5026d219dc6e5b8b4c23b3caa3f1 --- ironic/cmd/ironic_deploy_helper.py | 5 +++-- ironic/common/exception.py | 9 ++++++--- ironic/common/utils.py | 9 ++++++--- ironic/objects/base.py | 3 ++- requirements.txt | 15 +++++++-------- test-requirements.txt | 6 +++--- 6 files changed, 27 insertions(+), 20 deletions(-) diff --git a/ironic/cmd/ironic_deploy_helper.py b/ironic/cmd/ironic_deploy_helper.py index 20584fae05..5c23ab1ee4 100644 --- a/ironic/cmd/ironic_deploy_helper.py +++ b/ironic/cmd/ironic_deploy_helper.py @@ -208,7 +208,7 @@ def deploy(address, port, iqn, lun, image_path, pxe_config_path, login_iscsi(address, port, iqn) try: root_uuid = work_on_disk(dev, root_mb, swap_mb, image_path) - except exception.ProcessExecutionError, err: + except exception.ProcessExecutionError as err: with excutils.save_and_reraise_exception(): # Log output if there was a error LOG.error("Cmd : %s" % err.cmd) @@ -242,7 +242,8 @@ class Worker(threading.Thread): else: # Requests comes here from BareMetalDeploy.post() LOG.info(_('start deployment for node %(node_id)s, ' - 'params %(params)s') % locals()) + 'params %(params)s') % + {'node_id': node_id, 'params': params}) context = ironic_context.get_admin_context() try: db.bm_node_update(context, node_id, diff --git a/ironic/common/exception.py b/ironic/common/exception.py index 983ffaeeb2..cb21e9eb8c 100644 --- a/ironic/common/exception.py +++ b/ironic/common/exception.py @@ -57,9 +57,12 @@ class ProcessExecutionError(IOError): description = _('Unexpected error while running command.') if exit_code is None: exit_code = '-' - message = _('%(description)s\nCommand: %(cmd)s\n' - 'Exit code: %(exit_code)s\nStdout: %(stdout)r\n' - 'Stderr: %(stderr)r') % locals() + message = (_('%(description)s\nCommand: %(cmd)s\n' + 'Exit code: %(exit_code)s\nStdout: %(stdout)r\n' + 'Stderr: %(stderr)r') % + {'description': description, 'cmd': cmd, + 'exit_code': exit_code, 'stdout': stdout, + 'stderr': stderr}) IOError.__init__(self, message) diff --git a/ironic/common/utils.py b/ironic/common/utils.py index 5ec420e8e9..64a247365f 100644 --- a/ironic/common/utils.py +++ b/ironic/common/utils.py @@ -547,7 +547,8 @@ def unlink_without_raise(path): if e.errno == errno.ENOENT: return else: - LOG.warn(_("Failed to unlink %(path)s, error: %(e)s") % locals()) + LOG.warn(_("Failed to unlink %(path)s, error: %(e)s") % + {'path': path, 'e': e}) def rmtree_without_raise(path): @@ -555,7 +556,8 @@ def rmtree_without_raise(path): if os.path.isdir(path): shutil.rmtree(path) except OSError as e: - LOG.warn(_("Failed to remove dir %(path)s, error: %(e)s") % locals()) + LOG.warn(_("Failed to remove dir %(path)s, error: %(e)s") % + {'path': path, 'e': e}) def write_to_file(path, contents): @@ -571,4 +573,5 @@ def create_link_without_raise(source, link): return else: LOG.warn(_("Failed to create symlink from %(source)s to %(link)s" - ", error: %(e)s") % locals()) + ", error: %(e)s") % + {'source': source, 'link': link, 'e': e}) diff --git a/ironic/objects/base.py b/ironic/objects/base.py index ccc26fb6f2..9d5581edb7 100644 --- a/ironic/objects/base.py +++ b/ironic/objects/base.py @@ -296,7 +296,8 @@ class IronicObject(object): be useful for future load operations. """ raise NotImplementedError( - _("Cannot load '%(attrname)s' in the base class") % locals()) + _("Cannot load '%(attrname)s' in the base class") % + {'attrname': attrname}) def save(self, context): """Save the changed fields back to the store. diff --git a/requirements.txt b/requirements.txt index fb5c50b286..4b6fc4253d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,25 +1,24 @@ d2to1>=0.2.10,<0.3 pbr>=0.5.16,<0.6 -sqlalchemy>=0.7,<=0.7.99 +SQLAlchemy>=0.7,<=0.7.99 amqplib>=0.6.1 anyjson>=0.3.3 argparse eventlet>=0.12.0 -kombu>2.4.7 +kombu>=2.4.8 lxml>=2.3 -webob>=1.2.3,<1.3 +WebOb>=1.2.3,<1.3 greenlet>=0.3.2 sqlalchemy-migrate>=0.7 netaddr paramiko>=1.8.0 iso8601>=0.1.4 setuptools_git>=0.4 -python-quantumclient>=2.2.0 python-neutronclient>=2.2.3,<3 python-glanceclient>=0.9.0 -python-keystoneclient>=0.2.1 -stevedore>=0.9 -websockify<0.4 +python-keystoneclient>=0.3.0 +stevedore>=0.10 +websockify>=0.5.1,<0.6 oslo.config>=1.1.0 pecan>=0.2.0 -wsme>=0.5b2 +WSME>=0.5b2 diff --git a/test-requirements.txt b/test-requirements.txt index 6f7e3e2b00..076eeb9836 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,14 +2,14 @@ pep8==1.4.5 pyflakes==0.7.2 flake8==2.0 -hacking>=0.5.6,<0.6 +hacking>=0.5.6,<0.7 coverage>=3.6 discover fixtures>=0.3.12 mox>=0.5.3 Babel>=0.9.6 -mysql-python +MySQL-python python-subunit sphinx>=1.1.2 -testrepository>=0.0.15 +testrepository>=0.0.17 testtools>=0.9.32