Change in vdsm[master]: v2v: add volume size to disk info

shavivi at redhat.com shavivi at redhat.com
Tue Jan 27 07:40:10 UTC 2015


Shahar Havivi has posted comments on this change.

Change subject: v2v: add volume size to disk info
......................................................................


Patch Set 12:

(2 comments)

http://gerrit.ovirt.org/#/c/36263/12/vdsm/rpc/vdsmapi-schema.json
File vdsm/rpc/vdsmapi-schema.json:

Line 3652: #
Line 3653: # Since: 4.17.0
Line 3654: ##
Line 3655: {'type': 'ExternalDiskInfo',
Line 3656:  'data': {'*dev': 'str', '*alias': 'str', '*capacity': 'uint', '*allocation': 'uint'}}
> does not pass test_line_length
Done
Line 3657: 
Line 3658: ##
Line 3659: # @ExternalNetworkInfo:
Line 3660: #


http://gerrit.ovirt.org/#/c/36263/12/vdsm/v2v.py
File vdsm/v2v.py:

Line 119: def _add_disk_info(conn, disk):
Line 120:     if 'alias' in disk.keys():
Line 121:         try:
Line 122:             vol = conn.storageVolLookupByPath(disk['alias'])
Line 123:             disk['capacity'] = str(vol.info()[1])
> libvirt calls may be costly; it can also provide non-consistent values. bet
Done
Line 124:             disk['allocation'] = str(vol.info()[2])
Line 125:         except libvirt.libvirtError:
Line 126:             logging.exception("Error getting disk size")
Line 127: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic7e9ba73514292cc2bb4a025d286e2c732e88a75
Gerrit-PatchSet: 12
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list