def test_get_object_by_id_raise_illegal_object_name(self):
     snap_name = "snap"
     self.mediator.client.cmd.vol_list.side_effect = [
         xcli_errors.IllegalValueForArgumentError("", snap_name, "")
     ]
     with self.assertRaises(array_errors.IllegalObjectID):
         self.mediator.get_object_by_id(snap_name, "snapshot")
Exemplo n.º 2
0
 def test_expand_volume_illegal_object_id_error(self):
     volume = self._prepare_mocks_for_expand_volume()
     self.mediator.client.cmd.vol_list.side_effect = [xcli_errors.IllegalValueForArgumentError("", volume.wwn, "")]
     with self.assertRaises(array_errors.IllegalObjectID):
         self.mediator.expand_volume(volume_id=volume.wwn, required_bytes=self.required_bytes)
Exemplo n.º 3
0
 def test_unmap_volume_raise_illegal_object_id(self):
     self.mediator.client.cmd.vol_list.side_effect = [xcli_errors.IllegalValueForArgumentError("", "volume-wwn", "")]
     with self.assertRaises(array_errors.IllegalObjectID):
         self.mediator.unmap_volume("volume-wwn", "host")
Exemplo n.º 4
0
 def test_delete_snapshot_raise_illegal_object_id(self):
     self.mediator.client.cmd.vol_list.side_effect = [xcli_errors.IllegalValueForArgumentError("",
                                                                                               "snapshot-wwn", "")]
     with self.assertRaises(array_errors.IllegalObjectID):
         self.mediator.delete_snapshot("snapshot-wwn")