Change in vdsm[master]: vm: rename obsolete buildCmdLine method

fromani at redhat.com fromani at redhat.com
Thu Sep 11 14:09:57 UTC 2014


Francesco Romani has uploaded a new change for review.

Change subject: vm: rename obsolete buildCmdLine method
......................................................................

vm: rename obsolete buildCmdLine method

In past times, VDSM used to run QEMU.
The Vm._buildCmdLine method was in charge
to build the QEMU executable command line.

Nowadays we use libvirt as middleware, with no
plans to come back, so this method does a different
thing.

This patch renames this method, with no behaviour
change, to reflect the reality.

Please note that this method is mostly orchestration
of vmxml.Domain calls;
Future patches will split this code from vm.py
to vmxml.py.

Change-Id: If4129948e71bf2308cce0b02f0d6c800903004bf
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M tests/vmTests.py
M vdsm/virt/vm.py
2 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/29/32829/1

diff --git a/tests/vmTests.py b/tests/vmTests.py
index a5f3446..30686d7 100644
--- a/tests/vmTests.py
+++ b/tests/vmTests.py
@@ -198,7 +198,7 @@
 
                 testVm = vm.Vm(self, conf)
 
-                output = testVm._buildCmdLine()
+                output = testVm._buildDomainXML()
 
                 self.assertEqual(re.sub('\n\s*', ' ', output.strip(' ')),
                                  re.sub('\n\s*', ' ', expectedXML.strip(' ')))
@@ -1742,7 +1742,7 @@
     def _buildAllDomains(self, arch):
         for conf, _ in self._CONFS[arch]:
             with FakeVM(conf, arch=arch) as v:
-                domXml = v._buildCmdLine()
+                domXml = v._buildDomainXML()
                 yield FakeDomain(domXml, vmId=v.id), domXml
 
     def _getAllDomains(self, arch):
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index a7dc916..b1e2641 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -2665,7 +2665,7 @@
                 dev._deviceXML = deviceXML
                 domxml.appendDeviceXML(deviceXML)
 
-    def _buildCmdLine(self):
+    def _buildDomainXML(self):
         domxml = vmxml.Domain(self.conf, self.log, self.arch)
         domxml.appendOs()
 
@@ -2891,7 +2891,7 @@
         # domDependentInit, after the migration is completed.
 
         if not self.recovering and initDomain:
-            domxml = hooks.before_vm_start(self._buildCmdLine(), self.conf)
+            domxml = hooks.before_vm_start(self._buildDomainXML(), self.conf)
             self.log.debug(domxml)
 
         if self.recovering:


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If4129948e71bf2308cce0b02f0d6c800903004bf
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>


More information about the vdsm-patches mailing list