Blob Blame History Raw
From 9665fa59d97dcafead970dabc65ee88e3280470f Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Fri, 12 Sep 2014 08:57:13 -0400
Subject: [PATCH 2/4] domain: Remove the description/title hotplug hacks

We would unconditionally read VM description/hotplug from the inactive
domain XML, this allowed us to emulate metadata hotplug where it wasn't
implemented. However this means we end up doing many needless XMLDesc
calls, which slows down connection startup for low latency connections.

Since SetMetadata has been in libvirt for 2 years now, drop this hack.

(cherry picked from commit f36d2ed9607b2530864ba331379f3167ea5ab86c)
---
 virtManager/domain.py | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/virtManager/domain.py b/virtManager/domain.py
index d22a143..4098e2d 100644
--- a/virtManager/domain.py
+++ b/virtManager/domain.py
@@ -956,9 +956,6 @@ class vmmDomain(vmmLibvirtObject):
                 self._backend.setMaxMemory(val)
 
         def _hotplug_metadata(val, mtype):
-            if not self.conn.check_support(
-                self.conn.SUPPORT_DOMAIN_SET_METADATA, self._backend):
-                return
             flags = (libvirt.VIR_DOMAIN_AFFECT_LIVE |
                      libvirt.VIR_DOMAIN_AFFECT_CONFIG)
             self._backend.setMetadata(mtype, val, None, None, flags)
@@ -1093,12 +1090,9 @@ class vmmDomain(vmmLibvirtObject):
         return self.get_name()
 
     def get_title(self):
-        return self.get_xmlobj(inactive=True).title
-
+        return self.get_xmlobj().title
     def get_description(self):
-        # Always show the inactive <description>, let's us fake hotplug
-        # for a field that's strictly metadata
-        return self.get_xmlobj(inactive=True).description
+        return self.get_xmlobj().description
 
     def get_memory(self):
         return int(self.get_xmlobj().memory)
-- 
1.9.3