Commit 4e071d3b authored by Iustin Pop's avatar Iustin Pop
Browse files

Export backend.GetMasterInfo over the rpc layer

We create a multi-node call so that querying all nodes for agreement
will be fast.

Reviewed-by: imsnah
parent bd1e4562
......@@ -472,6 +472,12 @@ class NodeDaemonRequestHandler(http.HTTPRequestHandler):
"""
return backend.UploadFile(*params)
@staticmethod
def perspective_master_info(params):
"""Query master information.
"""
return backend.GetMasterInfo()
# os -----------------------
......@@ -526,6 +532,8 @@ class NodeDaemonRequestHandler(http.HTTPRequestHandler):
duration = params[0]
return utils.TestDelay(duration)
# file storage ---------------
@staticmethod
def perspective_file_storage_dir_create(params):
"""Create the file storage directory.
......@@ -552,6 +560,8 @@ class NodeDaemonRequestHandler(http.HTTPRequestHandler):
return backend.RenameFileStorageDir(old_file_storage_dir,
new_file_storage_dir)
# jobs ------------------------
@staticmethod
@_RequireJobQueueLock
def perspective_jobqueue_update(params):
......
......@@ -384,6 +384,18 @@ def call_node_stop_master(node, stop_daemons):
return c.getresult().get(node, False)
def call_master_info(node_list):
"""Query master info.
This is a multi-node call.
"""
c = Client("master_info", [])
c.connect_list(node_list)
c.run()
return c.getresult()
def call_version(node_list):
"""Query node version.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment