otupy.actuators.ctxd.ctxd_actuator_openstack.CTXDActuator_openstack
- class CTXDActuator_openstack(auth, **kwargs)
Bases:
CTXDActuatorOpenstack Actuator Manager
Extend the base CTDXActuator to retrieve services and links for a Openstack cluster. Currently discovery is mostly limited to vms, hypervisors, and OpenStack sw components. It should be extended in future releases with additional resources (e.g., networks, ports).
Methods
Automatically discover links between OpenStack components
Discover all services related to OpenStack
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__(auth, **kwargs)
Initialize the actuator
- Parameters:
auth – (mandatory) Authentication information to connect to OpenStack.
config – (optional) Include additional info for configuration the OpenStack connection (e.g., “cacert” certificate of a custom CA).
specifiers – (optional) The identification of this Actuator.
owner – (optional) Onwer of this service.
peers – (optional) A list of peer services, including their consumer endpoints.
- discover_links()
Automatically discover links between OpenStack components
The current implementation discovers links between: - OpenStack services (nove) and VMs (servers) - VMs (servers) and physical servers (hypervisors) - SLPF firewall (iptables) and VMs (servers) - VMs (servers) and computers (System and application software), only from a configuration file
- discover_services()
Discover all services related to OpenStack
OpenStack is a complex framework, where a bundle of applications create and manage virtual resources, including VMs, networks, image repositories.
- 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