Vinzenz Feenstra has uploaded a new change for review.

Change subject: Handle and store serial to guest device names mapping
......................................................................

Handle and store serial to guest device names mapping

The serial to guest device name mapping helps to identify 'physical' hard
drives in the guest OS from the outside and correlate our disk images to
those drives and their name in the guest OS.

Guest agent implementation: http://gerrit.ovirt.org/#/c/31465/

Change-Id: I69db18414b17b23eb7bcbfbd8b2584f622e53276
Bug-Url: https://bugzilla.redhat.com/1127607
Signed-off-by: Vinzenz Feenstra <[email protected]>
---
M vdsm/virt/guestagent.py
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/97/31497/1

diff --git a/vdsm/virt/guestagent.py b/vdsm/virt/guestagent.py
index 31c0a26..2dd2613 100644
--- a/vdsm/virt/guestagent.py
+++ b/vdsm/virt/guestagent.py
@@ -120,6 +120,7 @@
         self._sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
         self._stopped = True
         self.guestStatus = None
+        self.guestDiskMapping = []
         self.guestInfo = {
             'username': user,
             'memUsage': 0,
@@ -302,7 +303,14 @@
                 disk['total'] = str(disk['total'])
                 disk['used'] = str(disk['used'])
                 disks.append(disk)
+            self.guestDiskMapping = []
             self.guestInfo['disksUsage'] = disks
+            if 'mapping' in args:
+                for disk in args['mapping']:
+                    # disk['serial']
+                    # disk['name']
+                    self.guestDiskMapping.append({'serial': disk['serial'],
+                                                  'name': disk['name']})
         elif message == 'number-of-cpus':
             self.guestInfo['guestCPUCount'] = int(args['count'])
         else:


-- 
To view, visit http://gerrit.ovirt.org/31497
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I69db18414b17b23eb7bcbfbd8b2584f622e53276
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to