Ask Your Question
0

How to find version of a service API?

asked 2016-02-17 03:10:44 -0500

aric gravatar image

How can I find version of a service API, for example neutron API? Is there any tool or command to do it? Thanks!

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2016-02-17 03:35:04 -0500

updated 2019-05-23 06:42:54 -0500

first source the credentials file for instance soruce openrc and then run the following command keystone endpoint-list to list the API endpoints. If you want to see the services then run keystone service-list you will get all the services . Select id of specific service and type keystone service-get <id> to know the details of the service


EDIT: In the newer versions of openstack you can get this by installing pip install python openstackclient and then by running the command openstack endpoint list -- after sourcing the openrc file obiviosuly.

edit flag offensive delete link more
0

answered 2016-02-20 19:02:21 -0500

aric gravatar image

updated 2016-02-20 19:09:09 -0500

Hi, Thank for your replay! The keystone service-get <id> command do not display the version of API.

    # keystone service-get 01d7002e16f9eea0cc0cb4e08e7bbb6c
+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
| description |     Neutron Network Service      |
|   enabled   |               True               |
|      id     | 01d7002e16f9eea0cc0cb4e08e7bbb6c |
|     name    |             neutron              |
|     type    |             network              |
+-------------+----------------------------------+

We can use curl command to find version of a service API. for example, "id": "v2.0" show version 2.0.

# curl http://192.168.57.11:9696 | python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   121  100   121    0     0  18338      0 --:--:-- --:--:-- --:--:-- 60500
{
    "versions": [
        {
            "id": "v2.0",
            "links": [
                {
                    "href": "http://192.168.57.11:9696/v2.0",
                    "rel": "self"
                }
            ],
            "status": "CURRENT"
        }
    ]
}
edit flag offensive delete link more
0

answered 2016-02-20 23:29:39 -0500

cbruf82 gravatar image

A catalog list will also show you what version you using. Also you can look at your openrc file to view what version the endpoint is using.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-02-17 03:10:44 -0500

Seen: 781 times

Last updated: May 23