Bug 1416147 - Version 3 of the API doesn't implement the 'testconnectivity' action of external providers
Summary: Version 3 of the API doesn't implement the 'testconnectivity' action of exter...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.0.6.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: ovirt-4.1.1
: 4.1.1
Assignee: Juan Hernández
QA Contact: Petr Kubica
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-24 17:05 UTC by Juan Hernández
Modified: 2017-04-21 09:32 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-21 09:32:06 UTC
oVirt Team: Infra
rule-engine: ovirt-4.1+
rule-engine: planning_ack+
juan.hernandez: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 71124 master MERGED restapi: Add V3 'testconnectivity' action 2017-01-27 16:24:27 UTC
oVirt gerrit 71302 ovirt-engine-4.1 MERGED restapi: Add V3 'testconnectivity' action 2017-01-29 09:50:05 UTC

Description Juan Hernández 2017-01-24 17:05:37 UTC
The compatibility layer that implements version 3 of the API on top of version 4 doesn't implement the 'certificates' collection, and the 'importcertificate' and 'testconnectivity' actions of external providers.

Comment 1 Petr Kubica 2017-02-03 12:46:25 UTC
Getting 404 Not Found
ovirt-engine-restapi-4.1.0.3-0.1.el7.noarch

Fix wasn't included in the build.

Comment 2 Juan Hernández 2017-02-03 12:52:10 UTC
This missed the 4.1.0 build. It isn't relevant enough to justify an async release, so I am re-targeting to 4.1.1 and moving to MODIFIED.

Comment 3 Juan Hernández 2017-02-03 13:05:40 UTC
The verify this add an external provider, for example the oVirt Glance image provider, then find the identifier of the provider, available here:

  https://.../ovirt-engine/api/openstackimageproviders

Then send the request to execute the 'testconnectivity' action:

---8<---
#!/bin/bash -ex

url="https://engine42.example.com/ovirt-engine/api"
user="admin@internal"
password="..."
provider_id="..."

curl \
--verbose \
--cacert "/etc/pki/ovirt-engine/ca.pem" \
--request POST \
--header "Version: 3" \
--header "Accept: application/xml" \
--header "Content-Type: application/xml" \
--user "${user}:${password}" \
--data '
<action/>
' \
"${url}/openstackimageproviders/${provider_id}/testconnectivity"
--->8---

This should return a response like this:

  <action>
    <status>complete</status>
  </action>

Or a fault, if the connectivity test fails:

  <fault>
    <detail>[Failed to communicate with the external provider, see log for additional details.]</detail>
    <reason>Operation Failed</reason>
  </fault>

But it should never return a 404 HTTP code. If it does return that 404 code then the fix isn't working correctly.

Comment 4 Petr Kubica 2017-02-13 08:55:55 UTC
Verified in ovirt-engine-restapi-4.1.1-0.1.el7.noarch


Note You need to log in before you can comment on or make changes to this bug.