[test-API][PATCH 4/5] Add new element uuid in xmlgenerator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  * uuid xml element will be created and append to domain xml only if
    uuid option in params is provided
---
 utils/Python/xmlgenerator.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/utils/Python/xmlgenerator.py b/utils/Python/xmlgenerator.py
index d57dd33..4aa045a 100644
--- a/utils/Python/xmlgenerator.py
+++ b/utils/Python/xmlgenerator.py
@@ -45,6 +45,13 @@ def domain_xml(params, install = False):
     name_element.appendChild(name_node)
     domain_element.appendChild(name_element)
 
+    # <uuid>
+    if params.has_key('uuid'):
+        uuid_element = domain.createElement('uuid')
+        uuid_node = domain.createTextNode(params['uuid'])
+        uuid_element.appendChild(uuid_node)
+        domain_element.appendChild(uuid_element)
+
     # <memory>
     memory_element = domain.createElement('memory')
     if params.has_key('memory'):
-- 
1.7.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]