dhcpkit.ipv6.server.dhcpctl module

The remote control app for the server process

exception dhcpkit.ipv6.server.dhcpctl.CommunicationError[source]

Bases: dhcpkit.ipv6.server.dhcpctl.ControlClientError

There was a problem communicating

exception dhcpkit.ipv6.server.dhcpctl.ControlClientError[source]

Bases: Exception

Base class for DHCPKit Control Client errors

class dhcpkit.ipv6.server.dhcpctl.DHCPKitControlClient(control_socket: str)[source]

Bases: object

A class for communicating with a DHCPKit DHCPv6 server

execute_command(command: str, optional: bool = False) → Iterable[source]

Send a command and parse the response

Parameters:
  • command – The command
  • optional – Whether we care about this command being properly executed
Returns:

The output

receive_line(optional: bool = False) → Union[source]

Receive one line of output from the server

Parameters:optional – Whether we care about this command being properly executed
Returns:The received line
send_command(command: str, optional: bool = False)[source]

Send a command to the server

Parameters:
  • command – The command
  • optional – Whether we care about this command being properly executed
exception dhcpkit.ipv6.server.dhcpctl.UnknownCommandError[source]

Bases: dhcpkit.ipv6.server.dhcpctl.ControlClientError

The server doesn’t understand the command we sent

exception dhcpkit.ipv6.server.dhcpctl.WrongServerError[source]

Bases: dhcpkit.ipv6.server.dhcpctl.ControlClientError

The socket we connected to doesn’t seem to be a DHCPKit server

dhcpkit.ipv6.server.dhcpctl.handle_args(args: Iterable)[source]

Handle the command line arguments.

Parameters:args – Command line arguments
Returns:The arguments object
dhcpkit.ipv6.server.dhcpctl.main(args: Iterable)[source]

The main program loop

Parameters:args – Command line arguments
Returns:The program exit code
dhcpkit.ipv6.server.dhcpctl.run() → int[source]

Run the main program and handle exceptions

Returns:The program exit code