Re-implements image listing to sort/filter on jumpgate itself
Merge pull request #146 from sudorandom/image-list

Re-implements image listing to sort/filter on jumpgate itself
Correct http return code of identify versions api

Keystone returns 300 http code (Multiple Choices) instead of 200 (OK)
[0] when client GETs the api version info that current identify service
supported.

This wrong return code causes keystonemiddleware failed at api version
query [1] with error "Unable to get version info from keystone: 200",
which middleware as a client of keystone lives in a upperlayer service.

[0]
https://github.com/openstack/keystone/blob/master/keystone/controllers.py#L132
[1]
https://github.com/openstack/keystonemiddleware/blob/master/keystonemiddleware/auth_token.py#L1245

For the details of curl test, see
http://paste.openstack.org/show/92177/ .

Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Merge pull request #147 from LiuZhiyan/correct-identify-versions-api-returncode

Correct http return code of identify versions api
Making token validation api returns service catalog

Currently access info token validation api returned doesn't include
service catalog dict, it causes some projects couldn't work well as it
designed: upperlayer project uses those endpoints to call other servies
for the necessary handling of function, e.g. Heat, as an example the
follow execution stack could be triggered by a standard stack creation
usecase. And, as code logic shown, keystoneclient has such related
parsing and construction logic as well.

https://github.com/openstack/heat/blob/master/heat/engine/properties.py#L296
  https://github.com/openstack/heat/blob/master/heat/engine/constraints.py#L576
    https://github.com/openstack/heat/blob/master/heat/engine/clients/os/glance.py#L35
      https://github.com/openstack/heat/blob/master/heat/engine/clients/client_plugin.py#L50
        https://github.com/openstack/heat/blob/master/heat/common/heat_keystoneclient.py#L196
          https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/httpclient.py#L174
            https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/access.py#L532
              https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/service_catalog.py#L271

Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Correct content type of response for image metadata getting api

The recent change [0] makes glanceclient use requests to communicate
with glance server, new http handling logic of which is sensitive on the
content type of response [1].

But current jumpgate logic for the api doesn't return any content by
http body [2] but with 'application/json' content type [3]. Then it
broken that new glanceclient logic and trigger error: "Multiple image
matches found for '<IMAGE_ID>', use an ID to be more specific.".

[0]
https://github.com/openstack/python-glanceclient/commit/dbb242b776908ca50ed8557ebfe7cfcd879366c8
[1]
https://github.com/openstack/python-glanceclient/blob/master/glanceclient/common/http.py#L218
[2]
https://github.com/softlayer/jumpgate/blob/master/jumpgate/image/drivers/sl/images.py#L223
[3] https://github.com/racker/falcon/blob/master/falcon/__init__.py#L27

Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Enabling name filter on image metadata api

To enable filter function for image v1 and v2 metadata api, which fixed
issue "Multiple image matches found for '<IMAGE_NAME>', use an ID to be
more specific." caused by that jumpgate returns all images without name
based filter when glanceclient request a image metadata query [0].

[0]
https://github.com/openstack/python-glanceclient/blob/master/glanceclient/common/utils.py#L159

Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Merge pull request #149 from LiuZhiyan/return-service-catalog-token-validation-api

Making token validation api returns service catalog
Merge pull request #150 from LiuZhiyan/correct-content-type-image-metadata-api

Correct content type of response for image metadata getting api (HEAD)
Merge pull request #151 from LiuZhiyan/enable-name-filter-image-metadata-api

Enabling name filter on image metadata api