Package pilot :: Package api :: Package compute :: Module api :: Class ComputeUnitService

Class ComputeUnitService

source code


ComputeUnitService (CUS).

Please use ComputeDataService!

The ComputeUnitService is the application's interface to submit ComputeUnits to the Pilot-Manager in the P* Model.

It can provide the application with a list of ComputeUnits that are managed by the Pilot-Manager.

The ComputeUnitService is linked to a PilotComputeService for the actual execution of the ComputeUnits.

Instance Methods
 
__init__(self, wus_id=None)
Create a Work Service object.
source code
 
add_pilot_job_service(self, pjs)
Add a PilotComputeService to this WUS.
source code
 
remove_pilot_job_service(self, pjs)
Remove a PilotComputeService from this WUS.
source code
 
submit_compute_unit(self, wud)
Submit a WU to this Work Unit Service.
source code
 
cancel(self)
Cancel the WUS.
source code
 
get_state(self) source code
 
get_id(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, wus_id=None)
(Constructor)

source code 

Create a Work Service object.

Keyword arguments: wus_id -- Reconnect to an existing WUS (optional).

Overrides: object.__init__

add_pilot_job_service(self, pjs)

source code 
Add a PilotComputeService to this WUS.

Keyword arguments:
pilotjob_services -- The PilotCompute Service(s) to which this 
                     Work Unit Service will connect.

Return:
Result

remove_pilot_job_service(self, pjs)

source code 
Remove a PilotComputeService from this WUS.

Note that it won't cancel the PilotComputeService, it will just no
longer be connected to this WUS.

Keyword arguments:
pilotjob_services -- The PilotCompute Service(s) to remove from this
                     Work Unit Service. 

Return:
Result

submit_compute_unit(self, wud)

source code 

Submit a WU to this Work Unit Service.

Keyword argument: wud -- The WorkUnitDescription from the application

Return: WorkUnit object

cancel(self)

source code 

Cancel the WUS.

Cancelling the WUS also cancels all the WUs submitted to it.

Keyword arguments: None

Return: Result