karbor.services.operationengine package

Submodules

karbor.services.operationengine.api module

Handles all requests relating to OperationEngine.

class karbor.services.operationengine.api.API(db_driver=None)

Bases: karbor.db.base.Base

API for interacting with the OperationEngine manager.

create_scheduled_operation(context, operation)
create_trigger(context, trigger)
delete_scheduled_operation(context, operation_id, trigger_id)
delete_trigger(context, trigger_id)
resume_scheduled_operation(context, operation_id, trigger_id)
suspend_scheduled_operation(context, operation_id, trigger_id)
update_trigger(context, trigger)
verify_trigger(context, trigger)

karbor.services.operationengine.karbor_client module

karbor.services.operationengine.karbor_client.create(context, **kwargs)
karbor.services.operationengine.karbor_client.get_karbor_endpoint()

karbor.services.operationengine.manager module

OperationEngine Service

class karbor.services.operationengine.manager.OperationEngineManager(service_name=None, *args, **kwargs)

Bases: karbor.manager.Manager

karbor OperationEngine Manager.

RPC_API_VERSION = '1.0'
cleanup_host()

Hook to do cleanup work when the service shuts down.

Child classes should override this method.

create_scheduled_operation(**kwargs)
create_trigger(**kwargs)
delete_scheduled_operation(**kwargs)
delete_trigger(**kwargs)
property executor
init_host(**kwargs)

Handle initialization if this is a standalone service.

A hook point for services to execute tasks before the services are made available (i.e. showing up on RPC and starting to accept RPC calls) to other components. Child classes should override this method.

property operation_manager
resume_scheduled_operation(**kwargs)
suspend_scheduled_operation(**kwargs)
target = <Target version=1.0>
property trigger_manager
update_trigger(**kwargs)
property user_trust_manager
verify_trigger(**kwargs)

karbor.services.operationengine.operation_manager module

Manage all operations.

class karbor.services.operationengine.operation_manager.OperationManager(user_trust_manager)

Bases: object

Manage all operation classes which are defined at operations dir.

check_operation_definition(operation_type, operation_definition)

Check operation definition.

Parameters
  • operation_type – the type of operation

  • operation_definition – the definition of operation

Raises

InvalidInput – if the operation_type is invalid or InvalidOperationDefinition if operation_definition is invalid

run_operation(operation_type, operation_definition, **kwargs)

Run operation.

Parameters
  • operation_type – the type of operation

  • operation_definition – the definition of operation

Raises

InvalidInput – if the operation_type is invalid.

karbor.services.operationengine.rpcapi module

Client side of the OperationEngine manager RPC API.

class karbor.services.operationengine.rpcapi.OperationEngineAPI

Bases: object

Client side of the OperationEngine rpc API.

API version history:

1.0 - Initial version.

RPC_API_VERSION = '1.0'
create_scheduled_operation(ctxt, operation)
create_trigger(ctxt, trigger)
delete_scheduled_operation(ctxt, operation_id, trigger_id)
delete_trigger(ctxt, trigger_id)
resume_scheduled_operation(ctxt, operation_id, trigger_id)
suspend_scheduled_operation(ctxt, operation_id, trigger_id)
update_trigger(ctxt, trigger)
verify_trigger(ctxt, trigger)

karbor.services.operationengine.user_trust_manager module

class karbor.services.operationengine.user_trust_manager.UserTrustManager

Bases: object

add_operation(context, operation_id)
delete_operation(context, operation_id)
get_token(user_id, project_id)
resume_operation(operation_id, user_id, project_id, trust_id)

Module contents