Comment 1 for bug 1567621

Revision history for this message
Fahri Cihan Demirci (cihand) wrote :

You get the expected result when you make a request to the versionless endpoint, like http://<nova-ip>:8774:

$ curl -s http://127.0.0.1:8774 | jq .
{
  "versions": [
    {
      "status": "SUPPORTED",
      "updated": "2011-01-21T11:33:21Z",
      "links": [
        {
          "href": "http://127.0.0.1:8774/v2/",
          "rel": "self"
        }
      ],
      "min_version": "",
      "version": "",
      "id": "v2.0"
    },
    {
      "status": "CURRENT",
      "updated": "2013-07-23T11:33:21Z",
      "links": [
        {
          "href": "http://127.0.0.1:8774/v2.1/",
          "rel": "self"
        }
      ],
      "min_version": "2.1",
      "version": "2.12",
      "id": "v2.1"
    }
  ]
}

When you make a request to a versioned endpoint which does not have a valid version then you get choices which contain the versioned endpoints suffixed with the version string you specified:

$ curl -s http://127.0.0.1:8774/stuff | jq .
{
  "choices": [
    {
      "status": "SUPPORTED",
      "media-types": [
        {
          "base": "application/json",
          "type": "application/vnd.openstack.compute+json;version=2"
        }
      ],
      "id": "v2.0",
      "links": [
        {
          "href": "http://127.0.0.1:8774/v2/stuff",
          "rel": "self"
        }
      ]
    },
    {
      "status": "CURRENT",
      "media-types": [
        {
          "base": "application/json",
          "type": "application/vnd.openstack.compute+json;version=2.1"
        }
      ],
      "id": "v2.1",
      "links": [
        {
          "href": "http://127.0.0.1:8774/v2.1/stuff",
          "rel": "self"
        }
      ]
    }
  ]
}

Since 3 is not a valid version, the choices you get are expected. For reference: http://developer.openstack.org/api-ref-compute-v2.1.html

Therefore, I think that this behaviour you are encountering is intentional and not a bug. Do you agree with my statements?