Package onep :: Package policyservice :: Module action :: Class Police
[frames] | no frames]

Class Police


Action to police traffic.

Instance Methods
 
__init__(self, rate_units, burst_units, cir, pir=0, cbs=0, ebs=0, conform_action=0, conform_value=0, exceed_action=0, exceed_value=0, violate_action=0, violate_value=0, conform_color=0, exceed_color=0)
x.__init__(...) initializes x; see help(type(x)) for signature
 
__eq__(self, obj)

Inherited from Action: check_action_support, get_action_type

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
Enum PoliceActionType = enum('POLICE_ACTION_UNKNOWN', 'POLICE_ACTIO...
Enum representing the Police action types..

Inherited from Action: ActionOpCode, ActionType, BandwidthUnits, BurstUnits, Direction, RateUnits, ThresholdUnits, __metaclass__, action_type, handle, op_code

Properties

Inherited from object: __class__

Method Details

__init__(self, rate_units, burst_units, cir, pir=0, cbs=0, ebs=0, conform_action=0, conform_value=0, exceed_action=0, exceed_value=0, violate_action=0, violate_value=0, conform_color=0, exceed_color=0)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • rate_units (RateUnits) - The units for measuring the rate
  • burst_units (BurstUnits) - The units for measuring the burst
  • cir (int) - Committed information rate (CIR)
  • pir (int) - Peak information rate (PIR)
  • cbs (int) - Committed burst size (CBS)
  • ebs (int) - Excess burst size (EBS)
  • conform_color (int) - Conform-color class - for color-aware policing, this is the handle of the class that specifies the conform-color for incoming packets marked by a previous node.
  • exceed_color (int) - Exceed-color class - for color-aware policing, this is the handle of the class that specifies the exceed-color for incoming packets marked by a previous node.
  • conform_action (PoliceActionType) - Action applied to conforming traffic
  • exceed_action (PoliceActionType) - Action applied to excess traffic
  • violate_action (PoliceActionType) - Action applied to excess traffic
  • conform_value (int) - Action value applied to conforming traffic
  • exceed_value (int) - Action value applied to excess traffic
  • violate_value (int) - Action value applied to traffic in violation
Overrides: object.__init__

Class Variable Details

PoliceActionType

Enum representing the Police action types..

POLICE_ACTION_DROP: Drop POLICE_ACTION_XMIT: Transmit POLICE_ACTION_SET_QOS_GROUP: Set QoS group POLICE_ACTION_SET_MPLS_EXP: Set MPLS experimental POLICE_ACTION_SET_DSCP: Set DSCP POLICE_ACTION_SET_L2_COS: Set L2CoS POLICE_ACTION_SET_MPLS_EXP_TOPMOST: Set MPLS experimental topmost POLICE_ACTION_SET_TUNNEL_DSCP: Set tunnel DSCP

Type:
Enum
Value:
enum('POLICE_ACTION_UNKNOWN', 'POLICE_ACTION_DROP', 'POLICE_ACTION_XMI\
T', 'POLICE_ACTION_SET_QOS_GROUP', 'POLICE_ACTION_SET_MPLS_EXP', 'POLI\
CE_ACTION_SET_DSCP', 'POLICE_ACTION_SET_L2_COS', 'POLICE_ACTION_SET_MP\
LS_EXP_TOPMOST', 'POLICE_ACTION_SET_TUNNEL_DSCP')