From 9acd4dd989e56d1f1160230fc836fccabf29c6f5 Mon Sep 17 00:00:00 2001 From: Pau Ruiz Safont Date: Tue, 30 Aug 2022 15:11:46 +0100 Subject: [PATCH] CP-40444: Mark VTPM class as prototype Although the module has existed since the Rio release, it doesn't make sense to state so. This is because until now it was impossible to create vtpm objects in the database, trying to create one of them resulted in an exception. This has the added benefit to mark all the parts of the class to be prototypes and this will make them easier to change before the feature becomes stable. Signed-off-by: Pau Ruiz Safont --- ocaml/idl/datamodel_vtpm.ml | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/ocaml/idl/datamodel_vtpm.ml b/ocaml/idl/datamodel_vtpm.ml index 7883e627036..118a9b83464 100644 --- a/ocaml/idl/datamodel_vtpm.ml +++ b/ocaml/idl/datamodel_vtpm.ml @@ -20,15 +20,7 @@ let persistence_backend = Enum ("persistence_backend", [("xapi", "This VTPM is persisted in XAPI's DB")]) let create = - call ~name:"create" - ~lifecycle: - [ - (Published, rel_rio, "") - ; ( Changed - , rel_next - , "Require only a VM reference and uniqueness to create a VTPM instance" - ) - ] + call ~name:"create" ~lifecycle:[] ~doc:"Create a new VTPM instance, and return its handle." ~params: [ @@ -39,20 +31,20 @@ let create = ~allowed_roles:_R_VM_ADMIN () let destroy = - call ~name:"destroy" ~lifecycle:[(Published, rel_rio, "")] + call ~name:"destroy" ~lifecycle:[] ~doc:"Destroy the specified VTPM instance, along with its state." ~params:[(Ref _vtpm, "self", "The reference to the VTPM object")] ~allowed_roles:_R_VM_ADMIN () let get_contents = - call ~name:"get_contents" ~in_product_since:"rel_next" - ~doc:"Obtain the contents of the TPM" ~secret:true + call ~name:"get_contents" ~lifecycle:[] ~doc:"Obtain the contents of the TPM" + ~secret:true ~params:[(Ref _vtpm, "self", "The VTPM reference")] ~result:(String, "The contents") ~hide_from_docs:true ~allowed_roles:_R_LOCAL_ROOT_ONLY () let set_contents = - call ~name:"set_contents" ~in_product_since:"rel_next" + call ~name:"set_contents" ~lifecycle:[] ~doc:"Introduce new contents for the TPM" ~secret:true ~params: [ @@ -63,15 +55,8 @@ let set_contents = let t = create_obj ~in_db:true ~in_oss_since:oss_since_303 ~persist:PersistEverything - ~lifecycle: - [ - (Published, rel_rio, "Added VTPM stub") - ; (Extended, rel_next, "Added ability to manipulate contents") - ; (Extended, rel_next, "Added VTPM unique and protected properties") - ; (Extended, rel_next, "Added Persistence backed") - ] - ~gen_constructor_destructor:false ~name:_vtpm ~descr:"A virtual TPM device" - ~gen_events:true ~doccomments:[] + ~lifecycle:[] ~gen_constructor_destructor:false ~name:_vtpm + ~descr:"A virtual TPM device" ~gen_events:true ~doccomments:[] ~messages_default_allowed_roles:_R_POOL_ADMIN ~contents: [