Documentation Orchestrator

class motey.orchestrator.inter_node_orchestrator.InterNodeOrchestrator(logger, valmanager, service_repository, capability_repository, node_repository, communication_manager)[source]

This class orchestrates services. It will start and stop virtual instances of images defined in the service. It also can communicate with other nodes to start instances there if the requirements does not fit with the possibilities of the current node.

compare_capabilities(needed_capabilities_list, node_capabilities_dict)[source]

Compares two dicts with capabilities.

Parameters:
  • needed_capabilities_list (list) – the capabilities to compare with
  • node_capabilities_dict (list) – the capabilties to check
Returns:

True if all capabilities are fulfilled, otherwiese False

deploy_service(service)[source]

Deploy all images of a service to the related nodes.

Parameters:service (motey.models.service.Service) – the service which should be deployed
find_node(image)[source]

Try to find a node in the cluster which can be used to deploy the given image.

Parameters:image (motey.models.image.Image) – the image to be used
Returns:the IP of the node to be used or None if it does not found a node which fulfill all capabilities
get_service_status(service)[source]

Returns the service status.

Parameters:service (motey.models.service.Service) – the service which should be used
Returns:the status of the service
instantiate_service(service)[source]

Instantiate a service.

Parameters:service (motey.models.service.Service) – the service to be used.
terminate_service(service)[source]

Terminates a service.

Parameters:service (motey.models.service.Service) – the service to be used.