From 3bdf567194416aa8c03391c73cbac79a31e4bce8 Mon Sep 17 00:00:00 2001 From: Gabor Igloi Date: Mon, 22 May 2017 11:35:25 +0100 Subject: [PATCH 1/5] xapi_crashdump.ml: remove dead code There is no crashdump.create API call, so it's fine to remove this function. Signed-off-by: Gabor Igloi --- ocaml/xapi/xapi_crashdump.ml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/ocaml/xapi/xapi_crashdump.ml b/ocaml/xapi/xapi_crashdump.ml index d8183877109..e8d9de00513 100644 --- a/ocaml/xapi/xapi_crashdump.ml +++ b/ocaml/xapi/xapi_crashdump.ml @@ -11,16 +11,9 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. *) -exception Not_implemented let nothrow f () = try f() with _ -> () -let create ~__context ~vM ~vDI = - let cdumpref = Ref.make() in - let uuid = Uuid.to_string (Uuid.make_uuid()) in - Db.Crashdump.create ~__context ~ref:cdumpref ~uuid ~vM ~vDI ~other_config:[]; - cdumpref - let destroy ~__context ~self = Stdext.Pervasiveext.finally (nothrow (fun ()-> From 7c46f1bffafdb83b1d5fea9d8b975deba3492dd6 Mon Sep 17 00:00:00 2001 From: Gabor Igloi Date: Mon, 22 May 2017 11:44:33 +0100 Subject: [PATCH 2/5] Xapi_crashdump: replace nothrow function with helper Use an equivalent one from Helpers instead. Signed-off-by: Gabor Igloi --- ocaml/xapi/xapi_crashdump.ml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ocaml/xapi/xapi_crashdump.ml b/ocaml/xapi/xapi_crashdump.ml index e8d9de00513..0325e04510a 100644 --- a/ocaml/xapi/xapi_crashdump.ml +++ b/ocaml/xapi/xapi_crashdump.ml @@ -12,14 +12,14 @@ * GNU Lesser General Public License for more details. *) -let nothrow f () = try f() with _ -> () - let destroy ~__context ~self = Stdext.Pervasiveext.finally - (nothrow (fun ()-> - let vdi = Db.Crashdump.get_VDI ~__context ~self in - Helpers.call_api_functions ~__context - (fun rpc session_id -> - Client.Client.VDI.destroy rpc session_id vdi))) + (Helpers.log_exn_continue + "destroying crashdump" + (fun ()-> + let vdi = Db.Crashdump.get_VDI ~__context ~self in + Helpers.call_api_functions ~__context + (fun rpc session_id -> + Client.Client.VDI.destroy rpc session_id vdi))) (fun ()-> Db.Crashdump.destroy ~__context ~self) From 3c38e84963c69f706be91ce92c24e8817a82d78e Mon Sep 17 00:00:00 2001 From: Gabor Igloi Date: Thu, 25 May 2017 17:30:21 +0100 Subject: [PATCH 3/5] Add Inverness release to the datamodel Signed-off-by: Gabor Igloi --- ocaml/idl/datamodel.ml | 9 +++++++++ ocaml/idl/datamodel_types.ml | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/ocaml/idl/datamodel.ml b/ocaml/idl/datamodel.ml index 7fe0ed395f2..21cb87f5223 100644 --- a/ocaml/idl/datamodel.ml +++ b/ocaml/idl/datamodel.ml @@ -87,6 +87,9 @@ let ely_release_schema_minor_vsn = 108 let falcon_release_schema_major_vsn = 5 let falcon_release_schema_minor_vsn = 120 +let inverness_release_schema_major_vsn = 5 +let inverness_release_schema_minor_vsn = 120 + (* List of tech-preview releases. Fields in these releases are not guaranteed to be retained when * upgrading to a full release. *) let tech_preview_releases = [ @@ -229,6 +232,12 @@ let get_product_releases in_product_since = | x::xs -> go_through_release_order xs in go_through_release_order release_order +let inverness_release = + { internal = get_product_releases rel_inverness + ; opensource = get_oss_releases None + ; internal_deprecated_since = None + } + let falcon_release = { internal = get_product_releases rel_falcon ; opensource=get_oss_releases None diff --git a/ocaml/idl/datamodel_types.ml b/ocaml/idl/datamodel_types.ml index bd0d840e12d..d382b211e10 100644 --- a/ocaml/idl/datamodel_types.ml +++ b/ocaml/idl/datamodel_types.ml @@ -56,6 +56,7 @@ let rel_indigo = "indigo" let rel_dundee = "dundee" let rel_ely = "ely" let rel_falcon = "falcon" +let rel_inverness = "inverness" type api_release = { code_name: string option; @@ -179,6 +180,12 @@ let release_order_full = [{ version_major = 2; version_minor = 7; branding = "XenServer 7.2"; + }; { + code_name = Some rel_inverness; + (** TODO replace with the actual version numbers when Inverness is released *) + version_major = 2; + version_minor = 7; + branding = "Unreleased"; }; ] From 7983e36751817ff31283be4fc62fea3df8e81606 Mon Sep 17 00:00:00 2001 From: Gabor Igloi Date: Fri, 26 May 2017 12:00:42 +0100 Subject: [PATCH 4/5] Datamodel: deprecate crashdump XenAPI class Signed-off-by: Gabor Igloi --- ocaml/idl/datamodel.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocaml/idl/datamodel.ml b/ocaml/idl/datamodel.ml index 21cb87f5223..b0b43f4f388 100644 --- a/ocaml/idl/datamodel.ml +++ b/ocaml/idl/datamodel.ml @@ -6633,7 +6633,7 @@ let crashdump_destroy = call (** A crashdump for a particular VM, stored in a particular VDI *) let crashdump = - create_obj ~in_db:true ~in_product_since:rel_rio ~in_oss_since:None ~internal_deprecated_since:None ~persist:PersistEverything ~gen_constructor_destructor:false ~name:_crashdump ~descr:"A VM crashdump" + create_obj ~in_db:true ~in_product_since:rel_rio ~in_oss_since:None ~internal_deprecated_since:(Some rel_inverness) ~persist:PersistEverything ~gen_constructor_destructor:false ~name:_crashdump ~descr:"A VM crashdump" ~gen_events:true ~doccomments:[] ~messages_default_allowed_roles:_R_POOL_OP From caa15cd0a42c7e8ba6d5aa6b4ea7831c85ceec24 Mon Sep 17 00:00:00 2001 From: Gabor Igloi Date: Fri, 26 May 2017 12:15:38 +0100 Subject: [PATCH 5/5] Datamodel: add comment about how to declare new XS release Signed-off-by: Gabor Igloi --- ocaml/idl/datamodel_types.ml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ocaml/idl/datamodel_types.ml b/ocaml/idl/datamodel_types.ml index d382b211e10..0464ccfc10d 100644 --- a/ocaml/idl/datamodel_types.ml +++ b/ocaml/idl/datamodel_types.ml @@ -65,6 +65,8 @@ type api_release = { branding: string; } +(* When you add a new release, use the version number of the latest release, + and "Unreleased" for the branding, until the actual values are finalised. *) let release_order_full = [{ code_name = Some rel_rio; version_major = 1;