NetworkInterface#
- class wattson.cosimulation.simulators.network.components.interface.network_interface.NetworkInterface#
Bases:
NetworkEntity
,ABC
Methods
Set the interface down
get_ip_address
get_link
get_mac_address
get_node
get_subnet
get_subnet_prefix_length
get_system_name
- returns:
True iff this interface has an IP address assigned
Update the ip address of this interface
Set the interface up
Attributes
Returns: Optional[str]: The IP address of this interface without subnet length indicator
Returns: Optional[str]: The IP address of this interface with subnet length indicator
Returns: bool: True iff this interface belongs to the management network
id
- abstract down()#
Set the interface down
- abstract has_ip() bool #
- Returns:
True iff this interface has an IP address assigned
- Return type:
bool
- property ip_address_short_string: str | None#
Returns: Optional[str]: The IP address of this interface without subnet length indicator
- property ip_address_string: str | None#
Returns: Optional[str]: The IP address of this interface with subnet length indicator
- abstract property is_management: bool#
Returns: bool: True iff this interface belongs to the management network
- abstract set_ip_address(ip_address: IPv4Address | None)#
Update the ip address of this interface
- Parameters:
ip_address (Optional[ipaddress.IPv4Address]) – The ip to use or None
- abstract up()#
Set the interface up