NetworkInterface#

class wattson.cosimulation.simulators.network.components.interface.network_interface.NetworkInterface#

Bases: NetworkEntity, ABC

Methods

down

Set the interface down

get_ip_address

get_link

get_mac_address

get_node

get_subnet

get_subnet_prefix_length

get_system_name

has_ip

returns:

True iff this interface has an IP address assigned

set_ip_address

Update the ip address of this interface

up

Set the interface up

Attributes

ip_address_short_string

Returns: Optional[str]: The IP address of this interface without subnet length indicator

ip_address_string

Returns: Optional[str]: The IP address of this interface with subnet length indicator

is_management

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