Remove gettext_lazy of log message in nexus/profile impl
Marking log messages as translatable brings useless pain to tranlators and all other log messages in Horizon are not marked as translatable. Feedback from translators community Change-Id: I13b20eacc5fda28011578e38290c9aea9a7ab600 Closes-Bug: #1230097
This commit is contained in:
parent
56d47fc938
commit
5ddf7a3539
@ -597,8 +597,8 @@ def port_modify(request, port_id, **kwargs):
|
||||
|
||||
|
||||
def profile_list(request, type_p, **params):
|
||||
LOG.debug(_("profile_list(): "
|
||||
"profile_type=%(profile_type)s, params=%(params)s"),
|
||||
LOG.debug("profile_list(): "
|
||||
"profile_type=%(profile_type)s, params=%(params)s",
|
||||
{'profile_type': type_p, 'params': params})
|
||||
if type_p == 'network':
|
||||
profiles = neutronclient(request).list_network_profiles(
|
||||
@ -610,8 +610,8 @@ def profile_list(request, type_p, **params):
|
||||
|
||||
|
||||
def profile_get(request, profile_id, **params):
|
||||
LOG.debug(_("profile_get(): "
|
||||
"profileid=%(profileid)s, params=%(params)s"),
|
||||
LOG.debug("profile_get(): "
|
||||
"profileid=%(profileid)s, params=%(params)s",
|
||||
{'profileid': profile_id, 'params': params})
|
||||
profile = neutronclient(request).show_network_profile(
|
||||
profile_id, **params).get('network_profile')
|
||||
@ -619,7 +619,7 @@ def profile_get(request, profile_id, **params):
|
||||
|
||||
|
||||
def profile_create(request, **kwargs):
|
||||
LOG.debug(_("profile_create(): kwargs=%s") % kwargs)
|
||||
LOG.debug("profile_create(): kwargs=%s", kwargs)
|
||||
body = {'network_profile': {}}
|
||||
body['network_profile'].update(kwargs)
|
||||
profile = neutronclient(request).create_network_profile(
|
||||
@ -628,13 +628,13 @@ def profile_create(request, **kwargs):
|
||||
|
||||
|
||||
def profile_delete(request, profile_id):
|
||||
LOG.debug(_("profile_delete(): profile_id=%s") % profile_id)
|
||||
LOG.debug("profile_delete(): profile_id=%s", profile_id)
|
||||
neutronclient(request).delete_network_profile(profile_id)
|
||||
|
||||
|
||||
def profile_modify(request, profile_id, **kwargs):
|
||||
LOG.debug(_("profile_modify(): "
|
||||
"profileid=%(profileid)s, kwargs=%(kwargs)s"),
|
||||
LOG.debug("profile_modify(): "
|
||||
"profileid=%(profileid)s, kwargs=%(kwargs)s",
|
||||
{'profileid': profile_id, 'kwargs': kwargs})
|
||||
body = {'network_profile': kwargs}
|
||||
profile = neutronclient(request).update_network_profile(
|
||||
@ -643,8 +643,8 @@ def profile_modify(request, profile_id, **kwargs):
|
||||
|
||||
|
||||
def profile_bindings_list(request, type_p, **params):
|
||||
LOG.debug(_("profile_bindings_list(): "
|
||||
"profile_type=%(profile_type)s params=%(params)s"),
|
||||
LOG.debug("profile_bindings_list(): "
|
||||
"profile_type=%(profile_type)s params=%(params)s",
|
||||
{'profile_type': type_p, 'params': params})
|
||||
if type_p == 'network':
|
||||
bindings = neutronclient(request).list_network_profile_bindings(
|
||||
|
@ -613,7 +613,7 @@ class LaunchInstance(workflows.Workflow):
|
||||
## HACK for now use first network
|
||||
if api.neutron.is_port_profiles_supported():
|
||||
net_id = context['network_id'][0]
|
||||
LOG.debug(_("Horizon->Create Port with %(netid)s %(profile_id)s"),
|
||||
LOG.debug("Horizon->Create Port with %(netid)s %(profile_id)s",
|
||||
{'netid': net_id, 'profile_id': context['profile_id']})
|
||||
try:
|
||||
port = api.neutron.port_create(request, net_id,
|
||||
|
@ -88,7 +88,7 @@ class CreateNetworkProfile(forms.SelfHandlingForm):
|
||||
|
||||
def handle(self, request, data):
|
||||
try:
|
||||
LOG.debug(_('request = %(req)s, params = %(params)s'),
|
||||
LOG.debug('request = %(req)s, params = %(params)s',
|
||||
{'req': request, 'params': data})
|
||||
profile = api.neutron.profile_create(request,
|
||||
name=data['name'],
|
||||
@ -136,7 +136,7 @@ class UpdateNetworkProfile(forms.SelfHandlingForm):
|
||||
|
||||
def handle(self, request, data):
|
||||
try:
|
||||
LOG.debug(_('request = %(req)s, params = %(params)s'),
|
||||
LOG.debug('request = %(req)s, params = %(params)s',
|
||||
{'req': request, 'params': data})
|
||||
profile = api.neutron.profile_modify(request,
|
||||
data['profile_id'],
|
||||
@ -153,7 +153,7 @@ class UpdateNetworkProfile(forms.SelfHandlingForm):
|
||||
messages.success(request, msg)
|
||||
return profile
|
||||
except Exception:
|
||||
LOG.error(_('Failed to update network profile (%s).') %
|
||||
LOG.error('Failed to update network profile (%s).',
|
||||
data['profile_id'])
|
||||
redirect = reverse('horizon:router:nexus1000v:index')
|
||||
exceptions.handle(request, msg, redirect=redirect)
|
||||
|
@ -125,7 +125,7 @@ class UpdateNetworkProfileView(forms.ModalFormView):
|
||||
try:
|
||||
self._object = api.neutron.profile_get(self.request,
|
||||
profile_id)
|
||||
LOG.debug(_("Network Profile object=%s") % self._object)
|
||||
LOG.debug("Network Profile object=%s", self._object)
|
||||
except Exception:
|
||||
redirect = self.success_url
|
||||
msg = _('Unable to retrieve network profile details.')
|
||||
|
Loading…
x
Reference in New Issue
Block a user