xapi-idl: Add xcp-rrdd methods for Protocol V3 #5163
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add
Plugin.Metrics.register
,Plugin.Metrics.deregister
andPlugin.Metrics.get_versions
RPC methods to xapi-idl.Plugin.Metrics.register
:Register a protocol v3 plugin (as defined in xapi-project/xapi-project.github.io#278) to xcp-rrdd daemon (or a compatible implementation) using a uid (that is similar to
Plugin.Local.register
uid) and a specific OpenMetrics version to use in protocol v3 payload (e.g "OpenMetrics 1.0.0").If the xcp-rrdd daemon doesn't support the asked OpenMetrics version, this method is supposed to fail (see
Plugin.Metrics.get_versions
).Plugin.Metrics.deregister
:Basically the same as
Plugin.Local.deregister
, added for consistency.Plugin.Metrics.get_versions
:Get the list of OpenMetrics versions supported by the xcp-rrdd daemon that can be used for
Plugin.Metrics.register
.Ideally, a plugin should call
Plugin.Metrics.get_versions
first to get the list of supported OpenMetrics versions, and choose one that the plugin supports, or fail otherwise.Open questions/issues :
get_versions
versions_p
parameter.OpenMetrics 1.0.0
) or follow semantic versioning and consider non-breaking changes as the same version (use e.gOpenMetrics 1.0
for 1.0.0, 1.0.1 and so on) ?Plugin.Metrics.register
be always deregistered usingPlugin.Metrics.deregister
to allow more easily separating protocol v2 code with v3 code ?