This module contains TrafficObject implementation.
There is no need to import this module directly. Use the methods of the Ruleset object to create and manipulate TrafficObjects.
>>> o = r.trafficobject_add('Test TrafficObject')
Base class for TrafficObjects.
This class should not be instantiated and should instead be created and accessed through:
Class variables are read-only, use methods to alter the object.
Methods: | ||
---|---|---|
Ungrouped | rename(self, newname) Rename the current object |
|
set_dimensions(self, new_dimensions) Set 'dimensions' class variable |
||
set_export_format(self, new_export_format) Set 'export_format' class variable |
||
set_flags(self, *reset, **flags) Set or reset one or more of the flags of the TrafficObject |
||
set_metrics(self, new_metrics) Set 'metrics' class variable |
||
set_partition_key(self, new_partition_key) Set 'partition_key' class variable |
||
set_table_name(self, new_table_name) Set 'table_name' class variable |
Properties: | |
---|---|
creation_date | Date and time when this object was created |
creator | Username that created this object |
dimensions | Comma separated string with the dimensions to be collected for this |
export_format | Export type |
flags | TrafficObjectFlags object containing the flags set on this TrafficObject |
id | id number of this object |
is_global | True if this object resides on another system |
metrics | Comma separated string with the metrics to be collected for this |
modification_date | Date and time when this object was last modified |
modified_by | Username that last modified this object |
name | Name of the TrafficObject |
partition_key | Comma separated string with with the dimensions that will for the |
systemid | System ID of the PacketLogic this object belongs to |
table_name | Name of table that the TrafficObject will be published to |
Rename the current object
destroys netobject cache
str
) - The name that the object should have after rename process
Set 'dimensions' class variable
str
) - The dimensions that should be set for the objectSet 'export_format' class variable
int
) - The export format that should be set for the objectSet or reset one or more of the flags of the TrafficObject. You may also reset all flags with the single argument None, or clone an existing flags object. You may combine them.
If only keyword argument(s) are used, only the specified flags will be affected. For a list of valid flags see the TrafficObjectFlags class. Use a trueish value to set the flag, or falseish value to reset it.
>>> obj.set_flags(insights=True, kafka=False) >>> obj.flags TrafficObjectFlags(insights=True)
>>> obj.set_flags(None) >>> obj.flags TrafficObjectFlags(None)
>>> obj.set_flags(another_shobj.flags) >>> obj.flags TrafficObjectFlags(dump_to_disk=True)
>>> obj.set_flags(None, kafka=True) >>> obj.flags TrafficObjectFlags(insights=True)
Set 'metrics' class variable
str
) - The metrics that should be set for the objectSet 'partition_key' class variable
str
) - The partition key that should be set for the objectSet 'table_name' class variable
int
) - Date and time when this object was created
Username that created this object
Comma separated string with the dimensions to be collected for this TrafficObject
Export type
TrafficObjectFlags object containing the flags set on this TrafficObject
id number of this object
True if this object resides on another system
Comma separated string with the metrics to be collected for this TrafficObject
Date and time when this object was last modified
Username that last modified this object
Name of the TrafficObject
Comma separated string with with the dimensions that will for the Partition key for this TrafficObject
System ID of the PacketLogic this object belongs to.
Name of table that the TrafficObject will be published to
Properties: | |
---|---|
column | The column name used when exporting the data |
display_name | Descriptive name of the TrafficObject dimension |
doc | Documentation for the TrafficObject dimension |
flags | TrafficObject dimension flags |
id | id number of the TrafficObject dimension |
name | Name of the TrafficObject dimension in exports |
The column name used when exporting the data
Descriptive name of the TrafficObject dimension
Documentation for the TrafficObject dimension
TrafficObject dimension flags
id number of the TrafficObject dimension
Name of the TrafficObject dimension in exports
Used internaly to represent the flags on a TrafficObject.
Use TrafficObjects.set_flags to change the flags.
Methods: | ||
---|---|---|
Inherited from BaseFlags | items(self) Return a list of (prop, value) tuples, similar to dict.items() |
Properties: | |
---|---|
dump_to_disk | Enable dump to disk for object |
ipfix | Enable export of object to Insights Data Storage |
kafka | Enable export of object over Kafka |
Return a list of (prop, value) tuples, similar to dict.items().
Enable dump to disk for object
Enable export of object to Insights Data Storage
Enable export of object over Kafka
Properties: | |
---|---|
display_name | Descriptive name of the TrafficObject metric |
doc | Documentation for the TrafficObject metric |
flags | TrafficObject metric flags |
id | id number of the TrafficObject metric |
name | Name of the TrafficObject metric in exports |
Descriptive name of the TrafficObject metric
Documentation for the TrafficObject metric
TrafficObject metric flags
id number of the TrafficObject metric
Name of the TrafficObject metric in exports