models.network_interface module

class models.network_interface.NetworkInterface(bond_slave_slot_types=None, bond_slaves=None, bonding_mode=None, gateway=None, gateway6=None, group=None, id=None, is_connected=None, is_default_route=None, is_up=None, mac_address=None, mtu=None, name=None, role=None, services=None, speed=None, static_ip=None, static_ip6=None, subnet=None, subnet6=None, mtype=None, virtual_ip=None)[source]

Bases: object

Implementation of the ‘NetworkInterface’ model.

Specifies the properties of a network interface.

Attributes:
bond_slave_slot_types (list of string): Specifies the types of the

slots of any slaves if this interface is a bond.

bond_slaves (list of string): Specifies the names of any slaves if

this interface is a bond.

bonding_mode (int): Specifies the bonding mode if this interface is

a bond.

gateway (string): Specifies the gateway of the interface. gateway6 (string): Specifies the gateway6 of the interface. group (string): Specifies the group that this interface belongs to. id (long|int): Specifies the ID of this network interface. is_connected (bool): Specifies whether or not the Interface is

connected.

is_default_route (bool): Specifies whether or not to use this

interface as the default route.

is_up (bool): Specifies whether or not the interface is currently

up.

mac_address (string): Specifies the Mac address of the Interface. mtu (int): Specifies the MTU of the interface. name (string): Specifies the name of the interface port. role (RoleNetworkInterfaceEnum): Specifies the role of this interface.

‘kPrimary’ indicates a primary role. ‘kSecondary’ indicates a secondary role.

services (list of ServiceNetworkInterfaceEnum): Specifies the types of

services this interface is used for.

speed (string): Specifies the speed of the Interface. static_ip (string): Specifies the static IP of the interface. static_ip6 (string): Specifies the static IPv6 of the interface. subnet (string): Specifies the subnet mask of the interface. subnet6 (string): Specifies the subnet6 mask of the interface. mtype (int): Specifies the type of interface. virtual_ip (string): Specifies the virtual IP of the interface.

classmethod from_dictionary(dictionary)[source]

Creates an instance of this model from a dictionary

Args:

dictionary (dictionary): A dictionary representation of the object as obtained from the deserialization of the server’s response. The keys MUST match property names in the API description.

Returns:

object: An instance of this structure class.