]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr/rest: remove unused DebugJob 10328/head
authorJohn Spray <john.spray@redhat.com>
Tue, 27 Sep 2016 13:19:08 +0000 (14:19 +0100)
committerJohn Spray <john.spray@redhat.com>
Thu, 29 Sep 2016 16:27:18 +0000 (17:27 +0100)
This dates back from the Calamari/Salt days.

Signed-off-by: John Spray <john.spray@redhat.com>
src/pybind/mgr/rest/app/urls/v2.py
src/pybind/mgr/rest/app/views/v2.py

index 117d92db3fd6eba2468d31681c15afc9f558bbf9..c2ad401cd0b9cba615f32a1d55557a5e8b457532 100644 (file)
@@ -78,9 +78,6 @@ urlpatterns = patterns(
     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'}),
index 411c3552917f34c907143a1c1c76edc6effca301..7c588efdbbf4076303c8070684080ce49f8d92bf 100644 (file)
@@ -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