Skip to content

Kathara.manager.docker.DockerPlugin

Tommaso Caiazzi edited this page Oct 2, 2023 · 10 revisions

module Kathara.manager.docker.DockerPlugin

Global Variables

  • LINUX_PLUGIN_NAME
  • VDE_PLUGIN_NAME
  • HOSTTMP_KEY
  • XTABLES_CONFIGURATION_KEY
  • XTABLES_LOCK_PATH

class DockerPlugin

Class responsible for interacting with Docker Plugins.

method DockerPlugin.__init__

__init__(client: docker.client.DockerClient)

method DockerPlugin.check_and_download_plugin

check_and_download_plugin() → None

Check the presence of the Kathara Network Plugin and download it or upgrade it, if needed.

Returns: None

Raises:

  • DockerPluginError: If the Kathara Network Plugin is not found on remote Docker connection.
  • DockerPluginError: If the Kathara Network Plugin is not enabled on remote Docker connection.

method DockerPlugin.exec_by_version

exec_by_version(fun_vde: Callable, fun_bridge: Callable) → Any

Executes the callback depending on the enabled plugin version.

Returns:

  • Any: The result of the callback.

method DockerPlugin.is_bridge

is_bridge() → bool

Check if the current enabled plugin is the Linux bridge version.

Returns:

  • bool: True if the running plugin is the Linux bridge version.

method DockerPlugin.is_vde

is_vde() → bool

Check if the current enabled plugin is the VDE version.

Returns:

  • bool: True if the running plugin is the VDE version.

method DockerPlugin.plugin_pid

plugin_pid() → int

Get the plugin process PID from the plugin state file.

Returns:

  • int: The plugin process PID.

method DockerPlugin.plugin_store_path

plugin_store_path() → str

Get the plugin storage path (VDE only) from the plugin settings.

Returns:

  • str: The plugin storage path.

Raises:

  • FileNotFoundError: If the storage path mount point cannot be found.

This file was automatically generated via lazydocs.

Clone this wiki locally