Skip to content

Commit

Permalink
Mirror api fix (#6009)
Browse files Browse the repository at this point in the history
  • Loading branch information
robhoes authored Sep 24, 2024
2 parents 23243f4 + b17a942 commit 1bafd51
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions ocaml/xapi-storage/generator/lib/data.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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. *)
Expand All @@ -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. *)
Expand Down

0 comments on commit 1bafd51

Please sign in to comment.