Rewrite Object

class activelogic.RewriteObject

Object representing a RewiteObject.

>>> o = rs.add(RewriteObject('rewrite_mac', items=[RewriteObjectDestMACItem("00:01:02:03:04:05")]))
>>> o = rs.add(RewriteObject('rewrite_hoplimit', items=[RewriteObjectHoplimitItem(128, RewriteObjectDirection.OUTBOUND)]))
class activelogic.RewriteObjectDirection

Direction of packets affected by a rewrite.

Variables
  • BOTH – Both inbound and outbound packets.

  • INBOUND – Inbound packets.

  • OUTBOUND – Outbound packets.

class activelogic.RewriteObjectDestMACItem

Object representing manipulation of destination MAC address.

Parameters
  • direction (RewriteObjectDirection) – Direction of packets affected by this rewrite.

  • value (str) – MAC address to write.

class activelogic.RewriteObjectDestIPItem

Object representing manipulation of destination IP address.

Parameters
  • direction (RewriteObjectDirection) – Direction of packets affected by this rewrite.

  • value (str) – IP address to write.

class activelogic.RewriteObjectSrcIPItem

Object representing manipulation of source IP address.

Parameters
  • direction (RewriteObjectDirection) – Direction of packets affected by this rewrite.

  • value (str) – IP address to write.

class activelogic.RewriteObjectDSCPItem

Object representing manipulation of DSCP.

Parameters
  • direction (RewriteObjectDirection) – Direction of packets affected by this rewrite.

  • value (int) – DSCP to write.

class activelogic.RewriteObjectVLANPrioItem

Object representing manipulation of VLAN priority.

Parameters
  • direction (RewriteObjectDirection) – Direction of packets affected by this rewrite.

  • value (int) – VLAN priority to write.

class activelogic.RewriteObjectPoolIdItem

Object representing manipulation of pool ID.

Parameters
  • direction (RewriteObjectDirection) – Direction of packets affected by this rewrite.

  • value (int) – Pool ID to write.

class activelogic.RewriteObjectHoplimitItem

Object representing manipulation of hoplimit.

Parameters
  • direction (RewriteObjectDirection) – Direction of packets affected by this rewrite.

  • value (int) – Hoplimit to write.