debmonitor

Debmonitor module.

exception spicerack.debmonitor.DebmonitorError[source]

Bases: spicerack.exceptions.SpicerackError

Custom exception class for errors of the Debmonitor class.

class spicerack.debmonitor.Debmonitor(host: str, cert: str, key: str, dry_run: bool = True)[source]

Bases: object

Class to interact with a Debmonitor website.

Initialize the instance.

Parameters
  • host (str) -- the hostname of the Debmonitor server (without protocol).

  • cert (str) -- the path to the TLS certificate to use to authenticate on Debmonitor.

  • key (str) -- the path to the TLS key to use to authenticate on Debmonitor.

  • dry_run (bool, optional) -- whether this is a DRY-RUN.

host_delete(hostname: str) None[source]

Remove a host and all its packages from Debmonitor.

Parameters

host (str) -- the FQDN of the host to remove from Debmonitor.

Raises

spicerack.debmonitor.DebmonitorError -- on failure to delete. It doesn't raise if the host is already absent in Debmonitor.