@@ -135,6 +135,20 @@ module Vgpu = struct
135135 }
136136end
137137
138+ module Vusb = struct
139+ type id = string * string
140+ type t = {
141+ id : id ;
142+ hostbus : string ;
143+ hostport : string ;
144+ version : string ;
145+ path : string ;
146+ }
147+ type state = {
148+ plugged : bool ;
149+ }
150+ end
151+
138152module Vm = struct
139153 include Xenops_types. Vm
140154end
@@ -285,6 +299,7 @@ module Metadata = struct
285299 vifs : Vif .t list ;
286300 pcis : Pci .t list ;
287301 vgpus : Vgpu .t list ;
302+ vusbs : Vusb .t list ;
288303 domains : string option ;
289304 (* * Opaque data describing per-domain state *)
290305 }
@@ -295,6 +310,7 @@ module Metadata = struct
295310 vifs = [] ;
296311 pcis = [] ;
297312 vgpus = [] ;
313+ vusbs = [] ;
298314 domains = None ;
299315 }
300316
@@ -334,6 +350,7 @@ module Dynamic = struct
334350 | Vif of Vif .id
335351 | Pci of Pci .id
336352 | Vgpu of Vgpu .id
353+ | Vusb of Vusb .id
337354 | Task of Task .id
338355 type barrier = int * (id list )
339356 type t =
@@ -342,6 +359,7 @@ module Dynamic = struct
342359 | Vif_t of Vif .id * ((Vif .t * Vif .state ) option )
343360 | Pci_t of Pci .id * ((Pci .t * Pci .state ) option )
344361 | Vgpu_t of Vgpu .id * ((Vgpu .t * Vgpu .state ) option )
362+ | Vusb_t of Vusb .id * ((Vusb .t * Vusb .state ) option )
345363 | Task_t of Task .id * (Task .t option )
346364end
347365
@@ -454,6 +472,15 @@ module VBD = struct
454472 external remove : debug_info -> Vbd .id -> unit = " "
455473end
456474
475+ module VUSB = struct
476+ external add : debug_info -> Vusb .t -> Vusb .id = " "
477+ external plug : debug_info -> Vusb .id -> Task .id = " "
478+ external unplug : debug_info -> Vusb .id -> Task .id = " "
479+ external stat : debug_info -> Vusb .id -> (Vusb .t * Vusb .state ) = " "
480+ external list : debug_info -> Vm .id -> (Vusb .t * Vusb .state ) list = " "
481+ external remove : debug_info -> Vusb .id -> unit = " "
482+ end
483+
457484module VIF = struct
458485 external add : debug_info -> Vif .t -> Vif .id = " "
459486 external plug : debug_info -> Vif .id -> Task .id = " "
0 commit comments