From 6537e6345725d17c8cfb43f1fecc3703e21a7217 Mon Sep 17 00:00:00 2001 From: John Spray Date: Tue, 27 Sep 2016 14:19:08 +0100 Subject: [PATCH] pybind/mgr/rest: remove unused DebugJob This dates back from the Calamari/Salt days. Signed-off-by: John Spray --- src/pybind/mgr/rest/app/urls/v2.py | 3 --- src/pybind/mgr/rest/app/views/v2.py | 15 --------------- 2 files changed, 18 deletions(-) diff --git a/src/pybind/mgr/rest/app/urls/v2.py b/src/pybind/mgr/rest/app/urls/v2.py index 117d92db3fd6e..c2ad401cd0b9c 100644 --- a/src/pybind/mgr/rest/app/urls/v2.py +++ b/src/pybind/mgr/rest/app/urls/v2.py @@ -78,9 +78,6 @@ url(r'^cluster/sync_object/(?P[a-zA-Z0-9-_]+)$', rest.app.views.v2.SyncObject.as_view({'get': 'retrieve'}), name='cluster-sync-object'), - url(r'^server/(?P[a-zA-Z0-9-\.]+)/debug_job', - rest.app.views.v2.DebugJob.as_view({'post': 'create'}), - name='server-debug-job'), url(r'^cluster/server$', rest.app.views.v2.ServerViewSet.as_view({'get': 'list'}), diff --git a/src/pybind/mgr/rest/app/views/v2.py b/src/pybind/mgr/rest/app/views/v2.py index 411c3552917f3..7c588efdbbf40 100644 --- a/src/pybind/mgr/rest/app/views/v2.py +++ b/src/pybind/mgr/rest/app/views/v2.py @@ -482,21 +482,6 @@ def describe(self, request): return Response([s.str for s in SYNC_OBJECT_TYPES]) -class DebugJob(RPCViewSet, RequestReturner): - """ -For debugging and automated testing only. - """ - def create(self, request, fqdn): - cmd = request.DATA['cmd'] - args = request.DATA['args'] - - # Avoid this debug interface being an arbitrary execution mechanism. - if not cmd.startswith("ceph.selftest"): - raise PermissionDenied("Command '%s' is not a self test command".format(cmd)) - - return self._return_request(self.client.debug_job(fqdn, cmd, args)) - - class ServerViewSet(RPCViewSet): """ Servers that we've learned about via the daemon metadata reported by