Ejemplo n.º 1
0
 def test_top_volume(self):
     drive = Drive(self.log, diskType=DISK_TYPE.NETWORK, **self.conf)
     actual = drive.volume_target(
         "00000000-0000-0000-0000-000000000000",
         self.actual_chain)
     self.assertEqual(actual, None)
Ejemplo n.º 2
0
 def test_volume_missing(self):
     drive = Drive(self.log, diskType=DISK_TYPE.NETWORK, **self.conf)
     with self.assertRaises(storage.VolumeNotFound):
         drive.volume_target(
             "FFFFFFFF-FFFF-FFFF-FFFF-000000000000",
             self.actual_chain)
Ejemplo n.º 3
0
 def test_base_not_found(self):
     drive = Drive(self.log, diskType=DISK_TYPE.FILE, **self.conf)
     with self.assertRaises(storage.VolumeNotFound):
         drive.volume_target("FFFFFFFF-FFFF-FFFF-FFFF-111111111111",
                             self.actual_chain)
Ejemplo n.º 4
0
 def test_internal_volume(self):
     drive = Drive(self.log, diskType=DISK_TYPE.NETWORK, **self.conf)
     actual = drive.volume_target(
         "11111111-1111-1111-1111-111111111111",
         self.actual_chain)
     self.assertEqual(actual, "vda[1]")
Ejemplo n.º 5
0
 def test_volume_missing(self):
     drive = Drive(self.log, diskType=DISK_TYPE.NETWORK, **self.conf)
     with pytest.raises(storage.VolumeNotFound):
         drive.volume_target("FFFFFFFF-FFFF-FFFF-FFFF-000000000000",
                             self.actual_chain)
Ejemplo n.º 6
0
 def test_top_volume(self):
     drive = Drive(self.log, diskType=DISK_TYPE.NETWORK, **self.conf)
     actual = drive.volume_target("00000000-0000-0000-0000-000000000000",
                                  self.actual_chain)
     assert actual is None
Ejemplo n.º 7
0
 def test_internal_volume(self):
     drive = Drive(self.log, diskType=DISK_TYPE.NETWORK, **self.conf)
     actual = drive.volume_target("11111111-1111-1111-1111-111111111111",
                                  self.actual_chain)
     assert actual == "vda[1]"
Ejemplo n.º 8
0
 def test_base_not_found(self):
     drive = Drive(self.log, diskType=DISK_TYPE.FILE, **self.conf)
     with pytest.raises(storage.VolumeNotFound):
         drive.volume_target("FFFFFFFF-FFFF-FFFF-FFFF-111111111111",
                             self.actual_chain)
Ejemplo n.º 9
0
 def test_base_not_found(self):
     drive = Drive(self.log, **self.conf)
     with self.assertRaises(storage.VolumeNotFound):
         drive.volume_target("FFFFFFFF-FFFF-FFFF-FFFF-111111111111",
                             self.actual_chain)