Antoni Segura Puimedon has posted comments on this change.
Change subject: virt: move XML processing in a module
......................................................................
Patch Set 2: Code-Review-1
(2 comments)
The module name could be jut "xml" since inside it would have Domain (which is
the domxml) and Element.
http://gerrit.ovirt.org/#/c/26855/2/vdsm/virt/xmldom.py
File vdsm/virt/xmldom.py:
Line 36: def is_node(xmlNode):
Line 37: return xmlNode.nodeType == Node.ELEMENT_NODE
Line 38:
Line 39:
Line 40: class XMLElement(object):
the module is xmldom, no need for prefixes.
class Element(object):
Line 41:
Line 42: def __init__(self, tagName, text=None, **attrs):
Line 43: self._elem = xml.dom.minidom.Document().createElement(tagName)
Line 44: self.setAttrs(**attrs)
Line 64: self._elem.appendChild(child)
Line 65: return child
Line 66:
Line 67:
Line 68: class _DomXML:
this now needs to be 'public' (to drop the leading
underscore)
class Domain(object):
Line 69: def __init__(self, conf, log, arch):
Line 70: """
Line 71: Create the skeleton of a libvirt domain xml
Line 72:
--
To view, visit
http://gerrit.ovirt.org/26855
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I77dd048067b8abcb77f4b9bf55fbfd0535672996
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Martin Polednik <mpoledni(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <mskrivan(a)redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes