Source code for data_classes

from dataclasses import dataclass, field
from typing import List, Optional

@dataclass
[docs] class Switch: """Represents a switch being modeled in the virtual lab."""
[docs] name: str # Switch name received as input argument
[docs] model: str # Switch model
[docs] eos_version: str # EOS version
[docs] system_mac: str # System MAC address
[docs] serial_number: str # Serial number
[docs] lldp_system_name: str # LLDP system name
[docs] ethernet_interfaces: int # Number of Ethernet interfaces
[docs] gns3_template_id: str # GNS3 image-template ID
[docs] gns3_node_id: str # GNS3 node-ID
[docs] docker_container_id: str # Docker container ID
[docs] initial_config: List = field(default_factory=list) # The modeled device's configuration
[docs] vendor_platform: str = '' # Switch vendor/platform (optional)
[docs] qemu_vm_id: str = '' # QEMU VM ID (optional)
@dataclass
[docs] class Connection: """Represents a connection between two switches in the virtual lab."""
[docs] switch_a: str # LLDP system name of the first switch
[docs] port_a: str # Port on the first switch
[docs] switch_b: str # LLDP system name of the second switch
[docs] port_b: str # Port on the second switch