Commit ca5315b2 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Add remove_interface method to MasterClient

parent 39a08c74
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ COMMAND_ATTACH = 'ATTACH'
COMMAND_DETACH = 'DETACH'
COMMAND_INTERFACES = 'INTERFACES'
COMMAND_INTERFACE_ADD = 'INTERFACE_ADD'
COMMAND_INTERFACE_REMOVE = 'INTERFACE_REMOVE'


# Unvalued and failure responses
+6 −0
Original line number Diff line number Diff line
@@ -57,6 +57,12 @@ class MasterClient(BaseClient):
			ifname, '', driver, ctrl_iface, driver_param,
		)

	async def remove_interface(self, ifname: str):  # pragma: no cover
		"""
		Remove a network interface from the daemon's control
		"""
		await self.send_message(consts.COMMAND_INTERFACE_REMOVE, ifname)

	async def connect_interface(self, ifname: str) -> InterfaceClient:
		"""
		Return an InterfaceClient controlling the named interface