Change in vdsm[master]: vdsm: move controller device to devices.py
mpoledni at redhat.com
mpoledni at redhat.com
Thu Jun 26 11:37:41 UTC 2014
Martin Polednik has uploaded a new change for review.
Change subject: vdsm: move controller device to devices.py
......................................................................
vdsm: move controller device to devices.py
No real code changes
Change-Id: I941a76230fd5cc3c28495c5fa8526f8735bb51ef
Signed-off-by: Martin Polednik <mpoledni at redhat.com>
---
M vdsm/virt/devices.py
M vdsm/virt/vm.py
2 files changed, 16 insertions(+), 16 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/61/29261/1
diff --git a/vdsm/virt/devices.py b/vdsm/virt/devices.py
index d484136..8e0d302 100644
--- a/vdsm/virt/devices.py
+++ b/vdsm/virt/devices.py
@@ -32,3 +32,18 @@
Create domxml for general device
"""
return self.createXmlElem(self.type, self.device, ['address'])
+
+
+class ControllerDevice(VmDevice):
+ __slots__ = ('address', 'model', 'index', 'master')
+
+ def getXML(self):
+ """
+ Create domxml for controller device
+ """
+ ctrl = self.createXmlElem('controller', self.device,
+ ['index', 'model', 'master', 'address'])
+ if self.device == 'virtio-serial':
+ ctrl.setAttrs(index='0', ports='16')
+
+ return ctrl
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index a0f4edf..41c91bb 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -613,21 +613,6 @@
return f
-class ControllerDevice(devices.VmDevice):
- __slots__ = ('address', 'model', 'index', 'master')
-
- def getXML(self):
- """
- Create domxml for controller device
- """
- ctrl = self.createXmlElem('controller', self.device,
- ['index', 'model', 'master', 'address'])
- if self.device == 'virtio-serial':
- ctrl.setAttrs(index='0', ports='16')
-
- return ctrl
-
-
class VideoDevice(devices.VmDevice):
__slots__ = ('address',)
@@ -1347,7 +1332,7 @@
(SOUND_DEVICES, SoundDevice),
(VIDEO_DEVICES, VideoDevice),
(GRAPHICS_DEVICES, GraphicsDevice),
- (CONTROLLER_DEVICES, ControllerDevice),
+ (CONTROLLER_DEVICES, devices.ControllerDevice),
(GENERAL_DEVICES, devices.GeneralDevice),
(BALLOON_DEVICES, BalloonDevice),
(WATCHDOG_DEVICES, WatchdogDevice),
--
To view, visit http://gerrit.ovirt.org/29261
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I941a76230fd5cc3c28495c5fa8526f8735bb51ef
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpoledni at redhat.com>
More information about the vdsm-patches
mailing list