Skip to content
Snippets Groups Projects
Commit 637b8d7e authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Add RPC call for storage operations


Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 6c3c6db9
No related branches found
No related tags found
No related merge requests found
......@@ -385,6 +385,14 @@ class NodeHttpServer(http.server.HttpServer):
(su_name, su_args, name, changes) = params
return storage.GetStorage(su_name, *su_args).Modify(name, changes)
@staticmethod
def perspective_storage_execute(params):
"""Execute an operation on a storage unit.
"""
(su_name, su_args, name, op) = params
return storage.GetStorage(su_name, *su_args).Execute(name, op)
# bridge --------------------------
@staticmethod
......
......@@ -450,6 +450,15 @@ class RpcRunner(object):
return self._SingleNodeCall(node, "storage_modify",
[su_name, su_args, name, changes])
def call_storage_execute(self, node, su_name, su_args, name, op):
"""Executes an operation on a storage unit.
This is a single-node call.
"""
return self._SingleNodeCall(node, "storage_execute",
[su_name, su_args, name, op])
def call_bridges_exist(self, node, bridges_list):
"""Checks if a node has all the bridges given.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment