From: John Spray Date: Tue, 27 Sep 2016 13:19:08 +0000 (+0100) Subject: pybind/mgr/rest: remove unused DebugJob X-Git-Tag: v11.0.1~60^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F10328%2Fhead;p=ceph.git pybind/mgr/rest: remove unused DebugJob This dates back from the Calamari/Salt days. Signed-off-by: John Spray --- diff --git a/src/pybind/mgr/rest/app/urls/v2.py b/src/pybind/mgr/rest/app/urls/v2.py index 117d92db3fd6..c2ad401cd0b9 100644 --- a/src/pybind/mgr/rest/app/urls/v2.py +++ b/src/pybind/mgr/rest/app/urls/v2.py @@ -78,9 +78,6 @@ urlpatterns = patterns( 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 411c3552917f..7c588efdbbf4 100644 --- a/src/pybind/mgr/rest/app/views/v2.py +++ b/src/pybind/mgr/rest/app/views/v2.py @@ -482,21 +482,6 @@ such as the cluster maps 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