[vdsm/f18] Revert "update to v4.10.3-78-gb005b54"

Douglas Schilling Landgraf dougsland at fedoraproject.org
Mon Jan 14 18:22:56 UTC 2013


commit c5f49641628380da9d9e1fc9c0552284b4b20c0b
Author: Douglas Schilling Landgraf <dougsland at redhat.com>
Date:   Mon Jan 14 16:16:10 2013 -0500

    Revert "update to v4.10.3-78-gb005b54"
    
    This reverts commit 20ac961a631ca6c8aeef460a7340d2e02b4fc96b.

 0001-schema-Fix-schema-for-VM.updateDevice.patch   |   65 +++
 ...hema-Missing-comment-for-new-VmDeviceType.patch |   36 ++
 ...ort-CPU-thread-info-in-getVdsCapabilities.patch |   53 +++
 0004-caps.py-osversion-validate-OVIRT.patch        |   35 ++
 ...-libvirtd-didn-t-work-over-allinone-setup.patch |   37 ++
 0006-Integrate-Smartcard-support.patch             |  421 ++++++++++++++++++++
 sources                                            |    2 +-
 7 files changed, 648 insertions(+), 1 deletions(-)
---
diff --git a/0001-schema-Fix-schema-for-VM.updateDevice.patch b/0001-schema-Fix-schema-for-VM.updateDevice.patch
new file mode 100644
index 0000000..59cd4bc
--- /dev/null
+++ b/0001-schema-Fix-schema-for-VM.updateDevice.patch
@@ -0,0 +1,65 @@
+From 844f10a9aafd55018e9966a61dece726d3e62511 Mon Sep 17 00:00:00 2001
+From: Adam Litke <agl at us.ibm.com>
+Date: Wed, 12 Dec 2012 13:52:19 -0600
+Subject: [PATCH 1/3] schema: Fix schema for VM.updateDevice
+
+Another recent update broke the schema file.  I'll take the blame for this one
+since I approved the change :)  Some missing and/or malformed data in comments
+was causing the process-schema script to fail.  Another reason for validating
+the schema during the build.
+
+Change-Id: If88596050ace9511bcc7be65ee46645359e30532
+Signed-off-by: Adam Litke <agl at us.ibm.com>
+Reviewed-on: http://gerrit.ovirt.org/10012
+Reviewed-by: Saggi Mizrahi <smizrahi at redhat.com>
+Tested-by: Saggi Mizrahi <smizrahi at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/10019
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Tested-by: Antoni Segura Puimedon <asegurap at redhat.com>
+---
+ vdsm_api/vdsmapi-schema.json | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json
+index 9772e18..487e69a 100644
+--- a/vdsm_api/vdsmapi-schema.json
++++ b/vdsm_api/vdsmapi-schema.json
+@@ -4894,10 +4894,12 @@
+ ##
+ # @vmUpdateDeviceParams:
+ #
++# A discriminated record of update parameters for a VM device.
++#
+ # @deviceType: The VM device type to update. For example 'interface' for
+ #              network devices or 'disk' for disk storage devices.
+ #
+-# Since 4.10.3
++# Since: 4.10.3
+ ##
+ {'type': 'vmUpdateDeviceParams',
+  'data': {'deviceType': 'VmDeviceType'},
+@@ -4924,11 +4926,11 @@
+ #                 by alias. If omitted, it keeps the current mirroring
+ #                 configuration.
+ #
+-# Since 4.10.3
++# Since: 4.10.3
+ ##
+ {'type': 'vmUpdateInterfaceDeviceParams',
+  'data': {'*network': 'str', '*linkActive': 'bool',
+-          'alias': 'str', '*portMirroring': '[str]'}}
++          'alias': 'str', '*portMirroring': ['str']}}
+ 
+ ##
+ # @VM.updateDevice:
+@@ -4943,7 +4945,6 @@
+ # The VM definition, as updated
+ #
+ # Since: 4.10.3
+-#
+ ##
+ {'command': {'class': 'VM', 'name': 'updateDevice'},
+  'data': {'vmId': 'UUID', 'params': 'vmUpdateDeviceParams'},
+-- 
+1.7.11.7
+
diff --git a/0002-schema-Missing-comment-for-new-VmDeviceType.patch b/0002-schema-Missing-comment-for-new-VmDeviceType.patch
new file mode 100644
index 0000000..d44579b
--- /dev/null
+++ b/0002-schema-Missing-comment-for-new-VmDeviceType.patch
@@ -0,0 +1,36 @@
+From 244713456b87d4ea1873c98cbaae52bffd3ce1ee Mon Sep 17 00:00:00 2001
+From: Adam Litke <agl at us.ibm.com>
+Date: Wed, 12 Dec 2012 14:11:16 -0600
+Subject: [PATCH 2/3] schema: Missing comment for new VmDeviceType
+
+When adding a new 'console' VmDeviceType, the submitter forgot to include
+documentation in the comment block.  This caused process-schema.py to fail.
+
+Change-Id: Icd7db71a4cd1a2addd31815a73dcd5c1cda7af4f
+Signed-off-by: Adam Litke <agl at us.ibm.com>
+Reviewed-on: http://gerrit.ovirt.org/10013
+Reviewed-by: Saggi Mizrahi <smizrahi at redhat.com>
+Tested-by: Saggi Mizrahi <smizrahi at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/10020
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Tested-by: Dan Kenigsberg <danken at redhat.com>
+---
+ vdsm_api/vdsmapi-schema.json | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json
+index 487e69a..58dd6e2 100644
+--- a/vdsm_api/vdsmapi-schema.json
++++ b/vdsm_api/vdsmapi-schema.json
+@@ -1681,6 +1681,8 @@
+ #
+ # @channel:     A host-guest communication channel
+ #
++# @console:     A console device
++#
+ # Since: 4.10.0
+ ##
+ {'enum': 'VmDeviceType',
+-- 
+1.7.11.7
+
diff --git a/0003-api-Report-CPU-thread-info-in-getVdsCapabilities.patch b/0003-api-Report-CPU-thread-info-in-getVdsCapabilities.patch
new file mode 100644
index 0000000..e502d73
--- /dev/null
+++ b/0003-api-Report-CPU-thread-info-in-getVdsCapabilities.patch
@@ -0,0 +1,53 @@
+From b8c1c973d9767859d144042531f7a5ae76fce389 Mon Sep 17 00:00:00 2001
+From: Greg Padgett <gpadgett at redhat.com>
+Date: Thu, 20 Dec 2012 09:43:29 -0500
+Subject: [PATCH 3/3] api: Report CPU thread info in getVdsCapabilities
+
+Report CPU thread info in getVdsCapabilities
+
+Change-Id: I11f1e139a3f3d5bd18032713694bdebf9ab8c1d7
+Signed-off-by: Greg Padgett <gpadgett at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/10300
+Reviewed-by: Federico Simoncelli <fsimonce at redhat.com>
+---
+ vdsm/caps.py                 | 1 +
+ vdsm_api/vdsmapi-schema.json | 4 +++-
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/vdsm/caps.py b/vdsm/caps.py
+index 0438fb4..6749227 100644
+--- a/vdsm/caps.py
++++ b/vdsm/caps.py
+@@ -261,6 +261,7 @@ def get():
+     else:
+         caps['cpuCores'] = str(cpuTopology.cores())
+ 
++    caps['cpuThreads'] = str(cpuTopology.threads())
+     caps['cpuSockets'] = str(cpuTopology.sockets())
+     caps['cpuSpeed'] = cpuInfo.mhz()
+     if config.getboolean('vars', 'fake_kvm_support'):
+diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json
+index 58dd6e2..c72ec4b 100644
+--- a/vdsm_api/vdsmapi-schema.json
++++ b/vdsm_api/vdsmapi-schema.json
+@@ -848,6 +848,8 @@
+ #
+ # @kvmEnabled:          KVM is enabled on the host
+ #
++# @cpuThreads:          The number of CPU threads present
++#
+ # @cpuCores:            The number of CPU cores present
+ #
+ # @cpuSockets:          The numbet of CPU sockets
+@@ -909,7 +911,7 @@
+ #        the current API truncates @software_version to 'x.y'.
+ ##
+ {'type': 'VdsmCapabilities',
+- 'data': {'kvmEnabled': 'bool', 'cpuCores': 'uint',
++ 'data': {'kvmEnabled': 'bool', 'cpuThreads': 'uint', 'cpuCores': 'uint',
+           'cpuSockets': 'uint', 'cpuSpeed': 'float', 'cpuModel': 'str',
+           'cpuFlags': 'str', 'version_name': 'str', 'software_version': 'str',
+           'software_revision': 'str', 'supportedENGINEs': ['str'],
+-- 
+1.7.11.7
+
diff --git a/0004-caps.py-osversion-validate-OVIRT.patch b/0004-caps.py-osversion-validate-OVIRT.patch
new file mode 100644
index 0000000..9333042
--- /dev/null
+++ b/0004-caps.py-osversion-validate-OVIRT.patch
@@ -0,0 +1,35 @@
+From 95be2057db1bea2730bc4b65058f5b1a42ab45bd Mon Sep 17 00:00:00 2001
+From: Douglas Schilling Landgraf <dougsland at redhat.com>
+Date: Mon, 17 Dec 2012 19:23:21 -0500
+Subject: [PATCH 4/6] caps.py: osversion() validate OVIRT
+
+Currently we are only validating RHEV-H node.
+This patch will validate oVirt node as well in osversion().
+
+Change-Id: I58efd4660f94b2f68ead470a54f0f301a1b9b4ba
+Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=873917
+Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/10177
+Reviewed-by: Alon Bar-Lev <alonbl at redhat.com>
+Tested-by: Alon Bar-Lev <alonbl at redhat.com>
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+---
+ vdsm/caps.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vdsm/caps.py b/vdsm/caps.py
+index 6749227..e9a1476 100644
+--- a/vdsm/caps.py
++++ b/vdsm/caps.py
+@@ -229,7 +229,7 @@ def osversion():
+ 
+     osname = getos()
+     try:
+-        if osname == OSName.RHEVH:
++        if osname == OSName.RHEVH or osname == OSName.OVIRT:
+             d = _parseKeyVal(file('/etc/default/version'))
+             version = d.get('VERSION', '')
+             release = d.get('RELEASE', '')
+-- 
+1.7.11.7
+
diff --git a/0005-restarting-libvirtd-didn-t-work-over-allinone-setup.patch b/0005-restarting-libvirtd-didn-t-work-over-allinone-setup.patch
new file mode 100644
index 0000000..bc7af92
--- /dev/null
+++ b/0005-restarting-libvirtd-didn-t-work-over-allinone-setup.patch
@@ -0,0 +1,37 @@
+From 87dfb384debe7c171c3df27f13dc95ba3f0f0d5b Mon Sep 17 00:00:00 2001
+From: Yaniv Bronhaim <ybronhei at redhat.com>
+Date: Sun, 23 Dec 2012 10:40:29 +0200
+Subject: [PATCH 5/6] restarting libvirtd didn't work over allinone setup
+
+Change-Id: I300adc5ac3d9b12fee49023a54e5ffb4dee98da1
+Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=888258
+Signed-off-by: Yaniv Bronhaim <ybronhei at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/10237
+Tested-by: Ohad Basan <obasan at redhat.com>
+Reviewed-by: Ohad Basan <obasan at redhat.com>
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/10316
+---
+ vdsm/vdsmd.init.in | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in
+index 7a7ae84..c8223d3 100755
+--- a/vdsm/vdsmd.init.in
++++ b/vdsm/vdsmd.init.in
+@@ -362,7 +362,11 @@ EOF
+ 
+     ovirt_store_config "$lconf" "$qconf" "$ldconf" "$llogr"
+ 
+-    /sbin/initctl restart libvirtd 2>/dev/null || :
++    if libvirt_should_use_upstart; then
++        /sbin/initctl restart libvirtd 2>/dev/null || :
++    else
++        /bin/systemctl restart libvirtd.service
++    fi
+ 
+     #
+     # finished reconfiguration, do not trigger
+-- 
+1.7.11.7
+
diff --git a/0006-Integrate-Smartcard-support.patch b/0006-Integrate-Smartcard-support.patch
new file mode 100644
index 0000000..7837b0e
--- /dev/null
+++ b/0006-Integrate-Smartcard-support.patch
@@ -0,0 +1,421 @@
+From d33da223da1160b1ad2a8d02316b6b435bee9c29 Mon Sep 17 00:00:00 2001
+From: Tomas Jelinek <tjelinek at redhat.com>
+Date: Wed, 10 Oct 2012 03:06:21 -0400
+Subject: [PATCH 6/6] Integrate Smartcard support
+
+This patch is a VDSM part of the integrating
+the smartcard support to the ovirt:
+
+This VDSM part integrates the smartcard  in
+a supported way, not just as an unsupported custom hook.
+
+It also removes the smartcard hook itself.
+
+Change-Id: I7cdaef420c8381d588f6215e66e6a80dd9d2e44b
+Signed-off-by: Tomas Jelinek <tjelinek at redhat.com>
+Signed-off-by: Peter V. Saveliev <peet at redhat.com>
+Signed-off-by: Antoni S. Puimedon <asegurap at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/10547
+Tested-by: Omer Frenkel <ofrenkel at redhat.com>
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-by: Federico Simoncelli <fsimonce at redhat.com>
+---
+ configure.ac                            |  1 -
+ tests/libvirtvmTests.py                 |  7 +++++
+ vdsm.spec.in                            | 12 --------
+ vdsm/libvirtvm.py                       | 44 ++++++++++++++++++++++++++++-
+ vdsm/vm.py                              | 19 +++++++++++--
+ vdsm_api/vdsmapi-schema.json            | 49 +++++++++++++++++++++++++++++++--
+ vdsm_hooks/Makefile.am                  |  1 -
+ vdsm_hooks/README                       |  4 +--
+ vdsm_hooks/smartcard/Makefile.am        | 18 ------------
+ vdsm_hooks/smartcard/README             |  9 ------
+ vdsm_hooks/smartcard/before_vm_start.py | 29 -------------------
+ 11 files changed, 116 insertions(+), 77 deletions(-)
+ delete mode 100644 vdsm_hooks/smartcard/Makefile.am
+ delete mode 100644 vdsm_hooks/smartcard/README
+ delete mode 100755 vdsm_hooks/smartcard/before_vm_start.py
+
+diff --git a/configure.ac b/configure.ac
+index a6265b5..3489e38 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -209,7 +209,6 @@ AC_OUTPUT([
+ 	vdsm_hooks/qos/Makefile
+ 	vdsm_hooks/qemucmdline/Makefile
+ 	vdsm_hooks/scratchpad/Makefile
+-	vdsm_hooks/smartcard/Makefile
+ 	vdsm_hooks/smbios/Makefile
+ 	vdsm_hooks/sriov/Makefile
+ 	vdsm_hooks/vhostmd/Makefile
+diff --git a/tests/libvirtvmTests.py b/tests/libvirtvmTests.py
+index 4ed7318..bd68f2a 100644
+--- a/tests/libvirtvmTests.py
++++ b/tests/libvirtvmTests.py
+@@ -91,6 +91,13 @@ class TestLibvirtvm(TestCaseBase):
+             domxml.appendOs()
+             self.assertXML(domxml.dom, xml, 'os')
+ 
++    def testSmartcardXML(self):
++        smartcardXML = '<smartcard mode="passthrough" type="spicevmc"/>'
++        dev = {'device': 'smartcard',
++               'specParams': {'mode': 'passthrough', 'type': 'spicevmc'}}
++        smartcard = libvirtvm.SmartCardDevice(self.conf, self.log, **dev)
++        self.assertXML(smartcard.getXML(), smartcardXML)
++
+     def testFeaturesXML(self):
+         featuresXML = """
+             <features>
+diff --git a/vdsm.spec.in b/vdsm.spec.in
+index 1978fa9..f9e238b 100644
+--- a/vdsm.spec.in
++++ b/vdsm.spec.in
+@@ -353,14 +353,6 @@ Hook creates a disk for a VM onetime usage,
+ the disk will be erased when the VM destroyed.
+ VM cannot be migrated when using scratchpad hook
+ 
+-%package hook-smartcard
+-Summary:        Smartcard support for Spice protocol in VDSM
+-BuildArch:      noarch
+-
+-%description hook-smartcard
+-Smartcard hook add support for spice in VDSM.
+-Smartcard hook enable user to use its smartcard inside virtual machines.
+-
+ %package hook-smbios
+ Summary:        Adding custom smbios entries to libvirt domain via VDSM
+ BuildArch:      noarch
+@@ -887,10 +879,6 @@ exit 0
+ %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_scratchpad
+ %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_scratchpad
+ 
+-%files hook-smartcard
+-%defattr(-, root, root, -)
+-%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_smartcard
+-
+ %files hook-smbios
+ %defattr(-, root, root, -)
+ %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_smbios
+diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py
+index 219e382..fe140ec 100644
+--- a/vdsm/libvirtvm.py
++++ b/vdsm/libvirtvm.py
+@@ -1243,6 +1243,21 @@ class WatchdogDevice(LibvirtVmDevice):
+         return m
+ 
+ 
++class SmartCardDevice(LibvirtVmDevice):
++    def getXML(self):
++        """
++        Add smartcard section to domain xml
++
++        <smartcard mode='passthrough' type='spicevmc'>
++          <address ... />
++        </smartcard>
++        """
++        card = self.createXmlElem(self.device, None, ['address'])
++        card.setAttribute('mode', self.specParams['mode'])
++        card.setAttribute('type', self.specParams['type'])
++        return card
++
++
+ class RedirDevice(LibvirtVmDevice):
+     def getXML(self):
+         """
+@@ -1395,6 +1410,7 @@ class LibvirtVm(vm.Vm):
+         self._getUnderlyingControllerDeviceInfo()
+         self._getUnderlyingBalloonDeviceInfo()
+         self._getUnderlyingWatchdogDeviceInfo()
++        self._getUnderlyingSmartcardDeviceInfo()
+         # Obtain info of all unknown devices. Must be last!
+         self._getUnderlyingUnknownDeviceInfo()
+ 
+@@ -1486,7 +1502,8 @@ class LibvirtVm(vm.Vm):
+                   vm.BALLOON_DEVICES: BalloonDevice,
+                   vm.WATCHDOG_DEVICES: WatchdogDevice,
+                   vm.REDIR_DEVICES: RedirDevice,
+-                  vm.CONSOLE_DEVICES: ConsoleDevice}
++                  vm.CONSOLE_DEVICES: ConsoleDevice,
++                  vm.SMARTCARD_DEVICES: SmartCardDevice}
+ 
+         for devType, devClass in devMap.items():
+             for dev in devices[devType]:
+@@ -2800,6 +2817,31 @@ class LibvirtVm(vm.Vm):
+                     dev['address'] = address
+                     dev['alias'] = alias
+ 
++    def _getUnderlyingSmartcardDeviceInfo(self):
++        """
++        Obtain smartcard device info from libvirt.
++        """
++        smartcardxml = _domParseStr(self._lastXMLDesc).childNodes[0].\
++            getElementsByTagName('devices')[0].\
++            getElementsByTagName('smartcard')
++        for x in smartcardxml:
++            if not x.getElementsByTagName('address'):
++                continue
++
++            address = self._getUnderlyingDeviceAddress(x)
++            alias = x.getElementsByTagName('alias')[0].getAttribute('name')
++
++            for dev in self._devices[vm.SMARTCARD_DEVICES]:
++                if not hasattr(dev, 'address'):
++                    dev.address = address
++                    dev.alias = alias
++
++            for dev in self.conf['devices']:
++                if dev['device'] == vm.SMARTCARD_DEVICES and \
++                        not dev.get('address'):
++                    dev['address'] = address
++                    dev['alias'] = alias
++
+     def _getUnderlyingWatchdogDeviceInfo(self):
+         """
+         Obtain watchdog device info from libvirt.
+diff --git a/vdsm/vm.py b/vdsm/vm.py
+index 49fcb11..9610644 100644
+--- a/vdsm/vm.py
++++ b/vdsm/vm.py
+@@ -47,6 +47,7 @@ BALLOON_DEVICES = 'balloon'
+ REDIR_DEVICES = 'redir'
+ WATCHDOG_DEVICES = 'watchdog'
+ CONSOLE_DEVICES = 'console'
++SMARTCARD_DEVICES = 'smartcard'
+ 
+ """
+ A module containing classes needed for VM communication.
+@@ -364,7 +365,8 @@ class Vm(object):
+                          SOUND_DEVICES: [], VIDEO_DEVICES: [],
+                          CONTROLLER_DEVICES: [], GENERAL_DEVICES: [],
+                          BALLOON_DEVICES: [], REDIR_DEVICES: [],
+-                         WATCHDOG_DEVICES: [], CONSOLE_DEVICES: []}
++                         WATCHDOG_DEVICES: [], CONSOLE_DEVICES: [],
++                         SMARTCARD_DEVICES: []}
+ 
+     def _get_lastStatus(self):
+         PAUSED_STATES = ('Powering down', 'RebootInProgress', 'Up')
+@@ -447,7 +449,8 @@ class Vm(object):
+                    SOUND_DEVICES: [], VIDEO_DEVICES: [],
+                    CONTROLLER_DEVICES: [], GENERAL_DEVICES: [],
+                    BALLOON_DEVICES: [], REDIR_DEVICES: [],
+-                   WATCHDOG_DEVICES: [], CONSOLE_DEVICES: []}
++                   WATCHDOG_DEVICES: [], CONSOLE_DEVICES: [],
++                   SMARTCARD_DEVICES: []}
+         for dev in self.conf.get('devices'):
+             try:
+                 devices[dev['type']].append(dev)
+@@ -485,6 +488,7 @@ class Vm(object):
+             devices[GENERAL_DEVICES] = []
+             devices[BALLOON_DEVICES] = []
+             devices[WATCHDOG_DEVICES] = []
++            devices[SMARTCARD_DEVICES] = self.getConfSmartcard()
+             devices[REDIR_DEVICES] = []
+             devices[CONSOLE_DEVICES] = []
+         else:
+@@ -549,6 +553,17 @@ class Vm(object):
+ 
+         return vcards
+ 
++    def getConfSmartcard(self):
++        """
++        Normalize smartcard device (now there is only one)
++        """
++        cards = []
++        if self.conf.get('smartcard'):
++            cards.append({'device': SMARTCARD_DEVICES,
++                          'specParams': {'mode': 'passthrough',
++                                         'type': 'spicevmc'}})
++        return cards
++
+     def getConfSound(self):
+         """
+         Normalize sound device provided by conf.
+diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json
+index c72ec4b..7c9ef22 100644
+--- a/vdsm_api/vdsmapi-schema.json
++++ b/vdsm_api/vdsmapi-schema.json
+@@ -1685,11 +1685,13 @@
+ #
+ # @console:     A console device
+ #
++# @smartcard:   A smartcard device
++#
+ # Since: 4.10.0
+ ##
+ {'enum': 'VmDeviceType',
+  'data': ['disk', 'interface', 'video', 'sound', 'controller', 'balloon',
+-          'channel', 'console']}
++          'channel', 'console', 'smartcard']}
+ 
+ ##
+ # @VmDiskDeviceType:
+@@ -2356,6 +2358,48 @@
+           'address': 'VmDeviceAddress', 'alias': 'str', 'deviceId': 'UUID'}}
+ 
+ ##
++# @VmSmartcardDeviceSpecParams:
++#
++# Additional VM smartcard device parameters.
++#
++# Since: 4.10.3
++##
++{'type': 'VmSmartcardDeviceSpecParams', 'data': {}}
++
++##
++# @VmSmartcardDeviceType:
++#
++# An enumeration of VM smartcard device types.
++#
++# @smartcard: A smartcard
++#
++# Since: 4.10.3
++##
++{'enum': 'VmSmartcardDeviceType', 'data': ['smartcard']}
++
++##
++# @VmSmartcardDevice:
++#
++# Properties of a VM smartcard device.
++#
++# @deviceType:  The device type (always @smartcard)
++#
++# @device:      The the type of smartcard device
++#
++# @address:     Device hardware address
++#
++# @alias:       Alias used to identify this device in commands
++#
++# @specParams:  #optional Additional device parameters
++#
++# Since: 4.10.3
++##
++{'type': 'VmSmartcardDevice',
++ 'data': {'deviceType': 'VmDeviceType', 'device': 'VmSmartcardDeviceType',
++          'address': 'VmDeviceAddress', 'alias': 'str',
++          '*specParams': 'VmSmartcardDeviceSpecParams'}}
++
++##
+ # @VmConsoleDevice:
+ #
+ # Properties of a VM console device.
+@@ -2382,7 +2426,8 @@
+  'data': {'deviceType': 'VmDeviceType',},
+  'union': ['VmDiskDevice', 'VmInterfaceDevice', 'VmVideoDevice',
+           'VmSoundDevice', 'VmControllerDevice', 'VmBalloonDevice',
+-          'VmChannelDevice', 'VmWatchdogDevice', 'VmConsoleDevice']}
++          'VmChannelDevice', 'VmWatchdogDevice', 'VmConsoleDevice',
++          'VmSmartcardDevice']}
+ 
+ ##
+ # @VmShortStatus:
+diff --git a/vdsm_hooks/Makefile.am b/vdsm_hooks/Makefile.am
+index 9f00d4d..0e27a98 100644
+--- a/vdsm_hooks/Makefile.am
++++ b/vdsm_hooks/Makefile.am
+@@ -37,7 +37,6 @@ SUBDIRS += \
+ 	promisc \
+ 	qos \
+ 	scratchpad \
+-	smartcard \
+ 	smbios \
+ 	sriov \
+ 	vmdisk \
+diff --git a/vdsm_hooks/README b/vdsm_hooks/README
+index b45b93e..1659610 100644
+--- a/vdsm_hooks/README
++++ b/vdsm_hooks/README
+@@ -24,7 +24,7 @@ To work with VDSM hooks you need first to do the following:
+ 
+    If you want to enable more then one custom hook use the semicolon as
+    a separator:
+-   # rhevm-config -s UserDefinedVMProperties='pincpu=^[0-9]+$;smartcard=^(true|false)$' --cver=3.0
++   # rhevm-config -s UserDefinedVMProperties='pincpu=^[0-9]+$;sap_agent=^(true|false)$' --cver=3.0
+ 
+    The convention is [hook name]=[value], the value is evaluate with regular expression,
+    If you find regular expression too complex, you can always use the following command:
+@@ -47,7 +47,7 @@ To work with VDSM hooks you need first to do the following:
+       pincpu=1
+       if you want to use more then on hook and you did enable it with the rhevm-config
+       tool, you can use the semicolon as a separator:
+-      pincpu=1;smartcard=true
++      pincpu=1;sap_agent=true
+    b. Another option is to use "Run Once" dialog which mean that you add a custom property
+       only this time to the VM, next time that you run the VM it will run without the
+       custom property that you provided.
+diff --git a/vdsm_hooks/smartcard/Makefile.am b/vdsm_hooks/smartcard/Makefile.am
+deleted file mode 100644
+index dfefff5..0000000
+--- a/vdsm_hooks/smartcard/Makefile.am
++++ /dev/null
+@@ -1,18 +0,0 @@
+-# Copyright 2008 Red Hat, Inc. and/or its affiliates.
+-#
+-# Licensed to you under the GNU General Public License as published by
+-# the Free Software Foundation; either version 2 of the License, or
+-# (at your option) any later version.  See the files README and
+-# LICENSE_GPL_v2 which accompany this distribution.
+-#
+-
+-EXTRA_DIST = \
+-	before_vm_start.py
+-
+-install-data-local:
+-	$(MKDIR_P) $(DESTDIR)$(vdsmhooksdir)/before_vm_start
+-	$(INSTALL_SCRIPT) $(srcdir)/before_vm_start.py \
+-		$(DESTDIR)$(vdsmhooksdir)/before_vm_start/50_smartcard
+-
+-uninstall-local:
+-	$(RM) $(DESTDIR)$(vdsmhooksdir)/before_vm_start/50_smartcard
+diff --git a/vdsm_hooks/smartcard/README b/vdsm_hooks/smartcard/README
+deleted file mode 100644
+index bd376bf..0000000
+--- a/vdsm_hooks/smartcard/README
++++ /dev/null
+@@ -1,9 +0,0 @@
+-smartcard hook:
+-===============
+-add smartcard support for spice
+-
+-syntax:
+-smartcard: smartcard=true
+-
+-libvirt xml:
+-<smartcard mode='passthrough' type='spicevmc'/>
+diff --git a/vdsm_hooks/smartcard/before_vm_start.py b/vdsm_hooks/smartcard/before_vm_start.py
+deleted file mode 100755
+index 1944978..0000000
+--- a/vdsm_hooks/smartcard/before_vm_start.py
++++ /dev/null
+@@ -1,29 +0,0 @@
+-#!/usr/bin/python
+-
+-import os
+-import sys
+-import hooking
+-import traceback
+-
+-'''
+-smartcard vdsm hook
+-adding to domain xml
+-<smartcard mode='passthrough' type='spicevmc'/>
+-'''
+-
+-if 'smartcard' in os.environ:
+-    try:
+-        sys.stderr.write('smartcard: adding smartcard support\n')
+-        domxml = hooking.read_domxml()
+-
+-        devices = domxml.getElementsByTagName('devices')[0]
+-        card = domxml.createElement('smartcard')
+-        card.setAttribute('mode', 'passthrough')
+-        card.setAttribute('type', 'spicevmc')
+-
+-        devices.appendChild(card)
+-
+-        hooking.write_domxml(domxml)
+-    except:
+-        sys.stderr.write('smartcard: [unexpected error]: %s\n' % traceback.format_exc())
+-        sys.exit(2)
+-- 
+1.7.11.7
+
diff --git a/sources b/sources
index 0027272..d373508 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-55dae854f0d9d71ee791c0d7373ca7e9  vdsm-4.10.3-b005b54.tar.gz
+6e181a25b2b4fc9e5f85faafc9d73aa1  vdsm-4.10.3.tar.gz


More information about the scm-commits mailing list