+ 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))