Commit 8979196a authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Add RPC calls to modify storage fields


Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 9b648ee7
......@@ -365,6 +365,14 @@ class NodeHttpServer(http.server.HttpServer):
(su_name, su_args, name, fields) = params
return storage.GetStorage(su_name, *su_args).List(name, fields)
@staticmethod
def perspective_storage_modify(params):
"""Modify a storage unit.
"""
(su_name, su_args, name, changes) = params
return storage.GetStorage(su_name, *su_args).Modify(name, changes)
# bridge --------------------------
@staticmethod
......
......@@ -433,7 +433,7 @@ class RpcRunner(object):
return self._MultiNodeCall(node_list, "vg_list", [])
def call_storage_list(self, node_list, su_name, su_args, name, fields):
"""Get list of storage units..
"""Get list of storage units.
This is a multi-node call.
......@@ -441,6 +441,15 @@ class RpcRunner(object):
return self._MultiNodeCall(node_list, "storage_list",
[su_name, su_args, name, fields])
def call_storage_modify(self, node, su_name, su_args, name, changes):
"""Modify a storage unit.
This is a single-node call.
"""
return self._SingleNodeCall(node, "storage_modify",
[su_name, su_args, name, changes])
def call_bridges_exist(self, node, bridges_list):
"""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