Merge "DHCP agent: log when reloading allocations for a new VM port"

This commit is contained in:
Jenkins 2015-11-02 09:55:26 +00:00 committed by Gerrit Code Review
commit 911fd53285
2 changed files with 5 additions and 0 deletions

View File

@ -328,6 +328,8 @@ class DhcpAgent(manager.Manager):
updated_port = dhcp.DictModel(payload['port'])
network = self.cache.get_network_by_id(updated_port.network_id)
if network:
LOG.info(_LI("Trigger reload_allocations for port %s"),
updated_port)
driver_action = 'reload_allocations'
if self._is_port_on_this_agent(updated_port):
orig = self.cache.get_port_by_id(updated_port['id'])

View File

@ -96,6 +96,9 @@ class DictModel(dict):
def __delattr__(self, name):
del self[name]
def __str__(self):
return ("id=" + self.id + ", network_id=" + self.network_id)
class NetModel(DictModel):