Allow other kwargs in `DhcpBase.disable`

Since [1], this method is called with an extra argument "network_id".
Instead of filtering out this parameter when the driver method is
called, the method signature now accepts other kwargs.

[1]https://review.opendev.org/c/openstack/neutron/+/865823

Closes-Bug: #2007553
Change-Id: I0c14a73699702b9af828a5703a8f9fe8b87d3e67
This commit is contained in:
Rodolfo Alonso Hernandez 2023-02-14 19:06:35 +01:00
parent 3d7a8df78c
commit 5e15c4a4d4

View File

@ -197,7 +197,7 @@ class DhcpBase(object, metaclass=abc.ABCMeta):
"""Enables DHCP for this network."""
@abc.abstractmethod
def disable(self, retain_port=False, block=False):
def disable(self, retain_port=False, block=False, **kwargs):
"""Disable dhcp for this network."""
def restart(self):
@ -348,7 +348,7 @@ class DhcpLocalProcess(DhcpBase, metaclass=abc.ABCMeta):
pid_file=self.get_conf_file_name('pid'),
run_as_root=True)
def disable(self, retain_port=False, block=False):
def disable(self, retain_port=False, block=False, **kwargs):
"""Disable DHCP for this network by killing the local process."""
self.process_monitor.unregister(self.network.id, DNSMASQ_SERVICE_NAME)
pm = self._get_process_manager()