Exemple #1
0
 def metadata(self, xml_type, uri, flags):
     # we only support METADATA_ELEMENT
     assert xml_type == libvirt.VIR_DOMAIN_METADATA_ELEMENT
     xml_string = self.xml.get(uri, None)
     if xml_string is None:
         raise Error(libvirt.VIR_ERR_NO_DOMAIN_METADATA)
     return xml_string
Exemple #2
0
 def _failIfRequested(self):
     if self.virtError != libvirt.VIR_ERR_OK:
         raise Error(self.virtError, self._errorMessage)