From 044c04fb5d7ca7083acaddf3abaa9510ad0b5cec Mon Sep 17 00:00:00 2001 From: lzklibj Date: Thu, 17 Dec 2015 12:07:32 +0800 Subject: [PATCH] update docstring for get_ports_on_host_by_subnet This patch updates docstring for get_ports_on_host_by_subnet, to tell that the method will only get dvr serviced ports, not all ports for given subnet and host. Change-Id: I85ea5a9e37b6c894f7d51e73c10143b208a29f0e --- neutron/api/rpc/handlers/dvr_rpc.py | 4 ++++ neutron/db/dvr_mac_db.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/neutron/api/rpc/handlers/dvr_rpc.py b/neutron/api/rpc/handlers/dvr_rpc.py index 02909b6f7..73a5918be 100644 --- a/neutron/api/rpc/handlers/dvr_rpc.py +++ b/neutron/api/rpc/handlers/dvr_rpc.py @@ -53,6 +53,8 @@ class DVRServerRpcApi(object): @log_helpers.log_method_call def get_ports_on_host_by_subnet(self, context, host, subnet): + """Get DVR serviced ports on given host and subnet.""" + cctxt = self.client.prepare() return cctxt.call(context, 'get_ports_on_host_by_subnet', host=host, subnet=subnet) @@ -95,6 +97,8 @@ class DVRServerRpcCallback(object): return self.plugin.get_dvr_mac_address_by_host(context, host) def get_ports_on_host_by_subnet(self, context, **kwargs): + """Get DVR serviced ports for given host and subnet.""" + host = kwargs.get('host') subnet = kwargs.get('subnet') LOG.debug("DVR Agent requests list of VM ports on host %s", host) diff --git a/neutron/db/dvr_mac_db.py b/neutron/db/dvr_mac_db.py index 0399292f2..53f6dd9e7 100644 --- a/neutron/db/dvr_mac_db.py +++ b/neutron/db/dvr_mac_db.py @@ -126,7 +126,7 @@ class DVRDbMixin(ext_dvr.DVRMacAddressPluginBase): @log_helpers.log_method_call def get_ports_on_host_by_subnet(self, context, host, subnet): - """Returns ports of interest, on a given subnet in the input host + """Returns DVR serviced ports on a given subnet in the input host This method returns ports that need to be serviced by DVR. :param context: rpc request context -- 2.45.2