Skip to content

Commit

Permalink
Merge pull request #202 from edwintorok/477-idl-part2
Browse files Browse the repository at this point in the history
[477 idl part2] SR.create API change and sharable flag
  • Loading branch information
edwintorok authored Feb 8, 2018
2 parents bda1536 + 362a463 commit 236beab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
19 changes: 1 addition & 18 deletions storage/storage_client.ml
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,4 @@ module Client = Storage_interface.Client(struct
)
end)

let default_vdi_info = {
vdi = "";
uuid = None;
content_id = "";
name_label = "";
name_description = "";
ty = "user";
metadata_of_pool = "";
is_a_snapshot = false;
snapshot_time = "19700101T00:00:00Z";
snapshot_of = "";
read_only = false;
cbt_enabled = false;
virtual_size = 0L;
physical_utilisation = 0L;
persistent = true;
sm_config = [];
}
let default_vdi_info = Storage_interface.default_vdi_info
7 changes: 6 additions & 1 deletion storage/storage_interface.ml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ type vdi_info = {
physical_utilisation: int64;
(* xenstore_data: workaround via XenAPI *)
persistent: bool;
sharable: bool;
sm_config: (string * string) list;
}

Expand All @@ -88,6 +89,7 @@ let default_vdi_info = {
virtual_size = 0L;
physical_utilisation = 0L;
persistent = true;
sharable = false;
sm_config = [];
}

Expand Down Expand Up @@ -201,6 +203,8 @@ module Dynamic = struct

end

type uuid = string

exception Backend_error_with_backtrace of (string * (string list)) (** name * params *)

exception Sr_not_attached of string (** error: SR must be attached to access VDIs *)
Expand All @@ -212,6 +216,7 @@ exception Cancelled of string
exception Redirect of string option
exception Sr_attached of string
exception Unimplemented of string
exception Activated_on_another_host of uuid
exception Duplicated_key of string
exception No_storage_plugin_for_sr of string
exception Content_ids_do_not_match of (string * string)
Expand Down Expand Up @@ -266,7 +271,7 @@ module SR = struct
(** Functions which manipulate SRs *)

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

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

0 comments on commit 236beab

Please sign in to comment.