def add_pilot_data_service(self, pds): """ Add a PilotDataService @param pds: The PilotDataService to add. """ self.pilot_data_services.append(pds) CoordinationAdaptor.update_cds(self.url, self)
def add_pilot_compute_service(self, pcs): """ Add a PilotComputeService to this CDS. @param pcs: The PilotComputeService to which this ComputeDataService will connect. """ self.pilot_job_services.append(pcs) CoordinationAdaptor.update_cds(self.url, self)
def submit_data_unit(self, data_unit_description): """ creates a data unit object and binds it to a physical resource (a pilotdata) """ du = DataUnit(pilot_data=None, data_unit_description=data_unit_description) self.data_units[du.id] = du self.du_queue.put(du) # queue currently not persisted CoordinationAdaptor.update_cds(self.url, self) return du
def submit_data_unit(self, data_unit_description): """ creates a data unit object and binds it to a physical resource (a pilotdata) """ du = DataUnit(pilot_data=None, data_unit_description=data_unit_description) self.data_units[du.id]=du self.du_queue.put(du) # queue currently not persisted CoordinationAdaptor.update_cds(self.url, self) return du
def add_pilot_compute_service(self, pcs): """ Add a PilotComputeService to this CDS. @param pcs: The PilotComputeService to which this ComputeDataService will connect. """ self.pilot_job_services.append(pcs) CoordinationAdaptor.update_cds(self.url, self) if len(self.pilot_job_services)>1: logger.error("Decentral ComputeDataService only supports 1 PilotComputeService") raise PilotError("Decentral ComputeDataService only supports 1 PilotComputeService")
def remove_pilot_compute_service(self, pcs): """ Remove a PilotJobService from this CDS. Note that it won't cancel the PilotComputeService, it will just no longer be connected to this CDS. Keyword arguments: @param pcs: The PilotComputeService to remove from this ComputeDataService. """ self.pilot_job_services.remove(pcs) CoordinationAdaptor.update_cds(self.url, self)
def submit_compute_unit(self, compute_unit_description): """ Submit a CU to this Compute Data Service. @param compute_unit_description: The ComputeUnitDescription from the application @return: ComputeUnit object """ cu = ComputeUnit(compute_unit_description, self) self.compute_units[cu.id] = cu self.cu_queue.put(cu) CoordinationAdaptor.update_cds(self.url, self) return cu
def submit_compute_unit(self, compute_unit_description): """ Submit a CU to this Compute Data Service. @param compute_unit_description: The ComputeUnitDescription from the application @return: ComputeUnit object """ cu = ComputeUnit(compute_unit_description, self) self.compute_units[cu.id]=cu self.cu_queue.put(cu) CoordinationAdaptor.update_cds(self.url, self) return cu
def remove_pilot_compute_service(self, pcs): """ Remove a PilotJobService from this CDS. Note that it won't cancel the PilotJobService, it will just no longer be connected to this WUS. Keyword arguments: pilotjob_services -- The PilotJob Service(s) to remove from this Work Unit Service. Return: Result """ self.pilot_job_services.remove(pcs) CoordinationAdaptor.update_cds(self.url, self) if len(self.pilot_job_services)>1: logger.error("Decentral ComputeDataService only supports 1 PilotComputeService") raise PilotError("Decentral ComputeDataService only supports 1 PilotComputeService")
def remove_pilot_data_service(self, pds): """ Remove a PilotDataService @param pds: The PilotDataService to remove """ self.pilot_data_services.remove(pds) CoordinationAdaptor.update_cds(self.url, self)