Merge "Fix missing marker functions"
This commit is contained in:
commit
6b38344496
|
@ -31,7 +31,7 @@ from nova import db
|
|||
from nova.db.sqlalchemy import api as db_api
|
||||
from nova.db.sqlalchemy import models
|
||||
from nova import exception
|
||||
from nova.i18n import _LE, _LW
|
||||
from nova.i18n import _, _LE, _LW
|
||||
from nova import notifications
|
||||
from nova import objects
|
||||
from nova.objects import base
|
||||
|
@ -838,7 +838,7 @@ class Instance(base.NovaPersistentObject, base.NovaObject,
|
|||
else:
|
||||
raise exception.ObjectActionError(
|
||||
action='obj_load_attr',
|
||||
reason='loading %s requires recursion' % attrname)
|
||||
reason=_('loading %s requires recursion') % attrname)
|
||||
|
||||
def _load_fault(self):
|
||||
self.fault = objects.InstanceFault.get_latest_for_instance(
|
||||
|
@ -1026,7 +1026,7 @@ class Instance(base.NovaPersistentObject, base.NovaObject,
|
|||
if attrname not in INSTANCE_OPTIONAL_ATTRS:
|
||||
raise exception.ObjectActionError(
|
||||
action='obj_load_attr',
|
||||
reason='attribute %s not lazy-loadable' % attrname)
|
||||
reason=_('attribute %s not lazy-loadable') % attrname)
|
||||
|
||||
if not self._context:
|
||||
raise exception.OrphanedObjectError(method='obj_load_attr',
|
||||
|
|
|
@ -16,6 +16,7 @@ from oslo_utils import versionutils
|
|||
|
||||
from nova import db
|
||||
from nova import exception
|
||||
from nova.i18n import _
|
||||
from nova import objects
|
||||
from nova.objects import base
|
||||
from nova.objects import fields
|
||||
|
@ -126,8 +127,8 @@ class Migration(base.NovaPersistentObject, base.NovaObject,
|
|||
if 'migration_type' not in updates:
|
||||
raise exception.ObjectActionError(
|
||||
action="create",
|
||||
reason="cannot create a Migration object without a "
|
||||
"migration_type set")
|
||||
reason=_("cannot create a Migration object without a "
|
||||
"migration_type set"))
|
||||
db_migration = db.migration_create(self._context, updates)
|
||||
self._from_db_object(self._context, self, db_migration)
|
||||
|
||||
|
|
|
@ -952,7 +952,7 @@ class LibvirtDriver(driver.ComputeDriver):
|
|||
'Code=%(errcode)s Error=%(e)s'),
|
||||
{'errcode': errcode, 'e': e},
|
||||
instance=instance)
|
||||
reason = "Error unfiltering instance."
|
||||
reason = _("Error unfiltering instance.")
|
||||
raise exception.InstanceTerminationFailure(reason=reason)
|
||||
except Exception:
|
||||
retry = False
|
||||
|
|
|
@ -113,8 +113,8 @@ class Host(object):
|
|||
if vm_counter == migrations_counter:
|
||||
return 'on_maintenance'
|
||||
else:
|
||||
raise exception.NoValidHost(reason='Unable to find suitable '
|
||||
'host for VMs evacuation')
|
||||
raise exception.NoValidHost(reason=_('Unable to find suitable '
|
||||
'host for VMs evacuation'))
|
||||
|
||||
def set_host_enabled(self, enabled):
|
||||
"""Sets the compute host's ability to accept new instances."""
|
||||
|
|
Loading…
Reference in New Issue