Liron Aravot has uploaded a new change for review.
Change subject: vm: return diskMapping on status() ......................................................................
vm: return diskMapping on status()
status() is used by API.Global.getVMList and should return also the disk mapping retrieved by the guest agent.
Change-Id: Ia68ff3c36ba91cde893876a16fc6702419a60d49 Signed-off-by: Liron Aravot laravot@redhat.com --- M tests/vmTests.py M vdsm/rpc/vdsmapi-schema.json M vdsm/virt/vm.py 3 files changed, 39 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/97/33197/1
diff --git a/tests/vmTests.py b/tests/vmTests.py index 32fa5e0..a89a8d3 100644 --- a/tests/vmTests.py +++ b/tests/vmTests.py @@ -894,6 +894,9 @@
class FakeGuestAgent(object): + def __init__(self): + self.guestDiskMapping = {} + def getGuestInfo(self): return { 'username': 'Unknown', diff --git a/vdsm/rpc/vdsmapi-schema.json b/vdsm/rpc/vdsmapi-schema.json index db441f5..a2f2865 100644 --- a/vdsm/rpc/vdsmapi-schema.json +++ b/vdsm/rpc/vdsmapi-schema.json @@ -3434,6 +3434,29 @@ 'returns': ['UUID']}
## +# @GuestDiskMappingInfo: +# +# disk mapping information indexed by property name. +# +# @name: device logical name within the guest. +# +# Since: 4.16.0 +## +{'type': 'GuestDiskMappingInfo', + 'data': {'name': 'str'}} + + +## +# @GuestDisksMappingMap: +# +# guest disks mapping information indexed by serial. +# +# Since: 4.16.0 +## +{'map': 'GuestDisksMappingMap', + 'key': 'str', 'value': 'GuestDiskMappingInfo'} + +## # @VMFullInfo: # # Full information about VM. @@ -3499,6 +3522,11 @@ # # @guestIPs: A space separated string of assigned IPv4 addresses # +# @guestDiskMapping: A dictionary containing information about the disk +# mapping within the guest. The key is the device +# serial and the value is the mapping information. +# (New in version 4.16.0.) +# # @smartcardEnable: Info whether smartcard is enabled. # # @nicModel: The type of device that is exposed to the VM operating system @@ -3521,9 +3549,10 @@ 'username': 'str', 'emulatedMachine': 'str', 'pid': 'uint', 'spiceSslCipherSuite': 'str', 'cpuType': 'str', 'pauseCode': 'str', 'guestFQDN': 'str', 'displayIp': 'str', 'keyboardLayout': 'str', - 'displayPort': 'uint', 'guestIPs': 'str', 'smartcardEnable': 'bool', - 'nicModel': 'VmInterfaceDeviceModel', 'pitReinjection': 'bool', - 'status': 'str', 'clientIp': 'str'}} + 'displayPort': 'uint', 'guestIPs': 'str', + 'guestDiskMapping': 'GuestDisksMappingMap', + 'smartcardEnable': 'bool', 'nicModel': 'VmInterfaceDeviceModel', + 'pitReinjection': 'bool', 'status': 'str', 'clientIp': 'str'}}
## # @Host.getVMFullList: diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index 0f9e4ce..548ce18 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -2852,8 +2852,10 @@ # used by API.Global.getVMList self.conf['status'] = self.lastStatus # Filter out any internal keys - return dict((k, v) for k, v in self.conf.iteritems() - if not k.startswith("_")) + status = dict((k, v) for k, v in self.conf.iteritems() + if not k.startswith("_")) + status['guestDiskMapping'] = self.guestAgent.guestDiskMapping + return status
def getStats(self): """
Tal Nisan has posted comments on this change.
Change subject: vm: return diskMapping on status() ......................................................................
Patch Set 3:
Rerun-Hooks: all
Liron Aravot has posted comments on this change.
Change subject: vm: return diskMapping on status() ......................................................................
Patch Set 6: Verified+1
Dan Kenigsberg has posted comments on this change.
Change subject: vm: return diskMapping on status() ......................................................................
Patch Set 6: Code-Review-1
We are way past feature freeze. 3.5.0 is very much delayed already. We should not take this into the stable branch before 3.5.0 GA is out.
Liron Aravot has posted comments on this change.
Change subject: vm: return diskMapping on status() ......................................................................
Patch Set 7: Verified+1
Nir Soffer has posted comments on this change.
Change subject: vm: return diskMapping on status() ......................................................................
Patch Set 7: Code-Review-1
(1 comment)
http://gerrit.ovirt.org/#/c/33197/7/vdsm/rpc/vdsmapi-schema.json File vdsm/rpc/vdsmapi-schema.json:
Line 3538: # Line 3539: # @guestDiskMapping: A dictionary containing information about the disk Line 3540: # mapping within the guest. The key is the device Line 3541: # serial and the value is the mapping information. Line 3542: # (New in version 4.16.0.) Latest release is 4.16.7, and it does not include this key. I think the best guess is 4.16.8. Line 3543: # Line 3544: # @smartcardEnable: Info whether smartcard is enabled. Line 3545: # Line 3546: # @nicModel: The type of device that is exposed to the VM operating system
Nir Soffer has posted comments on this change.
Change subject: vm: return diskMapping on status() ......................................................................
Patch Set 8: Code-Review+1
Liron Aravot has posted comments on this change.
Change subject: vm: return diskMapping on status() ......................................................................
Patch Set 8: Verified+1
Yaniv Bronhaim has posted comments on this change.
Change subject: vm: return diskMapping on status() ......................................................................
Patch Set 8: Code-Review-1
please add links to the patches in master branch
Yaniv Bronhaim has posted comments on this change.
Change subject: vm: return diskMapping on status() ......................................................................
Patch Set 10: Code-Review+2
next time remember the links. i added them for you
Yaniv Bronhaim has submitted this change and it was merged.
Change subject: vm: return diskMapping on status() ......................................................................
vm: return diskMapping on status()
status() is used by API.Global.getVMList and should return also the disk mapping retrieved by the guest agent.
Reviewed-On: http://gerrit.ovirt.org/#/c/34636/ - Schema changes Reviewed-On: http://gerrit.ovirt.org/31700 Change-Id: Ia68ff3c36ba91cde893876a16fc6702419a60d49 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1063597 Signed-off-by: Liron Aravot laravot@redhat.com Reviewed-on: http://gerrit.ovirt.org/33197 Reviewed-by: Nir Soffer nsoffer@redhat.com Reviewed-by: Yaniv Bronhaim ybronhei@redhat.com --- M tests/vmTests.py M vdsm/rpc/vdsmapi-schema.json M vdsm/virt/vm.py 3 files changed, 40 insertions(+), 5 deletions(-)
Approvals: Nir Soffer: Looks good to me, but someone else must approve Yaniv Bronhaim: Looks good to me, approved Liron Aravot: Verified
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vm: return diskMapping on status() ......................................................................
Patch Set 11:
Build Successful
http://jenkins.ovirt.org/job/vdsm_3.5_create-rpms-fc20-x86_64_merged/70/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_3.5_create-rpms-el6-x86_64_merged/76/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_3.5_create-rpms-el7-x86_64_merged/74/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_3.5_create-rpms-fc19-x86_64_merged/74/ : SUCCESS
vdsm-patches@lists.fedorahosted.org