(2.10) Fix in RPC
[ganeti-local] / lib / rpc_defs.py
index a9ed9da..bdb7647 100644 (file)
@@ -71,7 +71,8 @@ ACCEPT_OFFLINE_NODE = object()
  ED_BLOCKDEV_RENAME,
  ED_DISKS_DICT_DP,
  ED_SINGLE_DISK_DICT_DP,
- ED_NIC_DICT) = range(1, 15)
+ ED_NIC_DICT,
+ ED_DEVICE_DICT) = range(1, 16)
 
 
 def _Prepare(calls):
@@ -230,11 +231,12 @@ _INSTANCE_CALLS = [
     ("inst", ED_INST_DICT, "Instance object"),
     ("reboot_type", None, None),
     ("shutdown_timeout", None, None),
-    ("reason_text", None, "Reason for the reboot"),
+    ("reason", None, "The reason for the reboot"),
     ], None, None, "Returns the list of running instances on the given nodes"),
   ("instance_shutdown", SINGLE, None, constants.RPC_TMO_NORMAL, [
     ("instance", ED_INST_DICT, "Instance object"),
     ("timeout", None, None),
+    ("reason", None, "The reason for the shutdown"),
     ], None, None, "Stops an instance"),
   ("instance_balloon_memory", SINGLE, None, constants.RPC_TMO_NORMAL, [
     ("instance", ED_INST_DICT, "Instance object"),
@@ -278,12 +280,21 @@ _INSTANCE_CALLS = [
   ("instance_start", SINGLE, None, constants.RPC_TMO_NORMAL, [
     ("instance_hvp_bep", ED_INST_DICT_HVP_BEP_DP, None),
     ("startup_paused", None, None),
+    ("reason", None, "The reason for the startup"),
     ], None, None, "Starts an instance"),
   ("instance_os_add", SINGLE, None, constants.RPC_TMO_1DAY, [
     ("instance_osp", ED_INST_DICT_OSP_DP, None),
     ("reinstall", None, None),
     ("debug", None, None),
     ], None, None, "Starts an instance"),
+  ("hotplug_device", SINGLE, None, constants.RPC_TMO_NORMAL, [
+    ("instance", ED_INST_DICT, "Instance object"),
+    ("action", None, "Hotplug Action"),
+    ("dev_type", None, "Device type"),
+    ("device", ED_DEVICE_DICT, "Device dict"),
+    ("extra", None, "Extra info for device (dev_path for disk)"),
+    ("seq", None, "Device seq"),
+    ], None, None, "Hoplug a device to a running instance"),
   ]
 
 _IMPEXP_CALLS = [