summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-09-24 08:52:25 +0000
committerGerrit Code Review <review@openstack.org>2014-09-24 08:52:25 +0000
commit813098e2c6c856a1074e9c4d189d8a22032e7b32 (patch)
treedc39f3b1f39c177ee2eb3cb18d0e05b4636ec10a
parent61762fef6a6de491ead4d9f39a4c6c145412a857 (diff)
parent739b3cac3210e6a1ce942238ca3efa3ddf49cb4d (diff)
downloadneutron-813098e2c6c856a1074e9c4d189d8a22032e7b32.tar.gz
Merge "Remove the translation tag for debug level logs in vmware plugin"
-rw-r--r--neutron/plugins/vmware/plugins/base.py66
-rw-r--r--neutron/plugins/vmware/plugins/service.py52
-rw-r--r--neutron/plugins/vmware/vshield/edge_appliance_driver.py44
-rw-r--r--neutron/plugins/vmware/vshield/tasks/tasks.py4
-rw-r--r--neutron/plugins/vmware/vshield/vcns.py6
5 files changed, 86 insertions, 86 deletions
diff --git a/neutron/plugins/vmware/plugins/base.py b/neutron/plugins/vmware/plugins/base.py
index 6dbf8ae356..3797891771 100644
--- a/neutron/plugins/vmware/plugins/base.py
+++ b/neutron/plugins/vmware/plugins/base.py
@@ -245,7 +245,7 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin,
port_data.get('id', 'fake'), port_data.get('name', 'fake'),
port_data.get('admin_state_up', True), ip_addresses,
port_data.get('mac_address'))
- LOG.debug(_("Created NSX router port:%s"), lrouter_port['uuid'])
+ LOG.debug("Created NSX router port:%s", lrouter_port['uuid'])
except api_exc.NsxApiException:
LOG.exception(_("Unable to create port on NSX logical router %s"),
nsx_router_id)
@@ -329,7 +329,7 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin,
attachment,
attachment_type,
attachment_vlan)
- LOG.debug(_("Attached %(att)s to NSX router port %(port)s"),
+ LOG.debug("Attached %(att)s to NSX router port %(port)s",
{'att': attachment, 'port': nsx_router_port_id})
except api_exc.NsxApiException:
# Must remove NSX logical port
@@ -460,9 +460,9 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin,
switchlib.plug_vif_interface(
self.cluster, selected_lswitch['uuid'],
lport['uuid'], "VifAttachment", port_data['id'])
- LOG.debug(_("_nsx_create_port completed for port %(name)s "
- "on network %(network_id)s. The new port id is "
- "%(id)s."), port_data)
+ LOG.debug("_nsx_create_port completed for port %(name)s "
+ "on network %(network_id)s. The new port id is "
+ "%(id)s.", port_data)
except (api_exc.NsxApiException, n_exc.NeutronException):
self._handle_create_port_exception(
context, port_data['id'],
@@ -483,7 +483,7 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin,
selected_lswitch['uuid'],
lport['uuid'])
except n_exc.NotFound:
- LOG.debug(_("NSX Port %s already gone"), lport['uuid'])
+ LOG.debug("NSX Port %s already gone", lport['uuid'])
def _nsx_delete_port(self, context, port_data):
# FIXME(salvatore-orlando): On the NSX platform we do not really have
@@ -498,15 +498,15 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin,
nsx_switch_id, nsx_port_id = nsx_utils.get_nsx_switch_and_port_id(
context.session, self.cluster, port_data['id'])
if not nsx_port_id:
- LOG.debug(_("Port '%s' was already deleted on NSX platform"), id)
+ LOG.debug("Port '%s' was already deleted on NSX platform", id)
return
# TODO(bgh): if this is a bridged network and the lswitch we just got
# back will have zero ports after the delete we should garbage collect
# the lswitch.
try:
switchlib.delete_port(self.cluster, nsx_switch_id, nsx_port_id)
- LOG.debug(_("_nsx_delete_port completed for port %(port_id)s "
- "on network %(net_id)s"),
+ LOG.debug("_nsx_delete_port completed for port %(port_id)s "
+ "on network %(net_id)s",
{'port_id': port_data['id'],
'net_id': port_data['network_id']})
except n_exc.NotFound:
@@ -571,9 +571,9 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin,
nsx_db.add_neutron_nsx_port_mapping(
context.session, port_data['id'],
selected_lswitch['uuid'], ls_port['uuid'])
- LOG.debug(_("_nsx_create_router_port completed for port "
- "%(name)s on network %(network_id)s. The new "
- "port id is %(id)s."),
+ LOG.debug("_nsx_create_router_port completed for port "
+ "%(name)s on network %(network_id)s. The new "
+ "port id is %(id)s.",
port_data)
except (api_exc.NsxApiException, n_exc.NeutronException):
self._handle_create_port_exception(
@@ -635,9 +635,9 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin,
physical_network,
ext_network[pnet.SEGMENTATION_ID])
- LOG.debug(_("_nsx_create_ext_gw_port completed on external network "
- "%(ext_net_id)s, attached to router:%(router_id)s. "
- "NSX port id is %(nsx_port_id)s"),
+ LOG.debug("_nsx_create_ext_gw_port completed on external network "
+ "%(ext_net_id)s, attached to router:%(router_id)s. "
+ "NSX port id is %(nsx_port_id)s",
{'ext_net_id': port_data['network_id'],
'router_id': nsx_router_id,
'nsx_port_id': lr_port['uuid']})
@@ -676,8 +676,8 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin,
raise nsx_exc.NsxPluginException(
err_msg=_("Unable to update logical router"
"on NSX Platform"))
- LOG.debug(_("_nsx_delete_ext_gw_port completed on external network "
- "%(ext_net_id)s, attached to NSX router:%(router_id)s"),
+ LOG.debug("_nsx_delete_ext_gw_port completed on external network "
+ "%(ext_net_id)s, attached to NSX router:%(router_id)s",
{'ext_net_id': port_data['network_id'],
'router_id': nsx_router_id})
@@ -718,9 +718,9 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin,
switchlib.delete_port(self.cluster,
selected_lswitch['uuid'],
lport['uuid'])
- LOG.debug(_("_nsx_create_l2_gw_port completed for port %(name)s "
- "on network %(network_id)s. The new port id "
- "is %(id)s."), port_data)
+ LOG.debug("_nsx_create_l2_gw_port completed for port %(name)s "
+ "on network %(network_id)s. The new port id "
+ "is %(id)s.", port_data)
def _nsx_create_fip_port(self, context, port_data):
# As we do not create ports for floating IPs in NSX,
@@ -846,7 +846,7 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin,
['lport_count'] < max_ports)].pop(0)
except IndexError:
# Too bad, no switch available
- LOG.debug(_("No switch has available ports (%d checked)"),
+ LOG.debug("No switch has available ports (%d checked)",
len(lswitches))
if allow_extra_lswitches:
# The 'main' logical switch is either the only one available
@@ -1145,8 +1145,8 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin,
port_data['device_owner'],
self._port_drivers['create']['default'])
port_create_func(context, port_data)
- LOG.debug(_("port created on NSX backend for tenant "
- "%(tenant_id)s: (%(id)s)"), port_data)
+ LOG.debug("port created on NSX backend for tenant "
+ "%(tenant_id)s: (%(id)s)", port_data)
except n_exc.NotFound:
LOG.warning(_("Logical switch for network %s was not "
"found in NSX."), port_data['network_id'])
@@ -1247,7 +1247,7 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin,
self._delete_port_queue_mapping(context, ret_port['id'])
self._process_port_queue_mapping(context, ret_port,
port_queue_id)
- LOG.debug(_("Updating port: %s"), port)
+ LOG.debug("Updating port: %s", port)
nsx_switch_id, nsx_port_id = nsx_utils.get_nsx_switch_and_port_id(
context.session, self.cluster, id)
# Convert Neutron security groups identifiers into NSX security
@@ -1683,8 +1683,8 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin,
# if needed.
self.handle_router_metadata_access(
context, router_id, interface=router_iface_info)
- LOG.debug(_("Add_router_interface completed for subnet:%(subnet_id)s "
- "and router:%(router_id)s"),
+ LOG.debug("Add_router_interface completed for subnet:%(subnet_id)s "
+ "and router:%(router_id)s",
{'subnet_id': subnet_id, 'router_id': router_id})
return router_iface_info
@@ -1974,7 +1974,7 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin,
min_num_rules_expected=1)
self._remove_floatingip_address(context, fip_db)
except sa_exc.NoResultFound:
- LOG.debug(_("The port '%s' is not associated with floating IPs"),
+ LOG.debug("The port '%s' is not associated with floating IPs",
port_id)
except n_exc.NotFound:
LOG.warning(_("Nat rules not found in nsx for port: %s"), id)
@@ -2141,9 +2141,9 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin,
query.update({'status': device_status,
'nsx_id': nsx_res['uuid']},
synchronize_session=False)
- LOG.debug(_("Neutron gateway device: %(neutron_id)s; "
- "NSX transport node identifier: %(nsx_id)s; "
- "Operational status: %(status)s."),
+ LOG.debug("Neutron gateway device: %(neutron_id)s; "
+ "NSX transport node identifier: %(nsx_id)s; "
+ "Operational status: %(status)s.",
{'neutron_id': neutron_id,
'nsx_id': nsx_res['uuid'],
'status': device_status})
@@ -2179,9 +2179,9 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin,
networkgw_db.NetworkGatewayDevice.id == neutron_id)
query.update({'status': device_status},
synchronize_session=False)
- LOG.debug(_("Neutron gateway device: %(neutron_id)s; "
- "NSX transport node identifier: %(nsx_id)s; "
- "Operational status: %(status)s."),
+ LOG.debug("Neutron gateway device: %(neutron_id)s; "
+ "NSX transport node identifier: %(nsx_id)s; "
+ "Operational status: %(status)s.",
{'neutron_id': neutron_id,
'nsx_id': nsx_id,
'status': device_status})
diff --git a/neutron/plugins/vmware/plugins/service.py b/neutron/plugins/vmware/plugins/service.py
index 1f5e503b61..d7e32e2f22 100644
--- a/neutron/plugins/vmware/plugins/service.py
+++ b/neutron/plugins/vmware/plugins/service.py
@@ -141,7 +141,7 @@ class NsxAdvancedPlugin(sr_db.ServiceRouter_mixin,
return self._router_type[router_id]
router = self._get_router(context, router_id)
- LOG.debug(_("EDGE: router = %s"), router)
+ LOG.debug("EDGE: router = %s", router)
if router['extra_attributes']['service_router']:
router_type = ROUTER_TYPE_ADVANCED
else:
@@ -172,7 +172,7 @@ class NsxAdvancedPlugin(sr_db.ServiceRouter_mixin,
# NOP for Edge because currently the port will be create internally
# by VSM
- LOG.debug(_("EDGE: _vcns_create_ext_gw_port"))
+ LOG.debug("EDGE: _vcns_create_ext_gw_port")
def _vcns_delete_ext_gw_port(self, context, port_data):
router_id = port_data['device_id']
@@ -181,7 +181,7 @@ class NsxAdvancedPlugin(sr_db.ServiceRouter_mixin,
return
# NOP for Edge
- LOG.debug(_("EDGE: _vcns_delete_ext_gw_port"))
+ LOG.debug("EDGE: _vcns_delete_ext_gw_port")
def _get_external_attachment_info(self, context, router):
gw_port = router.gw_port
@@ -336,7 +336,7 @@ class NsxAdvancedPlugin(sr_db.ServiceRouter_mixin,
if new_ext_net_id != org_ext_net_id and orgnexthop:
# network changed, need to remove default gateway before vnic
# can be configured
- LOG.debug(_("VCNS: delete default gateway %s"), orgnexthop)
+ LOG.debug("VCNS: delete default gateway %s", orgnexthop)
self._vcns_update_static_routes(context,
router=router,
edge_id=binding['edge_id'],
@@ -904,7 +904,7 @@ class NsxAdvancedPlugin(sr_db.ServiceRouter_mixin,
self.vcns_driver.delete_firewall(context, edge_id)
def create_firewall(self, context, firewall):
- LOG.debug(_("create_firewall() called"))
+ LOG.debug("create_firewall() called")
router_id = firewall['firewall'].get(vcns_const.ROUTER_ID)
if not router_id:
msg = _("router_id is not provided!")
@@ -938,7 +938,7 @@ class NsxAdvancedPlugin(sr_db.ServiceRouter_mixin,
return fw
def update_firewall(self, context, id, firewall):
- LOG.debug(_("update_firewall() called"))
+ LOG.debug("update_firewall() called")
self._ensure_firewall_update_allowed(context, id)
service_router_binding = self._get_resource_router_id_binding(
context, firewall_db.Firewall, resource_id=id)
@@ -964,7 +964,7 @@ class NsxAdvancedPlugin(sr_db.ServiceRouter_mixin,
return fw
def delete_firewall(self, context, id):
- LOG.debug(_("delete_firewall() called"))
+ LOG.debug("delete_firewall() called")
self._firewall_set_status(
context, id, service_constants.PENDING_DELETE)
service_router_binding = self._get_resource_router_id_binding(
@@ -1000,7 +1000,7 @@ class NsxAdvancedPlugin(sr_db.ServiceRouter_mixin,
return fws
def update_firewall_rule(self, context, id, firewall_rule):
- LOG.debug(_("update_firewall_rule() called"))
+ LOG.debug("update_firewall_rule() called")
self._ensure_update_or_delete_firewall_rule(context, id)
fwr_pre = self.get_firewall_rule(context, id)
fwr = super(NsxAdvancedPlugin, self).update_firewall_rule(
@@ -1026,7 +1026,7 @@ class NsxAdvancedPlugin(sr_db.ServiceRouter_mixin,
return fwr
def update_firewall_policy(self, context, id, firewall_policy):
- LOG.debug(_("update_firewall_policy() called"))
+ LOG.debug("update_firewall_policy() called")
self._ensure_firewall_policy_update_allowed(context, id)
firewall_rules_pre = self._make_firewall_rule_list_by_policy_id(
context, id)
@@ -1053,7 +1053,7 @@ class NsxAdvancedPlugin(sr_db.ServiceRouter_mixin,
return fwp
def insert_rule(self, context, id, rule_info):
- LOG.debug(_("insert_rule() called"))
+ LOG.debug("insert_rule() called")
self._ensure_firewall_policy_update_allowed(context, id)
fwp = super(NsxAdvancedPlugin, self).insert_rule(
context, id, rule_info)
@@ -1082,7 +1082,7 @@ class NsxAdvancedPlugin(sr_db.ServiceRouter_mixin,
return fwp
def remove_rule(self, context, id, rule_info):
- LOG.debug(_("remove_rule() called"))
+ LOG.debug("remove_rule() called")
self._ensure_firewall_policy_update_allowed(context, id)
fwp = super(NsxAdvancedPlugin, self).remove_rule(
context, id, rule_info)
@@ -1220,7 +1220,7 @@ class NsxAdvancedPlugin(sr_db.ServiceRouter_mixin,
self.vcns_driver.update_pool(context, edge_id, pool, members)
def create_vip(self, context, vip):
- LOG.debug(_("create_vip() called"))
+ LOG.debug("create_vip() called")
router_id = vip['vip'].get(vcns_const.ROUTER_ID)
if not router_id:
msg = _("router_id is not provided!")
@@ -1608,7 +1608,7 @@ class NsxAdvancedPlugin(sr_db.ServiceRouter_mixin,
LOG.exception(msg)
def create_vpnservice(self, context, vpnservice):
- LOG.debug(_("create_vpnservice() called"))
+ LOG.debug("create_vpnservice() called")
router_id = vpnservice['vpnservice'].get('router_id')
if not self._is_advanced_service_router(context, router_id):
msg = _("router_id:%s is not an advanced router!") % router_id
@@ -1729,7 +1729,7 @@ class VcnsCallbacks(object):
neutron_router_id = jobdata['neutron_router_id']
name = task.userdata['router_name']
if edge_id:
- LOG.debug(_("Start deploying %(edge_id)s for router %(name)s"), {
+ LOG.debug("Start deploying %(edge_id)s for router %(name)s", {
'edge_id': edge_id,
'name': name})
vcns_db.update_vcns_router_binding(
@@ -1756,10 +1756,10 @@ class VcnsCallbacks(object):
LOG.exception(_("Router %s not found"), lrouter['uuid'])
if task.status == tasks_const.TaskStatus.COMPLETED:
- LOG.debug(_("Successfully deployed %(edge_id)s for "
- "router %(name)s"), {
- 'edge_id': task.userdata['edge_id'],
- 'name': name})
+ LOG.debug("Successfully deployed %(edge_id)s for "
+ "router %(name)s", {
+ 'edge_id': task.userdata['edge_id'],
+ 'name': name})
if (router_db and
router_db['status'] == service_constants.PENDING_CREATE):
router_db['status'] = service_constants.ACTIVE
@@ -1772,7 +1772,7 @@ class VcnsCallbacks(object):
context.session, neutron_router_id,
status=service_constants.ACTIVE)
else:
- LOG.debug(_("Failed to deploy Edge for router %s"), name)
+ LOG.debug("Failed to deploy Edge for router %s", name)
if router_db:
router_db['status'] = service_constants.ERROR
vcns_db.update_vcns_router_binding(
@@ -1788,25 +1788,25 @@ class VcnsCallbacks(object):
router_id)
def interface_update_result(self, task):
- LOG.debug(_("interface_update_result %d"), task.status)
+ LOG.debug("interface_update_result %d", task.status)
def snat_create_result(self, task):
- LOG.debug(_("snat_create_result %d"), task.status)
+ LOG.debug("snat_create_result %d", task.status)
def snat_delete_result(self, task):
- LOG.debug(_("snat_delete_result %d"), task.status)
+ LOG.debug("snat_delete_result %d", task.status)
def dnat_create_result(self, task):
- LOG.debug(_("dnat_create_result %d"), task.status)
+ LOG.debug("dnat_create_result %d", task.status)
def dnat_delete_result(self, task):
- LOG.debug(_("dnat_delete_result %d"), task.status)
+ LOG.debug("dnat_delete_result %d", task.status)
def routes_update_result(self, task):
- LOG.debug(_("routes_update_result %d"), task.status)
+ LOG.debug("routes_update_result %d", task.status)
def nat_update_result(self, task):
- LOG.debug(_("nat_update_result %d"), task.status)
+ LOG.debug("nat_update_result %d", task.status)
def _process_base_create_lswitch_args(*args, **kwargs):
diff --git a/neutron/plugins/vmware/vshield/edge_appliance_driver.py b/neutron/plugins/vmware/vshield/edge_appliance_driver.py
index 5b71b09723..9ce708457b 100644
--- a/neutron/plugins/vmware/vshield/edge_appliance_driver.py
+++ b/neutron/plugins/vmware/vshield/edge_appliance_driver.py
@@ -156,7 +156,7 @@ class EdgeApplianceDriver(object):
def _update_interface(self, task):
edge_id = task.userdata['edge_id']
config = task.userdata['config']
- LOG.debug(_("VCNS: start updating vnic %s"), config)
+ LOG.debug("VCNS: start updating vnic %s", config)
try:
self.vcns.update_interface(edge_id, config)
except exceptions.VcnsApiException as e:
@@ -175,7 +175,7 @@ class EdgeApplianceDriver(object):
def update_interface(self, router_id, edge_id, index, network,
address=None, netmask=None, secondary=None,
jobdata=None):
- LOG.debug(_("VCNS: update vnic %(index)d: %(addr)s %(netmask)s"), {
+ LOG.debug("VCNS: update vnic %(index)d: %(addr)s %(netmask)s", {
'index': index, 'addr': address, 'netmask': netmask})
if index == vcns_const.EXTERNAL_VNIC_INDEX:
name = vcns_const.EXTERNAL_VNIC_NAME
@@ -205,7 +205,7 @@ class EdgeApplianceDriver(object):
def _deploy_edge(self, task):
userdata = task.userdata
name = userdata['router_name']
- LOG.debug(_("VCNS: start deploying edge %s"), name)
+ LOG.debug("VCNS: start deploying edge %s", name)
request = userdata['request']
try:
header = self.vcns.deploy_edge(request)[0]
@@ -213,7 +213,7 @@ class EdgeApplianceDriver(object):
job_id = objuri[objuri.rfind("/") + 1:]
response = self.vcns.get_edge_id(job_id)[1]
edge_id = response['edgeId']
- LOG.debug(_("VCNS: deploying edge %s"), edge_id)
+ LOG.debug("VCNS: deploying edge %s", edge_id)
userdata['edge_id'] = edge_id
status = constants.TaskStatus.PENDING
except exceptions.VcnsApiException:
@@ -253,7 +253,7 @@ class EdgeApplianceDriver(object):
"Abort.") % edge_id
LOG.exception(msg)
status = constants.TaskStatus.ERROR
- LOG.debug(_("VCNS: Edge %s status"), edge_id)
+ LOG.debug("VCNS: Edge %s status", edge_id)
return status
def _result_edge(self, task):
@@ -267,14 +267,14 @@ class EdgeApplianceDriver(object):
'status': task.status
})
else:
- LOG.debug(_("VCNS: Edge %(edge_id)s deployed for "
- "router %(name)s"), {
- 'edge_id': edge_id, 'name': router_name
- })
+ LOG.debug("VCNS: Edge %(edge_id)s deployed for "
+ "router %(name)s", {
+ 'edge_id': edge_id, 'name': router_name
+ })
def _delete_edge(self, task):
edge_id = task.userdata['edge_id']
- LOG.debug(_("VCNS: start destroying edge %s"), edge_id)
+ LOG.debug("VCNS: start destroying edge %s", edge_id)
status = constants.TaskStatus.COMPLETED
if edge_id:
try:
@@ -383,7 +383,7 @@ class EdgeApplianceDriver(object):
# TODO(fank): use POST for optimization
# return rule_id for future reference
rule = task.userdata['rule']
- LOG.debug(_("VCNS: start creating nat rules: %s"), rule)
+ LOG.debug("VCNS: start creating nat rules: %s", rule)
edge_id = task.userdata['edge_id']
nat = self.get_nat_config(edge_id)
location = task.userdata['location']
@@ -407,7 +407,7 @@ class EdgeApplianceDriver(object):
def create_snat_rule(self, router_id, edge_id, src, translated,
jobdata=None, location=None):
- LOG.debug(_("VCNS: create snat rule %(src)s/%(translated)s"), {
+ LOG.debug("VCNS: create snat rule %(src)s/%(translated)s", {
'src': src, 'translated': translated})
snat_rule = self._assemble_nat_rule("snat", src, translated)
userdata = {
@@ -430,7 +430,7 @@ class EdgeApplianceDriver(object):
edge_id = task.userdata['edge_id']
address = task.userdata['address']
addrtype = task.userdata['addrtype']
- LOG.debug(_("VCNS: start deleting %(type)s rules: %(addr)s"), {
+ LOG.debug("VCNS: start deleting %(type)s rules: %(addr)s", {
'type': addrtype, 'addr': address})
nat = self.get_nat_config(edge_id)
del nat['version']
@@ -448,7 +448,7 @@ class EdgeApplianceDriver(object):
return status
def delete_snat_rule(self, router_id, edge_id, src, jobdata=None):
- LOG.debug(_("VCNS: delete snat rule %s"), src)
+ LOG.debug("VCNS: delete snat rule %s", src)
userdata = {
'edge_id': edge_id,
'address': src,
@@ -466,7 +466,7 @@ class EdgeApplianceDriver(object):
jobdata=None, location=None):
# TODO(fank): use POST for optimization
# return rule_id for future reference
- LOG.debug(_("VCNS: create dnat rule %(dst)s/%(translated)s"), {
+ LOG.debug("VCNS: create dnat rule %(dst)s/%(translated)s", {
'dst': dst, 'translated': translated})
dnat_rule = self._assemble_nat_rule(
"dnat", dst, translated)
@@ -487,7 +487,7 @@ class EdgeApplianceDriver(object):
def delete_dnat_rule(self, router_id, edge_id, translated,
jobdata=None):
# TODO(fank): pass in rule_id for optimization
- LOG.debug(_("VCNS: delete dnat rule %s"), translated)
+ LOG.debug("VCNS: delete dnat rule %s", translated)
userdata = {
'edge_id': edge_id,
'address': translated,
@@ -511,7 +511,7 @@ class EdgeApplianceDriver(object):
return constants.TaskStatus.ABORT
rules = task.userdata['rules']
- LOG.debug(_("VCNS: start updating nat rules: %s"), rules)
+ LOG.debug("VCNS: start updating nat rules: %s", rules)
nat = {
'featureType': 'nat',
@@ -532,10 +532,10 @@ class EdgeApplianceDriver(object):
def update_nat_rules(self, router_id, edge_id, snats, dnats,
jobdata=None):
- LOG.debug(_("VCNS: update nat rule\n"
- "SNAT:%(snat)s\n"
- "DNAT:%(dnat)s\n"), {
- 'snat': snats, 'dnat': dnats})
+ LOG.debug("VCNS: update nat rule\n"
+ "SNAT:%(snat)s\n"
+ "DNAT:%(dnat)s\n", {
+ 'snat': snats, 'dnat': dnats})
nat_rules = []
for dnat in dnats:
@@ -570,7 +570,7 @@ class EdgeApplianceDriver(object):
return constants.TaskStatus.ABORT
gateway = task.userdata['gateway']
routes = task.userdata['routes']
- LOG.debug(_("VCNS: start updating routes for %s"), edge_id)
+ LOG.debug("VCNS: start updating routes for %s", edge_id)
static_routes = []
for route in routes:
static_routes.append({
diff --git a/neutron/plugins/vmware/vshield/tasks/tasks.py b/neutron/plugins/vmware/vshield/tasks/tasks.py
index 7037c430dd..424736f71e 100644
--- a/neutron/plugins/vmware/vshield/tasks/tasks.py
+++ b/neutron/plugins/vmware/vshield/tasks/tasks.py
@@ -191,7 +191,7 @@ class TaskManager():
LOG.exception(msg)
status = constants.TaskStatus.ERROR
- LOG.debug(_("Task %(task)s return %(status)s"), {
+ LOG.debug("Task %(task)s return %(status)s", {
'task': str(task),
'status': status})
@@ -210,7 +210,7 @@ class TaskManager():
'cb': str(task._result_callback)}
LOG.exception(msg)
- LOG.debug(_("Task %(task)s return %(status)s"),
+ LOG.debug("Task %(task)s return %(status)s",
{'task': str(task), 'status': task.status})
task._finished()
diff --git a/neutron/plugins/vmware/vshield/vcns.py b/neutron/plugins/vmware/vshield/vcns.py
index ec3923c3a6..6c2835ea23 100644
--- a/neutron/plugins/vmware/vshield/vcns.py
+++ b/neutron/plugins/vmware/vshield/vcns.py
@@ -49,7 +49,7 @@ class Vcns(object):
password, 'json')
def do_request(self, method, uri, params=None, format='json', **kwargs):
- LOG.debug(_("VcnsApiHelper('%(method)s', '%(uri)s', '%(body)s')"), {
+ LOG.debug("VcnsApiHelper('%(method)s', '%(uri)s', '%(body)s')", {
'method': method,
'uri': uri,
'body': jsonutils.dumps(params)})
@@ -57,8 +57,8 @@ class Vcns(object):
header, content = self.jsonapi_client.request(method, uri, params)
else:
header, content = self.xmlapi_client.request(method, uri, params)
- LOG.debug(_("Header: '%s'"), header)
- LOG.debug(_("Content: '%s'"), content)
+ LOG.debug("Header: '%s'", header)
+ LOG.debug("Content: '%s'", content)
if content == '':
return header, {}
if kwargs.get('decode', True):