Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion ocaml/idl/datamodel.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3231,7 +3231,12 @@ module VM_metrics = struct
~ty:Bool ~qualifier:DynamicRO
"nomigrate" "VM is immobile and can't migrate between hosts"
~persist:false
; field ~lifecycle:[Published, rel_jura, ""] ~default_value:(Some (VEnum "unspecified"))
; field
~lifecycle:[
Prototyped, rel_jura, "Not yet implemented (for future use)";
Published, rel_kolkata, "This field now contains valid data"
]
~default_value:(Some (VEnum "unspecified"))
~ty:Datamodel_vm.domain_type ~qualifier:DynamicRO
"current_domain_type" "The current domain type of the VM (for running,\
suspended, or paused VMs). The last-known domain type for halted VMs."
Expand Down
7 changes: 6 additions & 1 deletion ocaml/idl/datamodel_vm.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,12 @@ let set_HVM_boot_policy = call ~flags:[`Session]
field ~qualifier:DynamicRO ~ty:Bool ~lifecycle:[Published, rel_ely, ""] ~default_value:(Some (VBool false))
"requires_reboot" "Indicates whether a VM requires a reboot in order to update its configuration, e.g. its memory allocation.";
field ~qualifier:StaticRO ~ty:String ~in_product_since:rel_ely ~default_value:(Some (VString "")) "reference_label" "Textual reference to the template used to create a VM. This can be used by clients in need of an immutable reference to the template since the latter's uuid and name_label may change, for example, after a package installation or upgrade.";
field ~qualifier:StaticRO ~ty:domain_type ~lifecycle:[Published, rel_jura, ""] ~default_value:(Some (VEnum "unspecified")) "domain_type" "The type of domain that will be created when the VM is started";
field ~qualifier:StaticRO ~ty:domain_type
~lifecycle:[
Prototyped, rel_jura, "Internal-only field; not yet in the public API";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in datamodel.ml this field is Published, this one is Prototyped. Is that intended?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did it this way, because the VM.domain_type field was part of the datamodel in jura, but it was marked as internal_only, and therefore not visible in the external API. Therefore, "published" in kolkata. The VM_metrics.current_domain_type was also includes in jura, but not internal_only, and I had therefore marked it as "published" in jura already (I wanted to also make this field internal, but somehow the datamodel didn't allow this).

However, even VM_metrics.current_domain_type wasn't actually useful in jura, because we never set it to anything other than unspecified. Perhaps it is better to call it "prototyped" as well for this reason.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Submitted a fixup for this.

Published, rel_kolkata, "The field is now valid"
]
~default_value:(Some (VEnum "unspecified")) "domain_type" "The type of domain that will be created when the VM is started";
])
()

Expand Down