Exemple #1
0
 def check(self, device_conf, xml):
     drive = Drive(self.log, **device_conf)
     self.assertXMLEqual(xmlutils.tostring(drive.getXML()), xml)
 def check(self, **kw):
     conf = drive_config(**kw)
     drive = Drive(self.log, **conf)
     with pytest.raises(ValueError):
         drive.getXML()
 def check(self, device_conf, xml):
     drive = Drive(self.log, **device_conf)
     self.assertXMLEqual(xmlutils.tostring(drive.getXML()), xml)
Exemple #4
0
 def check(self, device_conf, xml):
     drive = Drive(self.log, **device_conf)
     self.assertXMLEqual(vmxml.format_xml(drive.getXML()), xml)
Exemple #5
0
 def check(self, device_conf, xml, is_block_device=False):
     drive = Drive(self.log, **device_conf)
     # Patch to skip the block device checking.
     if is_block_device is not None:
         drive._blockDev = is_block_device
     self.assertXMLEqual(vmxml.format_xml(drive.getXML()), xml)
Exemple #6
0
 def check(self, device_conf, xml, is_block_device=False):
     drive = Drive(self.log, **device_conf)
     # Patch to skip the block device checking.
     if is_block_device is not None:
         drive._blockDev = is_block_device
     self.assertXMLEqual(vmxml.format_xml(drive.getXML()), xml)