Liron Aravot has uploaded a new change for review.

Change subject: Define the SDM.move_domain_device API
......................................................................

Define the SDM.move_domain_device API

This patch defines the SDM.move_domain_device API that will
be used to move data from a block domain device to other devices
that are part of the domain.
This API will be used currently prior to reducing a device from a
storage domain.

Change-Id: If6dce392d4cf157c42a47f70e972fa5d1d9dbdc2
Signed-off-by: Liron Aravot <lara...@redhat.com>
---
M lib/api/vdsm-api.yml
M vdsm/API.py
M vdsm/storage/hsm.py
3 files changed, 42 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/34/64434/1

diff --git a/lib/api/vdsm-api.yml b/lib/api/vdsm-api.yml
index 02e1ede..7a59112 100644
--- a/lib/api/vdsm-api.yml
+++ b/lib/api/vdsm-api.yml
@@ -7070,7 +7070,6 @@
         values:
         - *CopyDataDIVEndpoint
 
-
 Host.setupNetworks:
     added: '3.1'
     description: Reconfigure host networking by adding, removing, and editing
@@ -9874,3 +9873,25 @@
     -   description: The destination endpoint
         name: destination
         type: *CopyDataEndpoint
+
+SDM.move_domain_device:
+    added: '4.1'
+    description: Moves the data stored on a Storage Domain block device PV to 
other PVs that are part of the domain.
+    params:
+    -   description: A UUID to be used for tracking the job progress
+        name: job_id
+        type: *UUID
+
+    -   description: The UUID of the Storage Domain
+        name: sd_id
+        type: *UUID
+
+    -   description: The GUID of block device to move the data from
+        name: src_guid
+        type: string
+
+    -   defaultvalue: null
+        description: Optional list of block devices GUIDs to move the data to
+        name: dst_guids
+        type:
+        - string
diff --git a/vdsm/API.py b/vdsm/API.py
index 57a30df..e2a163a 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -1636,3 +1636,7 @@
 
     def copy_data(self, job_id, source, destination):
         return self._irs.sdm_copy_data(job_id, source, destination)
+
+    def move_domain_device(self, job_id, sd_id, src_guid, dst_guids):
+        return self._irs.sdm_move_domain_device(job_id, sd_id, src_guid,
+                                                dst_guids)
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index d622ffc..3083042 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -3523,3 +3523,19 @@
     def sdm_copy_data(self, job_id, source, destination):
         job = sdm.api.copy_data.Job(job_id, None, source, destination)
         self.sdm_schedule(job)
+
+    @public
+    def sdm_move_domain_device(self, job_id , sd_id, src_guid, dst_guids):
+        """
+        Moves the data stored on a PV to other PVs that are part of the 
Storage Domain.
+
+        :param job_id: The UUID of the job.
+        :type job_id: UUID
+        :param sd_id: The UUID of the storage domain that owns the PV.
+        :type sd_id: UUID
+        :param src_guid: The GUID of block device to move the data from
+        :type src_guid: str
+        :param dst_guids: Optional list of block devices GUIDs to move the 
data to
+        :type dst_guids: str
+        """
+        raise NotImplementedError()


-- 
To view, visit https://gerrit.ovirt.org/64434
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If6dce392d4cf157c42a47f70e972fa5d1d9dbdc2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Adam Litke <ali...@redhat.com>
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
_______________________________________________
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org

Reply via email to