In add_static_nat(...):
LOG.debug("MidoClient.add_static_nat called: "
"tenant_id=%(tenant_id)s, chain_name=%(chain_name)s, "
"from_ip=%(from_ip)s, to_ip=%(to_ip)s, "
"port_id=%(port_id)s, nat_type=%(nat_type)s",
{'tenant_id': tenant_id, 'chain_name': chain_name,
'from_ip': from_ip, 'to_ip': to_ip,
'portid': port_id, 'nat_type': nat_type})
Note port_id vs portid. This line of code raises a KeyError if debug
logging is enabled.
(Found via pylint)
Change-Id: I4d76255a559489f2f0e074b4489cfa5f33f1dddf
Closes-Bug: #
1404755
"port_id=%(port_id)s, nat_type=%(nat_type)s",
{'tenant_id': tenant_id, 'chain_name': chain_name,
'from_ip': from_ip, 'to_ip': to_ip,
- 'portid': port_id, 'nat_type': nat_type})
+ 'port_id': port_id, 'nat_type': nat_type})
if nat_type not in ['dnat', 'snat']:
raise ValueError(_("Invalid NAT type passed in %s") % nat_type)