It isn't currently written how one is supposed to update the domain configuration in libxl's private data store. This patch attempt to document the unwritten rules.
Signed-off-by: Anthony PERARD <anthony.per...@citrix.com> --- tools/libxl/CODING_STYLE | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tools/libxl/CODING_STYLE b/tools/libxl/CODING_STYLE index 3d572f6925..2ce8529c9b 100644 --- a/tools/libxl/CODING_STYLE +++ b/tools/libxl/CODING_STYLE @@ -186,6 +186,30 @@ When using an ao sub-operation, you should normally: cancel or destroy method. +UPDATE OF DOMAIN CONFIGURATION +------------------------------ + +Also known as "libxl-json" userdata or `libxl_domain_config'. + +Whenever a running domain have its configuration updated, like changing +media in a cdrom drive, the domain configuration in libxl private data +store needs to be updated as well. The domain configuration should +contain *more* information about the domain rather than less, stale data +are easier to spot that missing data. + +Here is an example of how to update the domain configuration: + * Remove current media from cdrom drive + * Update domain configuration with media removed + ( we could stop here) + * Update domain configuration to add media we are about to insert + * Insert media into cdrom drive + +Retrieve / store domain configuration from / to libxl private data store +are done with `libxl__get_domain_configuration' and +`libxl__set_domain_configuration'. Consult libxl_internal.h for more +information. + + FORMATTING AND NAMING --------------------- -- Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel