This patches adds the needed RPC functions in order to create the
OpenvSwitches on the nodes.
---
 lib/rpc_defs.py     | 4 ++++
 lib/server/noded.py | 8 ++++++++
 2 files changed, 12 insertions(+)

diff --git a/lib/rpc_defs.py b/lib/rpc_defs.py
index ffb5ceb..dacc99a 100644
--- a/lib/rpc_defs.py
+++ b/lib/rpc_defs.py
@@ -501,6 +501,10 @@ _NODE_CALLS = [
     ("hypervisor", None, "Hypervisor type"),
     ("hvparams", None, "Hypervisor parameters"),
     ], None, None, "Tries to powercycle a node"),
+  ("node_configure_ovs", SINGLE, None, constants.RPC_TMO_NORMAL, [
+    ("ovs_name", None, "Name of the OpenvSwitch to create"),
+    ("ovs_link", None, "Link of the OpenvSwitch to the outside"),
+    ], None, None, "This will create and setup the OpenvSwitch"),
   ]
 
 _MISC_CALLS = [
diff --git a/lib/server/noded.py b/lib/server/noded.py
index 618783f..dd3ba2d 100644
--- a/lib/server/noded.py
+++ b/lib/server/noded.py
@@ -831,6 +831,14 @@ class NodeRequestHandler(http.server.HttpServerHandler):
     (hypervisor_type, hvparams) = params
     return backend.PowercycleNode(hypervisor_type, hvparams)
 
+  @staticmethod
+  def perspective_node_configure_ovs(params):
+    """Sets up OpenvSwitch on the node.
+
+    """
+    (ovs_name, ovs_link) = params
+    return backend.ConfigureOVS(ovs_name, ovs_link)
+
   # cluster --------------------------
 
   @staticmethod
-- 
1.8.1.2

Reply via email to