Commit 637b8d7e authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Add RPC call for storage operations

Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarIustin Pop <>
parent 6c3c6db9
...@@ -385,6 +385,14 @@ class NodeHttpServer(http.server.HttpServer): ...@@ -385,6 +385,14 @@ class NodeHttpServer(http.server.HttpServer):
(su_name, su_args, name, changes) = params (su_name, su_args, name, changes) = params
return storage.GetStorage(su_name, *su_args).Modify(name, changes) return storage.GetStorage(su_name, *su_args).Modify(name, changes)
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 -------------------------- # bridge --------------------------
@staticmethod @staticmethod
...@@ -450,6 +450,15 @@ class RpcRunner(object): ...@@ -450,6 +450,15 @@ class RpcRunner(object):
return self._SingleNodeCall(node, "storage_modify", return self._SingleNodeCall(node, "storage_modify",
[su_name, su_args, name, changes]) [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): def call_bridges_exist(self, node, bridges_list):
"""Checks if a node has all the bridges given. """Checks if a node has all the bridges given.
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