Exemple #1
0
 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_service=self, 
                   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
Exemple #2
0
    def add_pilot_data_service(self, pds):
        """ Add a PilotDataService 

            Keyword arguments:
            pds -- The PilotDataService to add.

            Return:
            None
        """
        self.pilot_data_services.append(pds)
        CoordinationAdaptor.update_cds(self.url, self)
Exemple #3
0
    def add_pilot_compute_service(self, pjs):
        """ Add a PilotJobService to this CDS.

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

            Return:
            Result
        """
        self.pilot_job_services.append(pjs)
        CoordinationAdaptor.update_cds(self.url, self)
Exemple #4
0
    def remove_pilot_data_service(self, pds):

        """ Remove a PilotDataService 
            
            Keyword arguments:
            pds -- The PilotDataService to remove 
            
            Return:
            None
        """
        self.pilot_data_services.remove(pds)
        CoordinationAdaptor.update_cds(self.url, self)
Exemple #5
0
    def submit_compute_unit(self, compute_unit_description):
        """ Submit a WU to this Work Unit Service.

            Keyword argument:
            cud -- 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
Exemple #6
0
    def remove_pilot_compute_service(self, pjs):
        """ 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(pjs)
        CoordinationAdaptor.update_cds(self.url, self)