This module contains FlowObject implementation.
There is no need to import this module directly. Use the methods of the Ruleset object to create and manipulate FlowObjects.
>>> o = r.flowobject_add('Test FlowObject')
Base class for FlowObjects.
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_collectors(self, new_collectors) Set 'collectors' 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 FlowObject |
||
set_partition_key(self, new_partition_key) Set 'partition_key' class variable |
||
set_templatestring(self, new_templatestring) Set 'templatestring' class variable |
Properties: | |
---|---|
collectors | IPFIX collectors |
creation_date | Date and time when this object was created |
creator | Username that created this object |
export_format | Export type |
flags | FlowObjectFlags object containing the flags set on this FlowObject |
id | id number of this object |
is_global | True if this object resides on another system (always false in 12.1) |
machineid | Use of property 'machineid' is deprecated since v11.0beta5, use 'systemid' |
modification_date | Date and time when this object was last modified |
modified_by | Username that last modified this object |
name | Name of the FlowObject |
partition_key | Partition key |
systemid | System ID of the PacketLogic this object belongs to |
templatestring | Template string |
Rename the current object
destroys netobject cache
str
) - The name that the object should have after rename process
Set 'collectors' class variable
>>> flowobject.set_collectors("[172.21.54.23]:4739,[172.21.54.38]:2055")
str
) - The collectors 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 FlowObject. 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 FlowObjectFlags class. Use a trueish value to set the flag, or falseish value to reset it.
>>> obj.set_flags(ipfix=True, kafka=False) >>> obj.flags FlowObjectFlags(ipfix=True)
>>> obj.set_flags(None) >>> obj.flags FlowObjectFlags(None)
>>> obj.set_flags(another_shobj.flags) >>> obj.flags FlowObjectFlags(dump_to_disk=True)
>>> obj.set_flags(None, kafka=True) >>> obj.flags FlowObjectFlags(ipfix=True)
Set 'partition_key' class variable
str
) - The partition key that should be set for the objectSet 'templatestring' class variable
str
) - The templatestring that should be set for the objectIPFIX collectors
Date and time when this object was created
Username that created this object
Export type
FlowObjectFlags object containing the flags set on this FlowObject.
id number of this object
True if this object resides on another system (always false in 12.1)
Use of property 'machineid' is deprecated since v11.0beta5, use 'systemid' instead.
Date and time when this object was last modified
Username that last modified this object
Name of the FlowObject
Partition key
System ID of the PacketLogic this object belongs to. (Replaces machineid)
Template string
Used internaly to represent the flags on a FlowObject.
Use FlowObjects.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 over Ipfix |
kafka | Enable export of object over Kafka |
start_record | Enable export of start record |
Return a list of (prop, value) tuples, similar to dict.items().
Enable dump to disk for object
Enable export of object over Ipfix
Enable export of object over Kafka
Enable export of start record