brocade: Use lazy logging interpolation
There are a small number of examples of "eager" interpolation in neutron: logging.debug("foo %s" % arg) These should be converted to perform the interpolation lazily within the logging function, since if the severity is below the logging level then the interpolation can be skipped entirely. This change addresses all such examples found in brocade l3_router_plugin via a pylint test. Other occurrences are addressed elsewhere. Change-Id: Ia2d51e8ecbc7af81390577ec69c5ce18523b65f3 Partial-Bug: #1404788
This commit is contained in:
parent
4a5a8aab0f
commit
a70a38fc8c
|
@ -142,10 +142,10 @@ class BrocadeSVIPlugin(router.L3RouterPlugin):
|
|||
LOG.debug("Allocated cidr %(cidr)s from the pool, "
|
||||
"network_id %(net_id)s "
|
||||
"bnet %(bnet)s "
|
||||
"vlan %(vlan_id)d " % ({'cidr': gateway_ip_cidr,
|
||||
'net_id': network_id,
|
||||
'bnet': bnet,
|
||||
'vlan_id': int(vlan_id)}))
|
||||
"vlan %(vlan_id)d ", {'cidr': gateway_ip_cidr,
|
||||
'net_id': network_id,
|
||||
'bnet': bnet,
|
||||
'vlan_id': int(vlan_id)})
|
||||
port_filters = {'network_id': [network_id],
|
||||
'device_owner': [DEVICE_OWNER_ROUTER_INTF]}
|
||||
port_count = self._core_plugin.get_ports_count(context,
|
||||
|
@ -206,10 +206,11 @@ class BrocadeSVIPlugin(router.L3RouterPlugin):
|
|||
LOG.debug("remove_router_interface removed cidr %(cidr)s"
|
||||
" from the pool,"
|
||||
" network_id %(net_id)s bnet %(bnet)s"
|
||||
" vlan %(vlan_id)d" %
|
||||
({'cidr': gateway_ip_cidr,
|
||||
'net_id': network_id,
|
||||
'bnet': bnet, 'vlan_id': int(vlan_id)}))
|
||||
" vlan %(vlan_id)d",
|
||||
{'cidr': gateway_ip_cidr,
|
||||
'net_id': network_id,
|
||||
'bnet': bnet,
|
||||
'vlan_id': int(vlan_id)})
|
||||
switch = self._switch
|
||||
self._driver.delete_svi(switch['address'],
|
||||
switch['username'],
|
||||
|
|
Loading…
Reference in New Issue