ContainX / openstack4j

A Fluent OpenStack SDK / Client Library for Java
http://openstack4j.com
Other
290 stars 367 forks source link

Identity endpoint discovery does not work with some OpenStack instances. #902

Open bouskaJ opened 7 years ago

bouskaJ commented 7 years ago

You can find more info in https://github.com/ContainX/openstack4j/issues/899

auhlig commented 7 years ago

Thanks @bouskaJ.

Short summary: Implement Identity service discovery. Initial GET /identityreturns

HTTP/1.1 300 Multiple Choices
{
   "versions":{
      "values":[
         {
            "status":"stable",
            "updated":"2016-10-06T00:00:00Z",
            "media-types":[
               {
                  "base":"application/json",
                  "type":"application/vnd.openstack.identity-v3+json"
               }
            ],
            "id":"v3.7",
            "links":[
               {
                  "href":"http://172.24.1.69/identity/v3/",
                  "rel":"self"
               }
            ]
         },
         {
            "status":"deprecated",
            "updated":"2016-08-04T00:00:00Z",
            "media-types":[
               {
                  "base":"application/json",
                  "type":"application/vnd.openstack.identity-v2.0+json"
               }
            ],
            "id":"v2.0",
            "links":[
               {
                  "href":"http://172.24.1.69/identity/v2.0/",
                  "rel":"self"
               },
               {
                  "href":"http://docs.openstack.org/",
                  "type":"text/html",
                  "rel":"describedby"
               }
            ]
         }
      ]
   }
}

Extract endpoint of the identity service from the response. Os4js Identity V2 service should only get the v2-endpoint and v3 the v3-endpoint.