コード例 #1
0
ファイル: vmstorage_test.py プロジェクト: guozhonghua216/vdsm
 def test_migrate_from_block_to_network(self):
     conf = drive_config(path='/blockdomain/volume')
     drive = Drive(self.log, diskType=DISK_TYPE.BLOCK, **conf)
     # Migrate drive to network disk...
     drive.path = "pool/volume"
     drive.diskType = DISK_TYPE.NETWORK
     assert DISK_TYPE.NETWORK == drive.diskType
コード例 #2
0
ファイル: vmstorage_test.py プロジェクト: nirs/vdsm
 def test_migrate_from_block_to_file(self):
     conf = drive_config(path='/blockdomain/volume')
     drive = Drive(self.log, diskType=DISK_TYPE.BLOCK, **conf)
     # Migrate drive to file domain...
     drive.diskType = DISK_TYPE.FILE
     drive.path = "/filedomain/volume"
     self.assertEqual(DISK_TYPE.FILE, drive.diskType)
コード例 #3
0
ファイル: vmstorage_test.py プロジェクト: asasuou/vdsm
 def test_migrate_from_file_to_block(self):
     conf = drive_config(path='/filedomain/volume')
     drive = Drive(self.log, diskType=DISK_TYPE.FILE, **conf)
     # Migrate drive to block domain...
     drive.diskType = DISK_TYPE.BLOCK
     drive.path = "/blockdomain/volume"
     self.assertEqual(DISK_TYPE.BLOCK, drive.diskType)
コード例 #4
0
ファイル: vmstorage_test.py プロジェクト: nirs/vdsm
 def test_migrate_from_block_to_network(self):
     conf = drive_config(path='/blockdomain/volume')
     drive = Drive(self.log, diskType=DISK_TYPE.BLOCK, **conf)
     # Migrate drive to network disk...
     drive.path = "pool/volume"
     drive.diskType = DISK_TYPE.NETWORK
     self.assertEqual(DISK_TYPE.NETWORK, drive.diskType)
コード例 #5
0
ファイル: vmstorage_test.py プロジェクト: nirs/vdsm
 def test_migrate_network_to_block(self):
     conf = drive_config(diskType=DISK_TYPE.NETWORK, path='pool/volume')
     drive = Drive(self.log, **conf)
     # Migrate drive to block domain...
     drive.path = '/blockdomain/volume'
     drive.diskType = DISK_TYPE.BLOCK
     self.assertEqual(DISK_TYPE.BLOCK, drive.diskType)
コード例 #6
0
ファイル: vmstorage_test.py プロジェクト: guozhonghua216/vdsm
 def test_migrate_network_to_block(self):
     conf = drive_config(diskType=DISK_TYPE.NETWORK, path='pool/volume')
     drive = Drive(self.log, **conf)
     # Migrate drive to block domain...
     drive.path = '/blockdomain/volume'
     drive.diskType = DISK_TYPE.BLOCK
     assert DISK_TYPE.BLOCK == drive.diskType
コード例 #7
0
ファイル: vmstorage_test.py プロジェクト: guozhonghua216/vdsm
 def test_migrate_from_block_to_file(self):
     conf = drive_config(path='/blockdomain/volume')
     drive = Drive(self.log, diskType=DISK_TYPE.BLOCK, **conf)
     # Migrate drive to file domain...
     drive.diskType = DISK_TYPE.FILE
     drive.path = "/filedomain/volume"
     assert DISK_TYPE.FILE == drive.diskType
コード例 #8
0
ファイル: vmstorage_test.py プロジェクト: akashihi/vdsm
 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)
コード例 #9
0
ファイル: vmstorage_test.py プロジェクト: EdDev/vdsm
 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)
コード例 #10
0
ファイル: vmstorage_test.py プロジェクト: EdDev/vdsm
 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)
コード例 #11
0
ファイル: vmstorage_test.py プロジェクト: akashihi/vdsm
 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)
コード例 #12
0
ファイル: vmstorage_test.py プロジェクト: nirs/vdsm
 def test_set_none_type(self):
     conf = drive_config(diskType=DISK_TYPE.NETWORK, path='pool/volume')
     drive = Drive(self.log, **conf)
     with self.assertRaises(exception.UnsupportedOperation):
         drive.diskType = None
コード例 #13
0
ファイル: vmstorage_test.py プロジェクト: asasuou/vdsm
 def test_non_disk_set_invalid_diskType(self, device, diskType):
     conf = drive_config(device=device)
     drive = Drive(self.log, **conf)
     with self.assertRaises(exception.UnsupportedOperation):
         drive.diskType = diskType
コード例 #14
0
ファイル: vmstorage_test.py プロジェクト: asasuou/vdsm
 def test_set_invalid_type(self):
     conf = drive_config(diskType=DISK_TYPE.NETWORK, path='pool/volume')
     drive = Drive(self.log, **conf)
     with self.assertRaises(exception.UnsupportedOperation):
         drive.diskType = 'bad'
コード例 #15
0
ファイル: vmstorage_test.py プロジェクト: guozhonghua216/vdsm
 def test_floppy_set_invalid_diskType(self, diskType):
     conf = drive_config(device='floppy')
     drive = Drive(self.log, **conf)
     with pytest.raises(exception.UnsupportedOperation):
         drive.diskType = diskType
コード例 #16
0
ファイル: vmstorage_test.py プロジェクト: nirs/vdsm
 def test_floppy_set_invalid_diskType(self, diskType):
     conf = drive_config(device='floppy')
     drive = Drive(self.log, **conf)
     with self.assertRaises(exception.UnsupportedOperation):
         drive.diskType = diskType
コード例 #17
0
ファイル: vmstorage_test.py プロジェクト: guozhonghua216/vdsm
 def test_set_none_type(self):
     conf = drive_config(diskType=DISK_TYPE.NETWORK, path='pool/volume')
     drive = Drive(self.log, **conf)
     with pytest.raises(exception.UnsupportedOperation):
         drive.diskType = None