code: def _get_xml(xml_str):
      '''
      Intrepret the data coming from opennebula and raise if it's not XML.
      '''
      try:
          xml_data = etree.XML(xml_str)
      # XMLSyntaxError seems to be only available from lxml, but that is the xml
      # library loaded by this module
      except etree.XMLSyntaxError as err:
          # opennebula returned invalid XML, which could be an error message, so
          # log it
          raise SaltCloudSystemExit('opennebula returned: {0}'.format(xml_str))
      return xml_datf _get_xml(xml_str):
      '''
      Intrepret the data coming from opennebula and raise if it's not XML.
      '''
      try:
          xml_data = etree.XML(xml_str)
      # XMLSyntaxError seems to be only available from lxml, but that is the xml
      # library loaded by this module
      except etree.XMLSyntaxError as err:
          # opennebula returned invalid XML, which could be an error message, so
          # log it
          raise SaltCloudSystemExit('opennebula returned: {0}'.format(xml_str))
      return xml_data
docs: Intrepret the data coming from opennebula and raise if it's not XML.