openc2lib.profiles.slpf.response

SLPF Response extensions

This module defines SLPF-specific extensions to OpenC2 Response. See Sec. 2.2 of the SLPF Specification.

 1""" SLPF Response extensions
 2
 3	This module defines SLPF-specific extensions to OpenC2 Response.
 4	See Sec. 2.2 of the SLPF Specification.
 5"""
 6import openc2lib as oc2
 7
 8import openc2lib.profiles.slpf.nsid as profile_name
 9from openc2lib.profiles.slpf.targettypes import RuleID
10
11class Results(oc2.Results):
12	""" SLPF Results
13
14		Extensions to the base class `openc2lib.core.response.Results`.
15		See Sec. 2.2.2 of the SLPF Specification.
16		The extension mechanism is described in the 
17		[Developing extensions](https://github.com/mattereppe/openc2lib/blob/main/docs/developingextensions.md#developing-extensions) Section of the main documentation.
18
19		Note that the same name is used as the base class, to make it simpler to 
20		remember. The recommended way to use in the code is to import the whole
21		slpf module as `slpf` and refer to this class as `slpf.Results`.
22	"""
23	extend = oc2.Results
24	""" The class to extend (`openc2lib.core.response.Results` defined in the core section). """
25	fieldtypes = oc2.Results.fieldtypes.copy()
26	""" Copy all `fieldtypes` defined in the base class. """
27	fieldtypes['rule_number']=RuleID
28	""" Extension with SLPF specific arguments (Sec. 2.2.2 of the SLPF Specification) """
29	nsid = profile_name
30	""" Namespace identifier to distinguish extensions """
class Results(openc2lib.core.response.Results):
12class Results(oc2.Results):
13	""" SLPF Results
14
15		Extensions to the base class `openc2lib.core.response.Results`.
16		See Sec. 2.2.2 of the SLPF Specification.
17		The extension mechanism is described in the 
18		[Developing extensions](https://github.com/mattereppe/openc2lib/blob/main/docs/developingextensions.md#developing-extensions) Section of the main documentation.
19
20		Note that the same name is used as the base class, to make it simpler to 
21		remember. The recommended way to use in the code is to import the whole
22		slpf module as `slpf` and refer to this class as `slpf.Results`.
23	"""
24	extend = oc2.Results
25	""" The class to extend (`openc2lib.core.response.Results` defined in the core section). """
26	fieldtypes = oc2.Results.fieldtypes.copy()
27	""" Copy all `fieldtypes` defined in the base class. """
28	fieldtypes['rule_number']=RuleID
29	""" Extension with SLPF specific arguments (Sec. 2.2.2 of the SLPF Specification) """
30	nsid = profile_name
31	""" Namespace identifier to distinguish extensions """

SLPF Results

Extensions to the base class openc2lib.core.response.Results. See Sec. 2.2.2 of the SLPF Specification. The extension mechanism is described in the Developing extensions Section of the main documentation.

Note that the same name is used as the base class, to make it simpler to remember. The recommended way to use in the code is to import the whole slpf module as slpf and refer to this class as slpf.Results.

extend = <class 'openc2lib.core.response.Results'>

The class to extend (openc2lib.core.response.Results defined in the core section).

fieldtypes = {'versions': <class 'openc2lib.types.basetypes.ArrayOf.__new__.<locals>.ArrayOf'>, 'profiles': <class 'openc2lib.types.basetypes.ArrayOf.__new__.<locals>.ArrayOf'>, 'pairs': <class 'openc2lib.types.datatypes.ActionTargets'>, 'rate_limit': <class 'int'>, 'rule_number': <class 'openc2lib.profiles.slpf.targettypes.RuleID'>}

Copy all fieldtypes defined in the base class.

nsid = 'slpf'

Namespace identifier to distinguish extensions

Inherited Members
openc2lib.core.response.Results
regext
set
openc2lib.types.basetypes.Map
todict
fromdict
builtins.dict
get
setdefault
pop
popitem
keys
items
values
update
fromkeys
clear
copy