Commit e910aecc authored by Aurélien Dunand's avatar Aurélien Dunand
Browse files

Add a tag for job type

parent 06136795
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -39,6 +39,9 @@ class AllocationJob(Job):
    # single virtual machine:
    allocation_lock = threading.Lock()

    def job_type(self):
        return 'allocation'

    def job(self, server, client, expanded_vmspec, tql_target=None):
        allocator = Allocator(self.logger.getChild('allocator'), server, client)

+3 −0
Original line number Diff line number Diff line
@@ -36,6 +36,9 @@ class CloneJob(Job):
     * author: login of the author cli
    """

    def job_type(self):
        return 'clone'

    def job(self, server, client, hv_source, vm_name, hv_dest, new_vm_name):
        self._func_cancel_xfer = None  # Callback to a function used to cancel
                                       # a disk transfert
+3 −0
Original line number Diff line number Diff line
@@ -33,6 +33,9 @@ class ColdMigrationJob(Job):
     * author: login of the author cli
    """

    def job_type(self):
        return 'migration.cold'

    def job(self, server, client, hv_source, vm_name, hv_dest):
        self._func_cancel_xfer = None  # Callback to a function used to cancel
                                       # a disk transfert
+3 −0
Original line number Diff line number Diff line
@@ -23,6 +23,9 @@ class DiskCopyJob(Job):
    """ Copy a disk between two nodes.
    """

    def job_type(self):
        return 'diskcopy'

    def job(self, server, client, source_id, source_pool, source_vol, dest_id, dest_pool, dest_vol):
        self._func_cancel_xfer = None  # Callback to a function used to cancel a disk transfert

+3 −0
Original line number Diff line number Diff line
@@ -35,6 +35,9 @@ class HotMigrationJob(Job):
     * author: login of the author cli
    """

    def job_type(self):
        return 'migration.hot'

    def job(self, server, client, hv_source, vm_name, hv_dest):
        vm_id = '%s.%s' % (hv_source, vm_name)

Loading