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

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



On 10/13/2011 07:30 PM, Wayne Sun wrote:
   * 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'):

    ACK and pushed

    Guannan Ren


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