Net Object

class activelogic.NetObject

Object representing a NetObject.

>>> no = rs.add(NetObject('MyNetObject', items=['4.0.0.0/32', '::ffff:400:0']))
class activelogic.NetObjectSingleItem

Object representing a NetObject holding a single IP address.

Parameters

address (IPv4Address or IPv6Address) – IP address

>>> import ipaddress
>>> NetObjectSingleItem(ipaddress.ip_address('1.2.3.4'))
>>> NetObjectSingleItem(ipaddress.ip_address('2001:0db8:85a3:0000:0000:8a2e:0370:7334'))
class activelogic.NetObjectNetworkItem

Object representing a NetObject item holding a network address with a netmask.

Parameters

network_address (IPv4Network or IPv6Network) – Network address

>>> import ipaddress
>>> NetObjectNetworkItem(ipaddress.ip_network('1.2.3.4/32'))
class activelogic.NetObjectRangeItem

Object representing a NetObject item holding an IP range.

Parameters
  • address_first (IPv4Address or IPv6Address) – First IP address in range

  • address_last (IPv4Address or IPv6Address) – Last IP address in range

>>> import ipaddress
>>> NetObjectRangeItem(ipaddress.ip_address('1.2.3.4'), ipaddress.ip_address('2.3.4.5'))