Skip to content

Commit 236beab

Browse files
authored
Merge pull request #202 from edwintorok/477-idl-part2
[477 idl part2] SR.create API change and sharable flag
2 parents bda1536 + 362a463 commit 236beab

File tree

2 files changed

+7
-19
lines changed

2 files changed

+7
-19
lines changed

storage/storage_client.ml

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,4 @@ module Client = Storage_interface.Client(struct
4141
)
4242
end)
4343

44-
let default_vdi_info = {
45-
vdi = "";
46-
uuid = None;
47-
content_id = "";
48-
name_label = "";
49-
name_description = "";
50-
ty = "user";
51-
metadata_of_pool = "";
52-
is_a_snapshot = false;
53-
snapshot_time = "19700101T00:00:00Z";
54-
snapshot_of = "";
55-
read_only = false;
56-
cbt_enabled = false;
57-
virtual_size = 0L;
58-
physical_utilisation = 0L;
59-
persistent = true;
60-
sm_config = [];
61-
}
44+
let default_vdi_info = Storage_interface.default_vdi_info

storage/storage_interface.ml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ type vdi_info = {
6969
physical_utilisation: int64;
7070
(* xenstore_data: workaround via XenAPI *)
7171
persistent: bool;
72+
sharable: bool;
7273
sm_config: (string * string) list;
7374
}
7475

@@ -88,6 +89,7 @@ let default_vdi_info = {
8889
virtual_size = 0L;
8990
physical_utilisation = 0L;
9091
persistent = true;
92+
sharable = false;
9193
sm_config = [];
9294
}
9395

@@ -201,6 +203,8 @@ module Dynamic = struct
201203

202204
end
203205

206+
type uuid = string
207+
204208
exception Backend_error_with_backtrace of (string * (string list)) (** name * params *)
205209

206210
exception Sr_not_attached of string (** error: SR must be attached to access VDIs *)
@@ -212,6 +216,7 @@ exception Cancelled of string
212216
exception Redirect of string option
213217
exception Sr_attached of string
214218
exception Unimplemented of string
219+
exception Activated_on_another_host of uuid
215220
exception Duplicated_key of string
216221
exception No_storage_plugin_for_sr of string
217222
exception Content_ids_do_not_match of (string * string)
@@ -266,7 +271,7 @@ module SR = struct
266271
(** Functions which manipulate SRs *)
267272

268273
(** [create dbg sr name_label name_description device_config physical_size] creates an sr with id [sr] *)
269-
external create : dbg:debug_info -> sr:sr -> name_label:string -> name_description:string -> device_config:(string * string) list -> physical_size:int64 -> unit = ""
274+
external create : dbg:debug_info -> sr:sr -> name_label:string -> name_description:string -> device_config:(string * string) list -> physical_size:int64 -> (string * string) list = ""
270275

271276
(** [set_name_label sr new_name_label] updates the name_label of SR [sr]. *)
272277
external set_name_label : dbg:debug_info -> sr:sr -> new_name_label:string -> unit = ""

0 commit comments

Comments
 (0)