Skip to content

Commit

Permalink
pybind/mgr/rest: remove unused DebugJob
Browse files Browse the repository at this point in the history
This dates back from the Calamari/Salt days.

Signed-off-by: John Spray <john.spray@redhat.com>
  • Loading branch information
John Spray committed Sep 29, 2016
1 parent 9a33766 commit 6537e63
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
3 changes: 0 additions & 3 deletions src/pybind/mgr/rest/app/urls/v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@
url(r'^cluster/sync_object/(?P<sync_type>[a-zA-Z0-9-_]+)$',
rest.app.views.v2.SyncObject.as_view({'get': 'retrieve'}),
name='cluster-sync-object'),
url(r'^server/(?P<fqdn>[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'}),
Expand Down
15 changes: 0 additions & 15 deletions src/pybind/mgr/rest/app/views/v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6537e63

Please sign in to comment.