diff --git a/ocaml/xapi-storage/generator/lib/data.ml b/ocaml/xapi-storage/generator/lib/data.ml index e4571892f71..36b5d20f87d 100644 --- a/ocaml/xapi-storage/generator/lib/data.ml +++ b/ocaml/xapi-storage/generator/lib/data.ml @@ -239,14 +239,18 @@ end module Data (R : RPC) = struct open R + type copy_operation_v1 = string [@@deriving rpcty] + + type mirror_operation_v1 = string [@@deriving rpcty] + (** The primary key for referring to a long-running operation. *) type operation = - | Copy of uri * uri - (** Copy (src,dst) represents an on-going copy operation - from the [src] URI to the [dst] URI. *) - | Mirror of uri * uri - (** Mirror (src,dst) represents an on-going mirror - operation from the [src] URI to the [dst] URI. *) + | CopyV1 of copy_operation_v1 + (** CopyV1 (key) represents an on-going copy operation + with the unique [key]. *) + | MirrorV1 of mirror_operation_v1 + (** MirrorV1 (key) represents an on-going mirror + operation with the unique [key]. *) [@@deriving rpcty] (** A list of operations. *) @@ -256,7 +260,10 @@ module Data (R : RPC) = struct type status = { failed: bool (** [failed] will be set to true if the operation has failed for some - reason. *) + reason. *) + ; complete: bool + (** [complete] will be set true if the operation is complete, whether + successfully or not, see [failed]. *) ; progress: float option (** [progress] will be returned for a copy operation, and ranges between 0 and 1. *)