[Kimchi-devel] [PATCH 8/9] Return name with special characters when taking snapshot

Ramon Medeiros ramonn at linux.vnet.ibm.com
Thu May 7 17:40:38 UTC 2015


Signed-off-by: Ramon Medeiros <ramonn at linux.vnet.ibm.com>
---
 src/kimchi/model/vmsnapshots.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/kimchi/model/vmsnapshots.py b/src/kimchi/model/vmsnapshots.py
index 3a92cdc..af084a9 100644
--- a/src/kimchi/model/vmsnapshots.py
+++ b/src/kimchi/model/vmsnapshots.py
@@ -160,6 +160,13 @@ class VMSnapshotModel(object):
 
             # get vm name recorded in the snapshot and return new uri params
             vm_new_name = xpath_get_text(vir_snap.getXMLDesc(0),
+                                         'domain/title')
+
+            # title exists: return title
+            if len(vm_new_name) > 0:
+                return [vm_new_name[0], name]
+
+            vm_new_name = xpath_get_text(vir_snap.getXMLDesc(0),
                                          'domain/name')[0]
             return [vm_new_name, name]
         except libvirt.libvirtError, e:
-- 
2.1.0




More information about the Kimchi-devel mailing list