Change in ovirt-guest-agent[ovirt-3.4]: agent: Implement basics for API Versioning
vfeenstr at redhat.com
vfeenstr at redhat.com
Thu Apr 24 07:50:14 UTC 2014
Vinzenz Feenstra has submitted this change and it was merged.
Change subject: agent: Implement basics for API Versioning
......................................................................
agent: Implement basics for API Versioning
This commit introduces the basics needed to support API versioning between
the ovirt-guest-agent and VDSM.
How the negotiation works:
- VDSM has as a default the apiVersion value set to _DISABLED_API_VALUE marking
it as unsupported
- The guest agent sends its max supported version with every `heartbeat`
message
- VDSM checks that `apiVersion` exists in the `heartbeat` message arguments
- If it exists it retrieves the minimum common version and sends the
`api-version` message with the common version as `apiVersion` argument
- If it does NOT exist it and the apiVersion is not set to
_DISABLED_API_VALUE it will set it to _DISABLED_API_VALUE, with the meaning
that it is not supported at all by the guest agent on the other end.
- The guest agent on receiving this message makes it own check and sets the
`apiVersion` to the commonVersion
- If VDSM sends the `refresh` command it also sends its `apiVersion` value
however if it does not, capable guest agents are disabling the versioning
support and will know it in pre-supported state as well.
NOTE: VDSM will never send an api-version message without being triggered.
This is to ensure backwards compatibility.
Change-Id: I754d52009538914dd0143894b24ad48fbf13cb38
Signed-off-by: Vinzenz Feenstra <vfeenstr at redhat.com>
---
M ovirt-guest-agent/OVirtAgentLogic.py
M tests/guest_agent_test.py
M tests/message_validator.py
3 files changed, 170 insertions(+), 24 deletions(-)
Approvals:
Vinzenz Feenstra: Verified; Looks good to me, approved
--
To view, visit http://gerrit.ovirt.org/27031
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I754d52009538914dd0143894b24ad48fbf13cb38
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-guest-agent
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the Engine-commits
mailing list