Remove the openstack/common/cliutils.py to common/cliutils.py

The Oslo team has moved all previously incubated code from the
openstack/oslo-incubator repository into separate library repositories,
so should remove the openstack dir.

Change-Id: Id40ce410b00f15b771fec8ee3c65957b7bcd0639
This commit is contained in:
zhurong 2016-10-19 16:15:17 +08:00
parent 79297d200f
commit 526947d6ed
4 changed files with 11 additions and 10 deletions

View File

@ -32,7 +32,7 @@ import six
import yaml
from solumclient import client as solum_client
from solumclient.openstack.common import cliutils
from solumclient.common import cliutils
SOLUM_API_VERSION = '1'

View File

@ -19,8 +19,8 @@ import os
from oslo_log import log as logging
from solumclient import client as solum_client
from solumclient.common import cliutils
from solumclient.common import exc
from solumclient.openstack.common import cliutils
class CommandsBase(object):

View File

@ -279,18 +279,16 @@ def find_resource(manager, name_or_id, **find_args):
return manager.find(**kwargs)
except exceptions.NotFound:
msg = _("No %(name)s with a name or "
"ID of '%(name_or_id)s' exists.") % \
{
"name": manager.resource_class.__name__.lower(),
"name_or_id": name_or_id
"ID of '%(name_or_id)s' exists.") % {
"name": manager.resource_class.__name__.lower(),
"name_or_id": name_or_id
}
raise exceptions.CommandError(msg)
except exceptions.NoUniqueMatch:
msg = _("Multiple %(name)s matches found for "
"'%(name_or_id)s', use an ID to be more specific.") % \
{
"name": manager.resource_class.__name__.lower(),
"name_or_id": name_or_id
"'%(name_or_id)s', use an ID to be more specific.") % {
"name": manager.resource_class.__name__.lower(),
"name_or_id": name_or_id
}
raise exceptions.CommandError(msg)

View File

@ -38,3 +38,6 @@ show-source = True
ignore = E123,E125,H803
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
[hacking]
import_exceptions = solumclient.i18n