Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Explicitly use version 3 of the API #42

Merged
merged 1 commit into from
May 5, 2016
Merged

Explicitly use version 3 of the API #42

merged 1 commit into from
May 5, 2016

Conversation

jhernand
Copy link
Contributor

@jhernand jhernand commented May 3, 2016

Veersion 4 of the oVirt engine will support two versions of the API:
version 3, which will be backwards compatible with older versions of the
engine and version 4, which won't be compatible. The default used by the
server will be version 4, but clients can explicitly request a version
of the API using the "Version" header or the "/v3" URL prefix. The
header is the preferred mechanism because it is just ignored by older
versions of the server. This patch modifies the the "check_rhev3.pl"
script so that it always send the header explicitly, so that it will
work with version 4 of the engine.

Signed-off-by: Juan Hernandez juan.hernandez@redhat.com

@jhernand
Copy link
Contributor Author

jhernand commented May 3, 2016

@scrat14, please review.

Veersion 4 of the oVirt engine will support two versions of the API:
version 3, which will be backwards compatible with older versions of the
engine and version 4, which won't be compatible. The default used by the
server will be version 4, but clients can explicitly request a version
of the API using the "Version" header or the "/v3" URL prefix. The
header is the preferred mechanism because it is just ignored by older
versions of the server. This patch modifies the the "check_rhev3.pl"
script so that it always send the header explicitly, so that it will
work with version 4 of the engine.

Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
@jhernand
Copy link
Contributor Author

jhernand commented May 3, 2016

Not sure if I changed all the places where requests are sent. Any suggestion?

@scrat14
Copy link
Member

scrat14 commented May 5, 2016

Thanks a lot for the patch, Juan!
rhev_connect() is the only function for connecting to REST-API, so this is the right place for the Version-header.

@scrat14 scrat14 merged commit 589eb43 into ovido:master May 5, 2016
@scrat14 scrat14 added this to the check_rhev3 - 1.6 milestone May 5, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants