acme.topology
This is a tutorial Model Component which is a partial implementation of the ACME Tutorials. Generally, this MC creates a example corporate network.
- Attribute Provides:
topology
acme_topology
- Attribute Depends:
graph
- Model Component Dependencies:
Plugin
- class acme.topology_plugin.Plugin(graph, log)[source]
Bases:
AbstractPlugin
acme.topology plugin documentation.
- __annotations__ = {}
- build_building(name, network, num_hosts=1)[source]
Create the building router and hosts.
This is a single router with all of the hosts. Assuming that the building is called “building1” the topology will look like:
switch ---- building1 ----- switch ------ hosts (ACME-INTERNAL) (building1-switch)
- Parameters:
name (str) – The name of the building.
network (netaddr.IPNetwork) – The subnet for the building.
num_hosts (int) – The number of hosts the building should have.
- Returns:
The building router.
- Return type:
vyos.Helium118
- build_datacenter(building, uplink_network, dc_network)[source]
Create the data center.
This is a single router with all of the servers:
building2 ------ switch ------ datacenter ------ switch ------ servers (building2-DC-switch) (DC-switch)
- Parameters:
building (vyos.Helium118) – The Building router which contains the data center.
uplink_network (netaddr.IPNetwork) – The network to connect the DC to the building.
dc_network (netaddr.IPNetwork) – The network for the data center.
- build_front(ext_ip)[source]
Build the ACME infrastructure that is Internet-facing.
This method will create the following topology:
switch -- gateway -- switch -- firewall (ACME-EXTERNAL) (GW-FW)
- Parameters:
ext_ip (netaddr.IPAddress) – The external IP address for the gateway (e.g. its Internet facing IP address).
- Returns:
The Firewall object.
- Return type:
vyos.Helium118