Files
network-diagrams-tool/UML/UML.d2
T
2026-05-25 02:31:59 +03:00

114 lines
1.8 KiB
Plaintext

direction: down
Interface: {
shape: class
name: str
itype: "[str]"
adapter: "[str]"
slave_interfaces: "[List[str]]"
parent_interface: "[str]"
ip_address: "[str]"
network: "[str]"
subnet_mask: "[str]"
default_gateway: "[str]"
vlan: "[str]"
device: Device
"__init__(name, ...)"
"__repr__(): str"
}
Device: {
shape: class
name: str
role: str
interfaces: "Dict[str, Interface]"
"__init__(name: str)"
"add_interface(interface: Interface)"
"rm_interface(interface: Interface)"
"__repr__(): str"
}
Host: {
shape: class
role: str
}
Router: {
shape: class
role: str
}
Switch: {
shape: class
role: str
}
Network: {
shape: class
name: str
interfaces: "List[Interface]"
network_ip: "[str]"
"__init__(name: str, [vlan: [str]], [network_ip: [str]])"
"add_interface(interface: Interface)"
"rm_interface(interface: Interface)"
"__repr__(): str"
}
Topology: {
shape: class
devices: "Dict[str, Device]"
networks: "Dict[str, Network]"
"__init__()"
"add_device(device: Device)"
"rm_device(device: Device)"
"add_network(network: Network)"
"rm_network(network: Network)"
"__repr__(): str"
}
Host -> Device: {
target-arrowhead.shape: triangle
target-arrowhead.style.filled: false
}
Router -> Device: {
target-arrowhead.shape: triangle
target-arrowhead.style.filled: false
}
Switch -> Device: {
target-arrowhead.shape: triangle
target-arrowhead.style.filled: false
}
Device -- Interface: interfaces {
source-arrowhead: 1..*
target-arrowhead: 1
}
Network -- Interface: interfaces {
source-arrowhead: 1..*
target-arrowhead: 1
}
Topology -- Device: devices {
source-arrowhead: 1..*
target-arrowhead: 1
}
Topology -- Network: networks {
source-arrowhead: 1..*
target-arrowhead: 1
}