-
Notifications
You must be signed in to change notification settings - Fork 63
Kathara.manager.docker.DockerLink
- PLUGIN_NAME
- BRIDGE_LINK_NAME
The class responsible for deploying Kathara collision domains as Docker networks and interact with them.
__init__(client: docker.client.DockerClient) → None
create(link: Kathara.model.Link.Link) → None
Create a Docker network representing the collision domain object and assign it to link.api_object. Also, connect external collision domains, if present.
Args:
-
link
(Kathara.model.Link.Link): A Kathara collision domain.
Returns: None
deploy_links(lab: Kathara.model.Lab.Lab) → None
Deploy all the lab collision domains as Docker networks.
Args:
-
lab
(Kathara.model.Lab.Lab): A Kathara network scenario.
Returns: None
get_docker_bridge() → Union[NoneType, docker.models.networks.Network]
Return the Docker bridged network.
Returns:
-
Union[None, docker.models.networks.Network]
: The Docker bridged network if exists, else None
get_links_api_objects_by_filters(
lab_hash: str = None,
link_name: str = None,
user: str = None
) → List[docker.models.networks.Network]
Return the Docker networks specified by lab_hash, machine_name and user.
Args:
-
lab_hash
(str): The hash of a network scenario. If specified, return all the networks in the scenario. -
link_name
(str): The name of a network. If specified, return the specified networks of the scenario. -
user
(str): The name of a user on the host. If specified, return only the networks of the user.
Returns:
-
List[docker.models.networks.Network]
: A list of Docker networks.
get_network_name(name: str) → str
Return the name of a Docker network.
Args:
-
name
(str): The name of a Kathara collision domain.
Returns:
-
str
: The name of the Docker network in the format "|net_prefix||username_prefix||name|". -
If shared collision domains, the format is
: "|net_prefix|_|lab_hash|".
undeploy(lab_hash: str) → None
Undeploy all the collision domains of the scenario specified by lab_hash.
Args:
-
lab_hash
(str): The hash of the network scenario to undeploy.
Returns: None
wipe(user: str = None) → None
Undeploy all the Docker networks of the specified user. If user is None, it undeploy all the Docker networks.
Args:
-
user
(str): The name of a current user on the host
Returns: None
This file was automatically generated via lazydocs.
Website: kathara.org
Contact us: [email protected]