geni.types

Utility types used within geni-lib.

class geni.types.DPID(val)[source]

Utility class representing OpenFlow Datapath IDs

This class tries to handle all likely inputs and desired outputs, while providing a single internal type to work with in the code.

String representations passwd in must be represented in hex, but may contain common separators (colon, dash, and period) in any configuration.

Parameters:

val (int, long, unicode, str) –

Raises:
exception InputTypeError(val)[source]
DPID.MAX = 18446744073709551615L
exception DPID.OutOfRangeError(val)[source]
DPID.hexstr()[source]

Unformatted hex representation of DPID

Returns:Hex formatted DPID, without colons
Return type:str
class geni.types.EthernetMAC(val)[source]

Utility class representing 48-bit Ethernet MAC Addresses

This class tries to handle all likely inputs and desired outputs, while providing a single internal type to work with in the code.

String representations passwd in must be represented in hex, but may contain common separators (colon, dash, and period) in any configuration.

Parameters:

val (int, long, unicode, str) –

Raises:
exception InputTypeError(val)[source]
EthernetMAC.MAX = 281474976710655
exception EthernetMAC.OutOfRangeError(val)[source]
EthernetMAC.hexstr()[source]

Unformatted hex representation of MAC

Returns:Hex formatted MAC, without separators
Return type:str