示例#1
0
 def check(self, device_conf, xml):
     drive = Drive(self.log, **device_conf)
     self.assertXMLEqual(xmlutils.tostring(drive.getXML()), xml)
示例#2
0
 def check(self, **kw):
     conf = drive_config(**kw)
     drive = Drive(self.log, **conf)
     with pytest.raises(ValueError):
         drive.getXML()
示例#3
0
 def check(self, device_conf, xml):
     drive = Drive(self.log, **device_conf)
     self.assertXMLEqual(xmlutils.tostring(drive.getXML()), xml)
示例#4
0
 def check(self, device_conf, xml):
     drive = Drive(self.log, **device_conf)
     self.assertXMLEqual(vmxml.format_xml(drive.getXML()), xml)
示例#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)
示例#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)