Added reload-config command
Change-Id: I9ef4b8095f4f5e795f4700ef6b6f0053c6a8e194
This commit is contained in:
parent
b28e93304d
commit
d7e7080638
@ -28,3 +28,11 @@ class Client(object):
|
||||
self.http_client = http.HTTPClient(endpoint)
|
||||
self.hosts = hosts.HostsManager(self.http_client)
|
||||
self.services = services.ServicesManager(self.http_client)
|
||||
|
||||
def reload_config(self):
|
||||
resp, body = self.http_client.json_request(
|
||||
'/reload_config',
|
||||
'POST',
|
||||
body='' # Must send empty body
|
||||
)
|
||||
return body
|
||||
|
@ -55,3 +55,8 @@ def do_service_list(sc, args):
|
||||
'contact_groups': lambda x: x['contact_groups'],
|
||||
}
|
||||
utils.print_list(services, cols, formatters=formatters)
|
||||
|
||||
|
||||
def do_reload_config(sc, args):
|
||||
"""Trigger a config reload."""
|
||||
print (sc.reload_config()['message'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user