Exemplo n.º 1
0
 def test_expand_volume_raise_illegal(self):
     volume = self._prepare_mocks_for_volume()
     self.client_mock.get_volume.side_effect = [
         InternalServerError("500", "BE7A0005")
     ]
     with self.assertRaises(array_errors.IllegalObjectID):
         self.array.expand_volume(volume_id=volume.id, required_bytes=10)
Exemplo n.º 2
0
 def test_create_snapshot_failed_with_incorrect_id(self):
     self.client_mock.get_volume.side_effect = InternalServerError(
         "500", message="BE7A0005")
     with self.assertRaises(array_errors.IllegalObjectID):
         self.array.create_snapshot("volume_id",
                                    "test_name",
                                    space_efficiency=None,
                                    pool=None)
Exemplo n.º 3
0
 def test_copy_to_existing_volume_raise_illegal_object_id(self):
     self._test_copy_to_existing_volume_raise_errors(
         client_method=self.client_mock.get_volume,
         client_error=InternalServerError("500", "BE7A0005"),
         expected_error=array_errors.IllegalObjectID)
Exemplo n.º 4
0
 def test_delete_snapshot_failed_with_illegal_object_id(self):
     self.client_mock.get_volume.side_effect = InternalServerError(
         "500", message="BE7A0005")
     with self.assertRaises(array_errors.IllegalObjectID):
         self.array.delete_snapshot("fake_id")
Exemplo n.º 5
0
 def test_map_volume_no_available_lun(self):
     self.client_mock.map_volume_to_host.side_effect = InternalServerError(
         "500", "[BE74121B]")
     with self.assertRaises(array_errors.NoAvailableLunError):
         self.array.map_volume("fake_name", "fake_host",
                               "fake_connectivity_type")
Exemplo n.º 6
0
 def test_create_volume_fail_with_no_space_in_pool(self):
     self.client_mock.get_volumes_by_pool.side_effect = InternalServerError(
         "500", message="BE534459")
     with self.assertRaises(array_errors.NotEnoughSpaceInPool):
         self.array.create_volume("fake_name", 1, 'thin', "fake_pool")
Exemplo n.º 7
0
 def test_create_volume_fail_with_incorrect_id(self):
     self.client_mock.get_volumes_by_pool.side_effect = InternalServerError(
         "500", message="BE7A0005")
     with self.assertRaises(array_errors.PoolDoesNotExist):
         self.array.create_volume("fake_name", 1, 'thin', "fake_pool")