From: Sage Weil Date: Thu, 22 Jun 2017 01:00:35 +0000 (-0400) Subject: pybind/mgr/restful: add 'restful restart' command X-Git-Tag: v12.1.0~13^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=025debbb9f5b1bf5285249a6eb4b7866d8625e06;p=ceph.git pybind/mgr/restful: add 'restful restart' command Signed-off-by: Sage Weil --- diff --git a/src/pybind/mgr/restful/module.py b/src/pybind/mgr/restful/module.py index c1536530d77..23a0c624558 100644 --- a/src/pybind/mgr/restful/module.py +++ b/src/pybind/mgr/restful/module.py @@ -218,6 +218,11 @@ class Module(MgrModule): "desc": "Create localized self signed certificate", "perm": "rw" }, + { + "cmd": "restful restart", + "desc": "Restart API server", + "perm": "rw" + }, ] def __init__(self, *args, **kwargs): @@ -437,6 +442,14 @@ class Module(MgrModule): "" ) + elif command['prefix'] == 'restful restart': + self.restart(); + return ( + 0, + "Restarting RESTful API server...", + "" + ) + else: return ( -errno.EINVAL,