def test_migrate_from_block_to_network(self): conf = drive_config(path='/blockdomain/volume') drive = Drive({}, self.log, **conf) self.assertTrue(drive.blockDev) # Migrate drive to netowrk (not sure we will support this)... drive.path = "rbd:pool/volume" drive.volumeInfo = {'volType': 'network'} self.assertFalse(drive.blockDev)
def test_migrate_network_to_block(self): conf = drive_config(diskType=DISK_TYPE.NETWORK, path='pool/volume') drive = Drive({}, self.log, **conf) self.assertTrue(drive.networkDev) # Migrate drive to block domain... drive.path = '/blockdomain/volume' drive.diskType = None self.assertTrue(drive.blockDev)
def test_migrate_from_block_to_file(self): conf = drive_config(path='/blockdomain/volume') drive = Drive({}, self.log, **conf) self.assertTrue(drive.blockDev) # Migrate drive to file domain... utils.isBlockDevice = lambda path: False drive.path = "/filedomain/volume" self.assertFalse(drive.blockDev)
def test_migrate_from_block_to_network(self): conf = drive_config(path='/blockdomain/volume') drive = Drive({}, self.log, **conf) self.assertTrue(drive.blockDev) # Migrate drive to network disk... drive.path = "pool/volume" drive.diskType = DISK_TYPE.NETWORK self.assertFalse(drive.blockDev)