GEt on /v2.0 fails with a 404

Bug #1631466 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Sergey Belous

Bug Description

Following the networking API reference to list versions of the network API, I can list versions from the network endpoint like this:

http://developer.openstack.org/api-ref/networking/v2/?expanded=list-api-versions-detail

And get details on each version like this:

http://developer.openstack.org/api-ref/networking/v2/?expanded=list-api-versions-detail,show-api-v2-details-detail#show-api-v2-details

However, in practice, using master neutron:

stack@osc:/opt/stack/neutron$ git log -1
commit 80d4df144d62ce638ca7bdd228cdd116e34b3067
Merge: 3ade301 fc93f7f
Author: Jenkins <email address hidden>
Date: Wed Oct 5 15:36:06 2016 +0000

    Merge "Relocate Flavor and ServiceProfile DB models"
stack@osc:/opt/stack/neutron$

The 2nd route to get v2.0 details fails:

stack@osc:~$ curl -g -H "X-Auth-Token: $OS_TOKEN" http://9.5.127.82:9696/ | json_pp
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 118 100 118 0 0 33541 0 --:--:-- --:--:-- --:--:-- 39333
{
   "versions" : [
      {
         "id" : "v2.0",
         "links" : [
            {
               "rel" : "self",
               "href" : "http://9.5.127.82:9696/v2.0"
            }
         ],
         "status" : "CURRENT"
      }
   ]
}

stack@osc:~$ curl -g -H "X-Auth-Token: $OS_TOKEN" http://9.5.127.82:9696/v2.0
404 Not Found

The resource could not be found.

--

So either the docs are wrong, or the API is busted.

It looks like this is what should handle the /v2.0 route though:

https://github.com/openstack/neutron/blob/80d4df144d62ce638ca7bdd228cdd116e34b3067/neutron/api/v2/router.py#L45

Tags: api api-ref
Revision history for this message
Sergey Belous (sbelous) wrote :

Matt, just missed splash in response from neutron server and in example in docs, api is OK http://paste.openstack.org/show/585184/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/384553

Changed in neutron:
assignee: nobody → Sergey Belous (sbelous)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/384553
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=1d01864c066155939e84b0402730f1266b091841
Submitter: Jenkins
Branch: master

commit 1d01864c066155939e84b0402730f1266b091841
Author: Sergey Belous <email address hidden>
Date: Mon Oct 10 17:20:42 2016 +0300

    Added trailing slash in link to Networking API v2.0

    TrivialFix
    Closes-bug: #1631466

    Change-Id: I310ea62f210ec2d4250d0f93c3081356f429fc41

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 10.0.0.0b1

This issue was fixed in the openstack/neutron 10.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.