xend: move the call to XendDevices.destroy_device_state()
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 3 Sep 2008 09:38:33 +0000 (10:38 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 3 Sep 2008 09:38:33 +0000 (10:38 +0100)
This patch moves the call to XendDevices.destroy_device_state() to the
function _remove_domain. Previously only Xen-API calls were calling
the destroy_device_state() function.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
tools/python/xen/xend/XendDomain.py

index 8e20152a95a7d24f17789f4a50c71f89caaa4489..1e9b4b0a163b53b7423b010ada8ba58c4a9e0fda 100644 (file)
@@ -481,6 +481,7 @@ class XendDomain:
             if domid in self.domains:
                 del self.domains[domid]
 
+            XendDevices.destroy_device_state(info)
             info.destroy_xapi_device_instances()
         else:
             log.warning("Attempted to remove non-existent domain.")
@@ -1094,7 +1095,6 @@ class XendDomain:
         dominfo.metrics.destroy()
         self._managed_domain_unregister(dominfo)
         self._remove_domain(dominfo)
-        XendDevices.destroy_device_state(dominfo)
         dominfo.destroy_xapi_device_instances()