Merge "Skip warnings during DHCP port actions if no error is raised"

This commit is contained in:
Jenkins 2016-09-16 03:35:00 +00:00 committed by Gerrit Code Review
commit 931c59f428

View File

@ -118,10 +118,14 @@ class DhcpRpcCallback(object):
pass
else:
ctxt.reraise = True
net_id = port['port']['network_id']
LOG.warning(_LW("Action %(action)s for network %(net_id)s "
"could not complete successfully: %(reason)s"),
{"action": action, "net_id": net_id, 'reason': e})
if ctxt.reraise:
net_id = port['port']['network_id']
LOG.warning(_LW("Action %(action)s for network %(net_id)s "
"could not complete successfully: "
"%(reason)s"),
{"action": action,
"net_id": net_id,
'reason': e})
def _group_by_network_id(self, res):
grouped = {}