topology_docker.networks

Docker networks management module.

Functions

topology_docker.networks.create_docker_network(enode, category, config)

Create a Docker managed network with given configuration (netns, prefix) to be used with Topology framework.

Parameters:
  • enode – The platform (a.k.a “engine”) node to configure.
  • category (str) – Name of the panel category.
  • config (dict) –

    Configuration for the network. A dictionary like:

    {
        'netns': 'mynetns',
        'managed_by': 'docker',
        'connect_to': 'somedockernetwork',
        'prefix': ''
    }
    

    This dictionary is taken from the node._get_network_config() result.

topology_docker.networks.create_platform_network(enode, category, config)

Create a Topology managed network with given configuration (netns, prefix).

Parameters:
  • enode – The platform (a.k.a “engine”) node to configure.
  • category (str) – Name of the panel category.
  • config (dict) –

    Configuration for the network. A dictionary like:

    {
        'netns': 'mynetns',
        'managed_by': 'platform',
        'prefix': ''
    }
    

    This dictionary is taken from the node._get_network_config() result.