Merge "Handle log message interpolation by the logger in compute/"
This commit is contained in:
@@ -128,8 +128,8 @@ class DeleteAggregate(command.Command):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
result += 1
|
result += 1
|
||||||
LOG.error(_("Failed to delete aggregate with name or "
|
LOG.error(_("Failed to delete aggregate with name or "
|
||||||
"ID '%(aggregate)s': %(e)s")
|
"ID '%(aggregate)s': %(e)s"),
|
||||||
% {'aggregate': a, 'e': e})
|
{'aggregate': a, 'e': e})
|
||||||
|
|
||||||
if result > 0:
|
if result > 0:
|
||||||
total = len(parsed_args.aggregate)
|
total = len(parsed_args.aggregate)
|
||||||
|
@@ -171,7 +171,7 @@ class CreateFlavor(command.ShowOne):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
msg = _("Failed to add project %(project)s access to "
|
msg = _("Failed to add project %(project)s access to "
|
||||||
"flavor: %(e)s")
|
"flavor: %(e)s")
|
||||||
LOG.error(msg % {'project': parsed_args.project, 'e': e})
|
LOG.error(msg, {'project': parsed_args.project, 'e': e})
|
||||||
if parsed_args.property:
|
if parsed_args.property:
|
||||||
try:
|
try:
|
||||||
flavor.set_keys(parsed_args.property)
|
flavor.set_keys(parsed_args.property)
|
||||||
@@ -208,8 +208,7 @@ class DeleteFlavor(command.Command):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
result += 1
|
result += 1
|
||||||
LOG.error(_("Failed to delete flavor with name or "
|
LOG.error(_("Failed to delete flavor with name or "
|
||||||
"ID '%(flavor)s': %(e)s")
|
"ID '%(flavor)s': %(e)s"), {'flavor': f, 'e': e})
|
||||||
% {'flavor': f, 'e': e})
|
|
||||||
|
|
||||||
if result > 0:
|
if result > 0:
|
||||||
total = len(parsed_args.flavor)
|
total = len(parsed_args.flavor)
|
||||||
@@ -412,7 +411,7 @@ class ShowFlavor(command.ShowOne):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
msg = _("Failed to get access projects list "
|
msg = _("Failed to get access projects list "
|
||||||
"for flavor '%(flavor)s': %(e)s")
|
"for flavor '%(flavor)s': %(e)s")
|
||||||
LOG.error(msg % {'flavor': parsed_args.flavor, 'e': e})
|
LOG.error(msg, {'flavor': parsed_args.flavor, 'e': e})
|
||||||
|
|
||||||
flavor = resource_flavor._info.copy()
|
flavor = resource_flavor._info.copy()
|
||||||
flavor.update({
|
flavor.update({
|
||||||
|
@@ -106,8 +106,7 @@ class DeleteKeypair(command.Command):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
result += 1
|
result += 1
|
||||||
LOG.error(_("Failed to delete key with name "
|
LOG.error(_("Failed to delete key with name "
|
||||||
"'%(name)s': %(e)s")
|
"'%(name)s': %(e)s"), {'name': n, 'e': e})
|
||||||
% {'name': n, 'e': e})
|
|
||||||
|
|
||||||
if result > 0:
|
if result > 0:
|
||||||
total = len(parsed_args.name)
|
total = len(parsed_args.name)
|
||||||
|
@@ -50,8 +50,7 @@ class DeleteService(command.Command):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
result += 1
|
result += 1
|
||||||
LOG.error(_("Failed to delete compute service with "
|
LOG.error(_("Failed to delete compute service with "
|
||||||
"ID '%(service)s': %(e)s")
|
"ID '%(service)s': %(e)s"), {'service': s, 'e': e})
|
||||||
% {'service': s, 'e': e})
|
|
||||||
|
|
||||||
if result > 0:
|
if result > 0:
|
||||||
total = len(parsed_args.service)
|
total = len(parsed_args.service)
|
||||||
|
Reference in New Issue
Block a user