Skip to content

Commit

Permalink
Merge pull request #5956 from MarkSymsCtx/CP-51278
Browse files Browse the repository at this point in the history
CP-51278: define import_activate datapath operation
  • Loading branch information
robhoes authored Sep 2, 2024
2 parents bb0411c + fe21d69 commit a4ecaac
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions ocaml/xapi-storage/generator/lib/data.ml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ let domain =
~description:["An opaque string which represents the Xen domain."]
domain

(** Path to a UNIX domain socket *)
type sock_path = string [@@deriving rpcty]

let sock_path =
Param.mk ~name:"sock_path"
~description:["A path to a UNIX domain socket in the filesystem."]
sock_path

open Idl

module Datapath (R : RPC) = struct
Expand Down Expand Up @@ -132,6 +140,23 @@ module Datapath (R : RPC) = struct
]
(dbg @-> uri_p @-> domain @-> returning unit error)

let import_activate =
declare "import_activate"
[
"[import_activate uri domain] prepares a connection to the "
; " storage named by [uri] for use by inbound import mirroring, "
; "the [domain] parameter identifies which domain to connect to, "
; "most likely 0 or a custom storage domain. The return value is a "
; "path to a UNIX domain socket to which an open file descriptor "
; "may be passed, by SCM_RIGHTS. This, in turn, will become "
; "the server end of a Network Block Device (NBD) connection "
; "using, new-fixed protocol. Implementations shall declare the "
; "VDI_MIRROR_IN feature for this method to be supported. It is "
; "expected that activate will have been previously called so that "
; "there is an active datapath."
]
(dbg @-> uri_p @-> domain @-> returning sock_path error)

let deactivate =
declare "deactivate"
[
Expand Down

0 comments on commit a4ecaac

Please sign in to comment.