Skip extra logging when devices is empty

Change-Id: Id9ae8aef0555109bd88600965adb2744ab924430
Closes-Bug: #1278271
This commit is contained in:
Yuanchao Sun 2014-02-10 00:20:31 +08:00
parent 752e54e520
commit eb46268c8f

View File

@ -150,12 +150,13 @@ class SecurityGroupAgentRpcMixin(object):
for device in self.firewall.ports.values(): for device in self.firewall.ports.values():
if sec_grp_set & set(device.get(attribute, [])): if sec_grp_set & set(device.get(attribute, [])):
devices.append(device['device']) devices.append(device['device'])
if devices:
if self.defer_refresh_firewall: if self.defer_refresh_firewall:
LOG.debug(_("Adding %s devices to the list of devices " LOG.debug(_("Adding %s devices to the list of devices "
"for which firewall needs to be refreshed"), "for which firewall needs to be refreshed"),
devices) devices)
self.devices_to_refilter |= set(devices) self.devices_to_refilter |= set(devices)
elif devices: else:
self.refresh_firewall(devices) self.refresh_firewall(devices)
def security_groups_provider_updated(self): def security_groups_provider_updated(self):