Change in vdsm[master]: virt: rename {Notifying, Disconnected}VirDomain

fromani at redhat.com fromani at redhat.com
Mon Aug 17 13:49:22 UTC 2015


Francesco Romani has uploaded a new change for review.

Change subject: virt: rename {Notifying,Disconnected}VirDomain
......................................................................

virt: rename {Notifying,Disconnected}VirDomain

Now that these classes resides in virdomain module,
we can strip their name and make it nicer.

X-Backport-To: 3.6
X-Rename-Only: yes
Change-Id: I898ca5a2d9111fc431ce391c6e279bb3b536563a
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M vdsm/virt/virdomain.py
M vdsm/virt/vm.py
2 files changed, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/35/44935/1

diff --git a/vdsm/virt/virdomain.py b/vdsm/virt/virdomain.py
index bbf7abb..bc31bc6 100644
--- a/vdsm/virt/virdomain.py
+++ b/vdsm/virt/virdomain.py
@@ -32,7 +32,7 @@
     pass
 
 
-class DisconnectedVirDomain(object):
+class Disconnected(object):
 
     def __init__(self, vmid):
         self.vmid = vmid
@@ -46,7 +46,7 @@
                                 % self.vmid)
 
 
-class NotifyingVirDomain:
+class Notifying:
     # virDomain wrapper that notifies vm when a method raises an exception with
     # get_error_code() = VIR_ERR_OPERATION_TIMEOUT
 
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index aca5bad..9790be1 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -246,7 +246,7 @@
         :param recover: Signal if the Vm is recovering;
         :type recover: bool
         """
-        self._dom = virdomain.DisconnectedVirDomain(params["vmId"])
+        self._dom = virdomain.Disconnected(params["vmId"])
         self.recovering = recover
         self.conf = {'pid': '0', '_blockJobs': {}, 'clientIp': ''}
         self.conf.update(params)
@@ -774,7 +774,7 @@
 
     def _onQemuDeath(self):
         self.log.info('underlying process disconnected')
-        self._dom = virdomain.DisconnectedVirDomain(self.id)
+        self._dom = virdomain.Disconnected(self.id)
         # Try release VM resources first, if failed stuck in 'Powering Down'
         # state
         result = self.releaseVm()
@@ -1825,7 +1825,7 @@
                 self.log.info(domxml)
 
         if self.recovering:
-            self._dom = virdomain.NotifyingVirDomain(
+            self._dom = virdomain.Notifying(
                 self._connection.lookupByUUIDString(self.id),
                 self._timeoutExperienced)
         elif 'migrationDest' in self.conf:
@@ -1847,7 +1847,7 @@
             finally:
                 self.cif.teardownVolumePath(self.conf['restoreState'])
 
-            self._dom = virdomain.NotifyingVirDomain(
+            self._dom = virdomain.Notifying(
                 self._connection.lookupByUUIDString(self.id),
                 self._timeoutExperienced)
         else:
@@ -1856,7 +1856,7 @@
                 flags |= libvirt.VIR_DOMAIN_START_PAUSED
                 self.conf['pauseCode'] = 'NOERR'
                 del self.conf['launchPaused']
-            self._dom = virdomain.NotifyingVirDomain(
+            self._dom = virdomain.Notifying(
                 self._connection.createXML(domxml, flags),
                 self._timeoutExperienced)
             hooks.after_vm_start(self._dom.XMLDesc(0), self.conf)
@@ -2722,7 +2722,7 @@
         try:
             # Would fail if migration isn't successful,
             # or restart vdsm if connection to libvirt was lost
-            self._dom = virdomain.NotifyingVirDomain(
+            self._dom = virdomain.Notifying(
                 self._connection.lookupByUUIDString(self.id),
                 self._timeoutExperienced)
 


-- 
To view, visit https://gerrit.ovirt.org/44935
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I898ca5a2d9111fc431ce391c6e279bb3b536563a
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