Merge "Add i18n translation to others 1/3"
This commit is contained in:
commit
f644fdcdb5
|
@ -288,8 +288,8 @@ class SimpleInstance(object):
|
|||
def datastore_status(self, datastore_status):
|
||||
if datastore_status and not isinstance(datastore_status,
|
||||
InstanceServiceStatus):
|
||||
raise ValueError("datastore_status must be of type "
|
||||
"InstanceServiceStatus. Got %s instead." %
|
||||
raise ValueError(_("datastore_status must be of type "
|
||||
"InstanceServiceStatus. Got %s instead.") %
|
||||
datastore_status.__class__.__name__)
|
||||
self.__datastore_status = datastore_status
|
||||
|
||||
|
@ -483,9 +483,9 @@ def get_db_info(context, id, cluster_id=None, include_deleted=False):
|
|||
:rtype: trove.instance.models.DBInstance
|
||||
"""
|
||||
if context is None:
|
||||
raise TypeError("Argument context not defined.")
|
||||
raise TypeError(_("Argument context not defined."))
|
||||
elif id is None:
|
||||
raise TypeError("Argument id not defined.")
|
||||
raise TypeError(_("Argument id not defined."))
|
||||
|
||||
args = {'id': id}
|
||||
if cluster_id is not None:
|
||||
|
@ -1418,7 +1418,7 @@ class Instances(object):
|
|||
return SimpleInstance(context, db_info, status)
|
||||
|
||||
if context is None:
|
||||
raise TypeError("Argument context not defined.")
|
||||
raise TypeError(_("Argument context not defined."))
|
||||
client = create_nova_client(context)
|
||||
servers = client.servers.list()
|
||||
query_opts = {'tenant_id': context.tenant,
|
||||
|
|
|
@ -46,9 +46,9 @@ class Modules(object):
|
|||
@staticmethod
|
||||
def load(context, datastore=None):
|
||||
if context is None:
|
||||
raise TypeError("Argument context not defined.")
|
||||
raise TypeError(_("Argument context not defined."))
|
||||
elif id is None:
|
||||
raise TypeError("Argument is not defined.")
|
||||
raise TypeError(_("Argument is not defined."))
|
||||
|
||||
query_opts = {'deleted': False}
|
||||
if datastore:
|
||||
|
@ -75,9 +75,9 @@ class Modules(object):
|
|||
def load_auto_apply(context, datastore_id, datastore_version_id):
|
||||
"""Return all the auto-apply modules for the given criteria."""
|
||||
if context is None:
|
||||
raise TypeError("Argument context not defined.")
|
||||
raise TypeError(_("Argument context not defined."))
|
||||
elif id is None:
|
||||
raise TypeError("Argument is not defined.")
|
||||
raise TypeError(_("Argument is not defined."))
|
||||
|
||||
query_opts = {'deleted': False,
|
||||
'auto_apply': True}
|
||||
|
@ -113,9 +113,9 @@ class Modules(object):
|
|||
for other tenants, unless the user is admin.
|
||||
"""
|
||||
if context is None:
|
||||
raise TypeError("Argument context not defined.")
|
||||
raise TypeError(_("Argument context not defined."))
|
||||
elif id is None:
|
||||
raise TypeError("Argument is not defined.")
|
||||
raise TypeError(_("Argument is not defined."))
|
||||
|
||||
modules = []
|
||||
if module_ids:
|
||||
|
|
Loading…
Reference in New Issue