Move the master socket in the ganeti run dir
[ganeti-local] / lib / rpc.py
index 0efb6a7..f2c85db 100644 (file)
@@ -208,6 +208,18 @@ def call_instance_shutdown(node, instance):
   return c.getresult().get(node, False)
 
 
+def call_instance_migrate(node, instance, target, live):
+  """Migrate an instance.
+
+  This is a single-node call.
+
+  """
+  c = Client("instance_migrate", [instance.name, target, live])
+  c.connect(node)
+  c.run()
+  return c.getresult().get(node, False)
+
+
 def call_instance_reboot(node, instance, reboot_type, extra_args):
   """Reboots an instance.
 
@@ -500,6 +512,19 @@ def call_blockdev_find(node, disk):
   return c.getresult().get(node, False)
 
 
+def call_blockdev_close(node, disks):
+  """Closes the given block devices.
+
+  This is a single-node call.
+
+  """
+  params = [cf.ToDict() for cf in disks]
+  c = Client("blockdev_close", params)
+  c.connect(node)
+  c.run()
+  return c.getresult().get(node, False)
+
+
 def call_upload_file(node_list, file_name):
   """Upload a file.
 
@@ -595,6 +620,18 @@ def call_iallocator_runner(node, name, idata):
   return result
 
 
+def call_blockdev_grow(node, cf_bdev, amount):
+  """Request a snapshot of the given block device.
+
+  This is a single-node call.
+
+  """
+  c = Client("blockdev_grow", [cf_bdev.ToDict(), amount])
+  c.connect(node)
+  c.run()
+  return c.getresult().get(node, False)
+
+
 def call_blockdev_snapshot(node, cf_bdev):
   """Request a snapshot of the given block device.