otupy.actuators.ctxd.ctxd_actuator_docker.CTXDActuator_docker
- class CTXDActuator_docker(domain, asset_id, hostname, ip, port, protocol, endpoint, transfer, encoding, actuators)
Bases:
CTXDActuatorCTXD implementation
This class provides an implementation of the CTXD Actuator.
Methods
connect_to_dockerget_connected_actuatorsReturns consumer data
get_container_linksget_container_serviceget_linksget_name_linksget_network_serviceReturns the list of current services
get_services_hosting_vmQuery action
Entry point for running commands
Attributes
actuatorsasset_idconndomainencodingendpointhostnameipIt identifies the type of the service
It identifies the type of the service
Name of the service
portprotocolName of the service
transfer- __init__(domain, asset_id, hostname, ip, port, protocol, endpoint, transfer, encoding, actuators)
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()
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
- my_links: ArrayOf = None
It identifies the type of the service
- my_services: ArrayOf = None
Name 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