diff --git a/manila/cmd/manage.py b/manila/cmd/manage.py index 41907b72fb..a9cb726471 100644 --- a/manila/cmd/manage.py +++ b/manila/cmd/manage.py @@ -60,7 +60,6 @@ import sys from oslo_config import cfg from oslo_log import log -from oslo_utils import uuidutils from manila.common import config # Need to register global_opts # noqa from manila import context @@ -91,20 +90,6 @@ def args(*args, **kwargs): return _decorator -def param2id(object_id): - """Helper function to convert various id types to internal id. - - args: [object_id], e.g. 'vol-0000000a' or 'volume-0000000a' or '10' - """ - if uuidutils.is_uuid_like(object_id): - return object_id - elif '-' in object_id: - # FIXME(ja): mapping occurs in nova? - pass - else: - return int(object_id) - - class ShellCommands(object): def bpython(self): """Runs a bpython shell. diff --git a/manila/tests/cmd/test_manage.py b/manila/tests/cmd/test_manage.py index f50769fd33..b333ac9982 100644 --- a/manila/tests/cmd/test_manage.py +++ b/manila/tests/cmd/test_manage.py @@ -47,22 +47,6 @@ class ManilaCmdManageTestCase(test.TestCase): self.service_cmds = manila_manage.ServiceCommands() self.share_cmds = manila_manage.ShareCommands() - def test_param2id_is_uuid_like(self): - obj_id = '12345678123456781234567812345678' - self.assertEqual(obj_id, manila_manage.param2id(obj_id)) - - def test_param2id_not_uuid_like_with_dash(self): - obj_id = '112-112-112' - self.assertIsNone(manila_manage.param2id(obj_id)) - - def test_param2id_not_uuid_like_without_dash(self): - obj_id = '123' - self.assertEqual(123, manila_manage.param2id(obj_id)) - - def test_param2id_not_uuid_like_value_error(self): - obj_id = 'invalidvalue' - self.assertRaises(ValueError, manila_manage.param2id, obj_id) - @mock.patch.object(manila_manage.ShellCommands, 'run', mock.Mock()) def test_shell_commands_bpython(self): self.shell_commands.bpython()