예제 #1
0
 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)
예제 #2
0
 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)
예제 #3
0
 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)
예제 #4
0
 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)
예제 #5
0
 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)
예제 #6
0
 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)
예제 #7
0
 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)
예제 #8
0
 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)