openc2lib.core.actions
OpenC2 Actions
This module defines the list of Actions defined by the Language Specification.
1"""OpenC2 Actions 2 3 This module defines the list of Actions defined by the Language Specification. 4""" 5 6import aenum 7from openc2lib.types.basetypes import Enumerated 8 9# TODO: Add full list of basic actions listed in Sec. 3.3.1 10class Actions(Enumerated): 11 """OpenC2 Actions list 12 13 This class enumerates the OpenC2 Actions listed in Sec. 3.3.1.1 of the Language Specification. 14 The enumeration refers to the ID used in the Language Specification. 15 16 OpenC2 Actions SHALL NOT be extended by Profiles. 17 """ 18 scan = 1 19 locate = 2 20 query = 3 21 deny = 6 22 allow = 8 23 update = 16 24 delete = 20 25 26 27# DISABLED because not allowed by the Language Specification. 28# New actions can be registered with the following syntax: 29# Actions.add('<action_name>', <action_id>) 30# <action_name> must be provided as a str 31# @classmethod 32# def add(cls, name, identifier): 33# aenum.extend_enum(Actions, name, identifier) 34 35 def __repr__(self): 36 return self.name
11class Actions(Enumerated): 12 """OpenC2 Actions list 13 14 This class enumerates the OpenC2 Actions listed in Sec. 3.3.1.1 of the Language Specification. 15 The enumeration refers to the ID used in the Language Specification. 16 17 OpenC2 Actions SHALL NOT be extended by Profiles. 18 """ 19 scan = 1 20 locate = 2 21 query = 3 22 deny = 6 23 allow = 8 24 update = 16 25 delete = 20 26 27 28# DISABLED because not allowed by the Language Specification. 29# New actions can be registered with the following syntax: 30# Actions.add('<action_name>', <action_id>) 31# <action_name> must be provided as a str 32# @classmethod 33# def add(cls, name, identifier): 34# aenum.extend_enum(Actions, name, identifier) 35 36 def __repr__(self): 37 return self.name
OpenC2 Actions list
This class enumerates the OpenC2 Actions listed in Sec. 3.3.1.1 of the Language Specification. The enumeration refers to the ID used in the Language Specification.
OpenC2 Actions SHALL NOT be extended by Profiles.
Inherited Members
- aenum._enum.Enum
- name
- value
- values