Merge "Add logging in get_ports for all plugins"
This commit is contained in:
commit
0a9fa14db4
@ -441,6 +441,14 @@ class NsxPluginBase(db_base_plugin_v2.NeutronDbPluginV2,
|
||||
sg_rule[sg_prefix.LOCAL_IP_PREFIX].startswith('::/'))):
|
||||
sg_rule[sg_prefix.LOCAL_IP_PREFIX] = None
|
||||
|
||||
def _log_get_ports(self, ports, filters):
|
||||
if len(ports) > 0:
|
||||
LOG.debug("Getting %(num)s port%(plural)s with %(filters)s",
|
||||
{'len': len(ports),
|
||||
'plural': 's' if len(ports) > 1 else '',
|
||||
'filters': ('filters ' + str(filters) if filters
|
||||
else 'no filters')})
|
||||
|
||||
def get_housekeeper(self, context, name, fields=None):
|
||||
# run the job in readonly mode and get the results
|
||||
self.housekeeper.run(context, name, readonly=True)
|
||||
|
@ -603,6 +603,7 @@ class NsxDvsV2(addr_pair_db.AllowedAddressPairsMixin,
|
||||
super(NsxDvsV2, self).get_ports(
|
||||
context, filters, fields, sorts,
|
||||
limit, marker, page_reverse))
|
||||
self._log_get_ports(ports, filters)
|
||||
# Add port extensions
|
||||
for port in ports:
|
||||
self.plugin_extend_port_dict_binding(context, port)
|
||||
|
@ -1477,6 +1477,7 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base):
|
||||
super(NsxPolicyPlugin, self).get_ports(
|
||||
context, filters, fields, sorts,
|
||||
limit, marker, page_reverse))
|
||||
self._log_get_ports(ports, filters)
|
||||
# Add port extensions
|
||||
for port in ports[:]:
|
||||
self._extend_nsx_port_dict_binding(context, port)
|
||||
|
@ -2721,6 +2721,7 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
|
||||
super(NsxVPluginV2, self).get_ports(
|
||||
context, filters, fields, sorts,
|
||||
limit, marker, page_reverse))
|
||||
self._log_get_ports(ports, filters)
|
||||
# Add the relevant port extensions
|
||||
for port in ports[:]:
|
||||
self._extend_get_port_dict_qos_and_binding(context, port)
|
||||
|
@ -2055,6 +2055,7 @@ class NsxV3Plugin(nsx_plugin_common.NsxPluginV3Base,
|
||||
super(NsxV3Plugin, self).get_ports(
|
||||
context, filters, fields, sorts,
|
||||
limit, marker, page_reverse))
|
||||
self._log_get_ports(ports, filters)
|
||||
# Add port extensions
|
||||
for port in ports[:]:
|
||||
self._extend_get_port_dict_qos_and_binding(context, port)
|
||||
|
Loading…
Reference in New Issue
Block a user