From 025debbb9f5b1bf5285249a6eb4b7866d8625e06 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 21 Jun 2017 21:00:35 -0400 Subject: [PATCH] pybind/mgr/restful: add 'restful restart' command Signed-off-by: Sage Weil --- src/pybind/mgr/restful/module.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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, -- 2.39.5