geni.types¶

class 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 passed in must be represented in hex, but may contain common separators (colon, dash, and period) in any configuration.

Parameters: val (int, long, unicode, str) – DPID.OutOfRangeError – If the DPID represented by val is larger than the spec allows or less than zero. DPID.InputTypeError – If val is not a supported data type
exception InputTypeError(val)[source]
MAX = 18446744073709551615L
exception OutOfRangeError(val)[source]
hexstr()[source]

Unformatted hex representation of DPID

Returns: str – Hex formatted DPID, without colons
class 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 passed in must be represented in hex, but may contain common separators (colon, dash, and period) in any configuration.

Parameters: val (int, long, unicode, str) – EthernetMAC.OutOfRangeError – If the MAC represented by val is larger than than 48-bits or less than zero. EthernetMAC.InputTypeError – If val is not a supported data type
exception InputTypeError(val)[source]
MAX = 281474976710656
exception OutOfRangeError(val)[source]
hexstr()[source]

Unformatted hex representation of MAC

Returns: str – Hex formatted MAC, without separators