+ This is a multi-node call.
+
+ """
+ params = [hpath, phase, env]
+ return self._MultiNodeCall(node_list, "hooks_runner", params)
+
+ def call_iallocator_runner(self, node, name, idata):
+ """Call an iallocator on a remote node
+
+ Args:
+ - name: the iallocator name
+ - input: the json-encoded input string
+
+ This is a single-node call.
+
+ """
+ return self._SingleNodeCall(node, "iallocator_runner", [name, idata])
+
+ def call_blockdev_grow(self, node, cf_bdev, amount):
+ """Request a snapshot of the given block device.
+
+ This is a single-node call.
+
+ """
+ return self._SingleNodeCall(node, "blockdev_grow",
+ [cf_bdev.ToDict(), amount])
+
+ def call_blockdev_snapshot(self, node, cf_bdev):
+ """Request a snapshot of the given block device.
+
+ This is a single-node call.
+
+ """
+ return self._SingleNodeCall(node, "blockdev_snapshot", [cf_bdev.ToDict()])
+
+ def call_snapshot_export(self, node, snap_bdev, dest_node, instance,
+ cluster_name, idx):
+ """Request the export of a given snapshot.
+
+ This is a single-node call.
+
+ """
+ return self._SingleNodeCall(node, "snapshot_export",
+ [snap_bdev.ToDict(), dest_node,
+ self._InstDict(instance), cluster_name, idx])
+
+ def call_finalize_export(self, node, instance, snap_disks):
+ """Request the completion of an export operation.
+
+ This writes the export config file, etc.
+
+ This is a single-node call.
+
+ """
+ flat_disks = []
+ for disk in snap_disks:
+ flat_disks.append(disk.ToDict())
+
+ return self._SingleNodeCall(node, "finalize_export",
+ [self._InstDict(instance), flat_disks])
+
+ def call_export_info(self, node, path):
+ """Queries the export information in a given path.
+
+ This is a single-node call.
+
+ """
+ result = self._SingleNodeCall(node, "export_info", [path])
+ if not result.failed and result.data:
+ result.data = objects.SerializableConfigParser.Loads(str(result.data))