InterfaceState¶
- class pyniryo_nate.models.network.InterfaceState(id: str, type: InterfaceType, mac_address: str, has_carrier: bool, status: InterfaceStatus, ipv4: Ipv4State, ethernet: EthernetState | None, wifi: WiFiState | None)[source]¶
Bases:
objectActual, live state of a network interface.
- Parameters:
id (str) – Unique identifier for the network interface.
type (InterfaceType) – Type of the network interface.
mac_address (str) – MAC address of the network interface.
has_carrier (bool) – Whether the network interface has a carrier (e.g. for an ethernet interface, a cable is plugged-in).
status (InterfaceStatus) – Status of the network interface.
ipv4 (Ipv4State) – IPv4 state of the network interface.
ethernet (EthernetState | None) – Ethernet-specific state, set only if the interface is an ethernet one.
wifi (WiFiState | None) – WiFi-specific state, set only if the interface is a WiFi one.
Attributes
Methods
- id: str¶
- type: InterfaceType¶
- mac_address: str¶
- has_carrier: bool¶
- status: InterfaceStatus¶
- ethernet: EthernetState | None¶
- classmethod from_transport_model(model: InterfaceState) InterfaceState[source]¶
- Parameters:
model (InterfaceState)
- Return type:
- classmethod from_a_transport_model(model: NetworkInterfaceState) InterfaceState[source]¶
- Parameters:
model (NetworkInterfaceState)
- Return type: