Martin Polednik has uploaded a new change for review.

Change subject: virt: move balloon device to vmdevices.py
......................................................................

virt: move balloon device to vmdevices.py

No real code changes

Change-Id: I16b04a84e8bbdefe9033f96c2a3b89d1ea90ba8c
Signed-off-by: Martin Polednik <mpoled...@redhat.com>
---
M tests/vmTests.py
M vdsm/virt/vm.py
M vdsm/virt/vmdevices.py
3 files changed, 19 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/09/34309/1

diff --git a/tests/vmTests.py b/tests/vmTests.py
index dc4cac7..0b6311d 100644
--- a/tests/vmTests.py
+++ b/tests/vmTests.py
@@ -501,7 +501,7 @@
         balloonXML = '<memballoon model="virtio"/>'
         dev = {'device': 'memballoon', 'type': 'balloon',
                'specParams': {'model': 'virtio'}}
-        balloon = vm.BalloonDevice(self.conf, self.log, **dev)
+        balloon = vmdevices.Balloon(self.conf, self.log, **dev)
         self.assertXML(balloon.getXML(), balloonXML)
 
     def testRngXML(self):
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 292b74b..f8aa418 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -1177,23 +1177,6 @@
         return graphics
 
 
-class BalloonDevice(vmdevices.Base):
-    __slots__ = ('address',)
-
-    def getXML(self):
-        """
-        Create domxml for a memory balloon device.
-
-        <memballoon model='virtio'>
-          <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
-           function='0x0'/>
-        </memballoon>
-        """
-        m = self.createXmlElem(self.device, None, ['address'])
-        m.setAttrs(model=self.specParams['model'])
-        return m
-
-
 class MigrationError(Exception):
     pass
 
@@ -1227,7 +1210,7 @@
                      (GRAPHICS_DEVICES, GraphicsDevice),
                      (CONTROLLER_DEVICES, vmdevices.Controller),
                      (GENERAL_DEVICES, vmdevices.Generic),
-                     (BALLOON_DEVICES, BalloonDevice),
+                     (BALLOON_DEVICES, vmdevices.Balloon),
                      (WATCHDOG_DEVICES, vmdevices.Watchdog),
                      (CONSOLE_DEVICES, vmdevices.Console),
                      (REDIR_DEVICES, vmdevices.Redir),
diff --git a/vdsm/virt/vmdevices.py b/vdsm/virt/vmdevices.py
index ac7488e..94d5f3c 100644
--- a/vdsm/virt/vmdevices.py
+++ b/vdsm/virt/vmdevices.py
@@ -55,6 +55,23 @@
         return self.createXmlElem(self.type, self.device, ['address'])
 
 
+class Balloon(Base):
+    __slots__ = ('address',)
+
+    def getXML(self):
+        """
+        Create domxml for a memory balloon device.
+
+        <memballoon model='virtio'>
+          <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
+           function='0x0'/>
+        </memballoon>
+        """
+        m = self.createXmlElem(self.device, None, ['address'])
+        m.setAttrs(model=self.specParams['model'])
+        return m
+
+
 class Console(Base):
     __slots__ = ()
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I16b04a84e8bbdefe9033f96c2a3b89d1ea90ba8c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpoled...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to