otupy.actuators.ctxd.ctxd_actuator.CTXDActuator
- class CTXDActuator(**kwargs)
Bases:
objectContext Discovery actuator for the ctxd profile.
This class provides the base implementation of the CTXD Actuator.
Methods
Returns consumer data
Returns the list of current services
Query action
Entry point for running commands
Attributes
It identifies the type of the service
Name of the service
- __init__(**kwargs)
Initialization
Common parameters expected for all actuators:
auth: Authentication information to connect to external APIs for discovering services and links
config: Additional configuration parameters specific for each actuator (ofter related to endpoints or parameters of the external APIs)
- peers: A list of Consumers that host the definition of external services (usually found as peers in links). They are currently provided
at initialization time, waiting for some more automated discovery mechanism.
owner: The owner of the resource (in case of cloud resources, effective owners should be discovered by the actuator)
specifiers: This is the description of the actuator (e.g., its identifiers).
- get_consumer(service_name: Name) Consumer
Returns consumer data
Returns the Consumer data for the selected service name.
- Parameters:
service_name – name of the service which consumer is searched.
- Returns:
The consumer serving the given service, if any, None otherwise.
- get_services(name: Name = None, filter: ServiceType = None) []
Returns the list of current services
Returns the list of discovered services. Filter by name and type.
- Parameters:
name – The name of the service to retrieve (all if not set).
filter – The type of service (given by a void instance of ServiceType).
- Returns:
A list of services that match the searching criteria.
- links: ArrayOf = None
It identifies the type of the service
- query(cmd)
Query action
This method implements the query action.
- Parameters:
cmd – The Command including Target and optional Args.
- Returns:
A Response including the result of the query and appropriate status code and messages.
- run(cmd)
Entry point for running commands
This is the actuator entry point to receive OpenC2 commands from the otupy Consumer.
- Parameters:
cmd – A Command in the format of the otupy framework.
- Returns:
Response to the provided command.
- services: ArrayOf = None
Name of the service