Thursday, April 28, 2016

Creating Servers via REST API on RDO Mitaka && Keystone API V3

As usual ssh-kepair for particular tenant is supposed to created sourcing tenant's
credentials and afterwards it works for particular tenant. By some reasons upgrade keystone api version to v3 breaks this schema in regards of REST API
POST requests issued for servers creation. I am not sure either following bellow
is workaround or it is supposed to work this way.

Assign admin role user admin on project demo via openstack client

 [root@ip-192-169-142-127 ~(keystone_admin)]# openstack project list |  \
                                                   grep demo  > list2
 [root@ip-192-169-142-127 ~(keystone_admin)]#openstack user list |  \
                                                  grep admin   >> list2
 [root@ip-192-169-142-127 ~(keystone_admin)]# openstack role list | \
                                                 grep admin   >> list2

[root@ip-192-169-142-127 ~(keystone_admin)]# cat list2
| 052b16e56537467d8161266b52a43b54 | demo     |
| b6f2f511caa44f4e94ce5b2a5809dc50    | admin    |
| f40413a0de92494680ed8b812f2bf266    | admin    |



[root@ip-192-169-142-127 ~(keystone_admin)]# openstack role add --project \ 052b16e56537467d8161266b52a43b54  \
--user b6f2f511caa44f4e94ce5b2a5809dc50 \  f40413a0de92494680ed8b812f2bf266

*********************************************************************
Run to obtain token scoped "demo"
*********************************************************************

# . keystonerc_admin
# curl -i  -H "Content-Type: application/json" -d \
' { "auth":
   { "identity":
    { "methods": ["password"], "password":
     { "user":
      { "name": "admin", "domain":
        { "id": "default" }, "password": "7049f834927e4468" }
      }
     },
  "scope":
{ "project":
  { "name": "demo", "domain":
    { "id": "default" }
     }
      }
    }
}'  http://192.169.142.127:5000/v3/auth/tokens ; echo


  Created ssh keypair "oskeydemoV3" sourcing keystonerc_admin


    Admin Console shows


  
*********************************************************************************************
    Submit "oskeydemoV3" as value for key_name into Chrome REST Client environment && issue POST request to create the server , "key_name" will
be accepted ( vs case when ssh-keypair was created by tenant demo )
*********************************************************************************************



Now log into dashboard as demo


   Verify that created keypair "oskeydemoV3" allows log into server

  

   Another aproach to hack original qcow2 image

 
  

Wednesday, April 27, 2016

Injection public ssh key via REST API Creating Server on RDO Mitaka

Get REST API POST request body run :-

nova --debug keypair-add --pub-key ~/.ssh/id_rsa.pub testkey07

***********************************************************
Afterwards REST API Code looks like
***********************************************************

[root@ip-192-169-142-127 test(keystone_demo)]# cat RestAPI.sh

#!/bin/bash -x
################################
# Injection public key to Server
################################

# Uploading public key to serve as ssh keypair
curl -g -i -X POST http://192.169.142.127:8774/v2/af755632772a42c28539091819740943/os-keypairs -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: efb750c13fa94ff4bd3317c8dadcba4e" -d '{"keypair": {"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDYD2R7bGU0pWmcXk+8qARg7n9qn9YG5xiT/SP3oiorkkb1PUYvVD3vwl3z2C6j+IkTs0VSQfbVnrk4k3wZMjEayKN3VLNr7pV/EX2w5vC1vATbHi1HUrxiLKlNq9HM05JKl8gC45m3RyIjkETI3slaVThCmAXMPZPskgA2JMZmPx03b0gmCHXvtzXWMweU0CfVbgLeg5WTEyI4CovihfzC30V/AQCZytK66KYrACTlFTCfGMr8L0CilfOGFyp/Bw4i2fwKHToPAaucf5kiwjB27sXdauQpZhBnEBefpgj7wo+mefGIxbBx6bl9fi+lZUEn88lqH8olvtxaZEjqnYW1 root@ip-192-169-142-127.ip.secureserver.net\n", "user_id": "ba77bbbe75b0408a997fa8b30ce49632", "name": "testkey07", "fingerprint": "8c:7d:df:0c:8b:ce:e6:27:69:68:35:98:bc:12:25:1d"}}'
   
# Creating Server
curl -g -i -X POST http://192.169.142.127:8774/v2/af755632772a42c28539091819740943/servers -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: efb750c13fa94ff4bd3317c8dadcba4e" -d '{"server": {"name": "CirrOSDevs09", "key_name" : "testkey07", "imageRef": "807c3d57-b8c3-4f59-90c3-10902ee93296", "flavorRef": "1", "max_count": 1, "min_count": 1, "networks": [{"uuid": "7c0279c7-7aa6-48a1-9799-71558e6e5979"}], "security_groups": [{"name": "default"}]}}'



Go to dashboard (login demo ):-




 
No problems with login via ssh

[root@ip-192-169-142-127 test(keystone_demo)]# nova list
    +--------------------------------------+--------------+--------+------------+-------------+-----------------------------------------+
    | ID                                   | Name         | Status | Task State | Power State | Networks                                |
    +--------------------------------------+--------------+--------+------------+-------------+-----------------------------------------+
    | d711efb5-5811-4587-966c-3459514a2175 | CirrOSDevs09 | ACTIVE | -          | Running     | demo_network=50.0.0.29, 192.169.142.186 |
    +--------------------------------------+--------------+--------+------------+-------------+-----------------------------------------+

[root@ip-192-169-142-127 test(keystone_demo)]# ssh cirros@192.169.142.186
    $ ifconfig
    eth0      Link encap:Ethernet  HWaddr FA:16:3E:53:3B:D6 
              inet addr:50.0.0.29  Bcast:50.0.0.255  Mask:255.255.255.0
              inet6 addr: fe80::f816:3eff:fe53:3bd6/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1400  Metric:1
              RX packets:392 errors:0 dropped:0 overruns:0 frame:0
              TX packets:393 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:149587 (146.0 KiB)  TX bytes:147711 (144.2 KiB)
   
    lo        Link encap:Local Loopback 
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

If you need password protection rerun ssh-keygen

Wednesday, April 20, 2016

Creating Servers via REST API on RDO Mitaka && Chrome Advanced REST Client

In posting bellow we are going to demonstrate Chrome Advanced REST Client
successfully issuing REST API POST requests for creating RDO Mitaka Servers (VMs) as well as getting information about servers via GET requests.
All required HTTP Headers are configured in GUI environment as well as
body request field for servers creation.

Version of keystone API installed v2.0
Per http://docs.openstack.org/releasenotes/keystone/mitaka.html
Deprecation Notes
However, the authentication APIs and EC2 APIs are indefinitely deprecated and will not be removed in the ‘Q’ release.

Following [ 1 ] to authenticate access to OpenStack Services, you are supposed first of all to issue an authentication request to get authentication token. If the request succeeds, the server returns an authentication token.

Source keystonerc_demo on Controller or on Compute node. It doesn't
matter. Then run this cURL command to request a token:

 curl -s -X POST http://192.169.142.54:5000/v2.0/tokens \
  -H "Content-Type: application/json" \
  -d '{"auth": {"tenantName": "'"$OS_TENANT_NAME"'", "passwordCredentials": {"username": "'"$OS_USERNAME"'", "password": "'"$OS_PASSWORD"'"}}}' \
  | python -m json.tool

to get authentication token and scroll down to the bottom :-

        "token": {
            "audit_ids": [
                "ce1JojlRSiO6TmMTDW3QNQ"
            ],
            "expires": "2016-04-21T18:26:28Z",
            "id": "0cfb3ec7a10c4f549a3dc138cf8a270a", <== X-Auth-Token
            "issued_at": "2016-04-21T17:26:28.246724Z",
            "tenant": {
                "description": "default tenant",
                "enabled": true,
                "id": "1578b57cfd8d43278098c5266f64e49f", <=== Demo tenant's id
                "name": "demo"
            }
        },
        "user": {
            "id": "8e1e992eee474c3ab7a08ffde678e35b",
            "name": "demo",
            "roles": [
                {
                    "name": "heat_stack_owner"
                },
                {
                    "name": "_member_"
                }
            ],
            "roles_links": [],
            "username": "demo"
        }
    }
}
*********************************************************************************************
Original request to obtain token might be issued via Chrome Advanced REST Client as well
*********************************************************************************************

  Scrolling down shows up token been returned and demo's tenant id
 

   

Required output

{
"access": 
{
"token": 
{
"issued_at": "2016-04-21T21:56:52.668252Z"
"expires": "2016-04-21T22:56:52Z"
"id": "dd119ea14e97416b834ca72aab7f8b5a"
"tenant": 
{
"description": "default tenant"
"enabled": true
"id": "1578b57cfd8d43278098c5266f64e49f"
"name": "demo"
}

*****************************************************************************
Next create ssh-keypair via CLI or dashboard for particular tenant :-
*****************************************************************************
nova keypair-add oskeymitaka0417 > oskeymitaka0417.pem
chmod 600 *.pem

******************************************************************************************
Following bellow is a couple of samples REST API POST requests starting servers as they are usually described and issued ( [ 2 ] ).
******************************************************************************************

curl -g -i -X POST http://192.169.142.54:8774/v2/1578b57cfd8d43278098c5266f64e49f/servers -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 0cfb3ec7a10c4f549a3dc138cf8a270a" -d '{"server": {"name": "CirrOSDevs03", "key_name" : "oskeymitaka0417", "imageRef": "2e148cd0-7dac-49a7-8a79-2efddbd83852", "flavorRef": "1", "max_count": 1, "min_count": 1, "networks": [{"uuid": "e7c90970-c304-4f51-9d65-4be42318487c"}], "security_groups": [{"name": "default"}]}}'

curl -g -i -X POST http://192.169.142. 54:8774/v2/1578b57cfd8d43278098c5266f64e49f/servers -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 0cfb3ec7a10c4f549a3dc138cf8a270a" -d '{"server": {"name": "VF23Devs03", "key_name" : "oskeymitaka0417", "imageRef": "5b00b1a8-30d1-4e9d-bf7d-5f1abed5173b", "flavorRef": "2", "max_count": 1, "min_count": 1, "networks": [{"uuid": "e7c90970-c304-4f51-9d65-4be42318487c"}], "security_groups": [{"name": "default"}]}}'


**********************************************************************************
We are going to initiate REST API POST requests creating servers been
issued  via Chrome Advanced REST Client
**********************************************************************************

[root@ip-192-169-142-54 ~(keystone_demo)]# glance image-list
+--------------------------------------+-----------------------+
| ID                                   | Name                  |
+--------------------------------------+-----------------------+
| 28b590fa-05c8-4706-893a-54efc4ca8cd6 | cirros                |
| 9c78c3da-b25b-4b26-9d24-514185e99c00 | Ubuntu1510Cloud-image |
| a050a122-a1dc-40d0-883f-25617e452d90 | VF23Cloud-image       |
+--------------------------------------+-----------------------+

[root@ip-192-169-142-54 ~(keystone_demo)]# neutron net-list
+--------------------------------------+--------------+----------------------------------------+
| id                                   | name         | subnets                                |
+--------------------------------------+--------------+----------------------------------------+
| 43daa7c3-4e04-4661-8e78-6634b06d63f3 | public       | 71e0197b-fe9a-4643-b25f-65424d169492   |
|                                      |              | 192.169.142.0/24                       |
| 292a2f21-70af-48ef-b100-c0639a8ffb22 | demo_network | d7aa6f0f-33ba-430d-a409-bd673bed7060   |
|                                      |              | 50.0.0.0/24                            |
+--------------------------------------+--------------+----------------------------------------+

First required Headers were created in corresponding fields and
following fragment was placed in Raw Payload area of Chrome Client

{"server":
 {"name": "VF23Devs03",
  "key_name" : "oskeymitaka0420",
  "imageRef" : "a050a122-a1dc-40d0-883f-25617e452d90",
  "flavorRef": "2",
  "max_count": 1,
  "min_count": 1,
  "networks": [{"uuid": "292a2f21-70af-48ef-b100-c0639a8ffb22"}],
  "security_groups": [{"name": "default"}]
  }
}

Launching Fedora 23 Server :-


Next Ubuntu 15.10 Server (VM) will be created via changing  image-id in  Advanced RESTful Client GUI environment


***************************************************************************************
Re-launch Chrome REST Client again for servers verification via GET request
***************************************************************************************

 
 
*********************************************************************************** 
Testing on Two Node RDO Mitaka Cluster ML2&OVS&VXLAN
***********************************************************************************
Controller/Network - 192.169.142.127
Compute -  192.169.142.137


  
 
   
Cut from Chrome REST Client :-

{
"server": 
{
"security_groups": 
[
1]
0:  
{
"name": "default"
}
-
-
"OS-DCF:diskConfig": "MANUAL"
"id": "cb7ea1f5-b97f-4439-b708-832d084a9726"
"adminPass": "W8FQjvjcRxKg"
}
-

}

[root@ip-192-169-142-127 ~(keystone_demo)]# nova list
+--------------------------------------+------------------+--------+------------+-------------+-----------------------------------------+
| ID                                   | Name             | Status | Task State | Power State | Networks                                |
+--------------------------------------+------------------+--------+------------+-------------+-----------------------------------------+
| ec92774e-7957-4af5-87f0-1931f4bf4002 | CirrOSDevs03     | ACTIVE | -          | Running     | demo_network=50.0.0.12, 192.169.142.154 |
| cb7ea1f5-b97f-4439-b708-832d084a9726 | Ubuntu1610Devs01 | ACTIVE | -          | Running     | demo_network=50.0.0.13, 192.169.142.155 |
| b0fd077a-d0fa-4c91-b0db-dfb5ee2e5e55 | VF23Devs01       | ACTIVE | -          | Running     | demo_network=50.0.0.14, 192.169.142.156 |
+--------------------------------------+------------------+--------+------------+-------------+-----------------------------------------+
 
 
   Assigning floating IP to existing Server
    ID 749ff338-ae6f-4327-98a4-0509dd697f32
   from pool already allocated for tenant
  
   Sample of request body
   {
           "addFloatingIp" : {
                 "address" : "192.169.142.153"
           }
    }
 

   

 

Tuesday, April 19, 2016

REST API samples on RDO Mitaka

Actually , down here I have followed
http://developer.openstack.org/api-guide/quick-start/api-quick-start.html
to get samples working I was forced update URI from document above.
Any URI update highlighted "green" samples provided by official Howto
failed.

File kestonerc_admin was sourced before issue REST API request,
it may be done on Controller or Compute result will be the same

[root@ip-192-169-142-127 ~(keystone_admin)]# cat  keystonerc_admin
unset OS_SERVICE_TOKEN
export OS_USERNAME=admin
export OS_PASSWORD=7049f834927e4468
export OS_AUTH_URL=http://192.169.142.127:5000/v2.0
export PS1='[\u@\h \W(keystone_admin)]\$ '

export OS_TENANT_NAME=admin
export OS_REGION_NAME=RegionOne

**************************************************************************
First run REST API request   to get OS_TOKEN ( highlighted "Yellow")
**************************************************************************

[root@ip-192-169-142-127 ~(keystone_admin)]# curl -s -X POST http://192.169.142.127:5000/v2.0/tokens \
>   -H "Content-Type: application/json" \
>   -d '{"auth": {"tenantName": "'"$OS_TENANT_NAME"'", "passwordCredentials": {"username": "'"$OS_USERNAME"'", "password": "'"$OS_PASSWORD"'"}}}' \
>   | python -m json.tool

{
    "access": {
        "metadata": {
            "is_admin": 0,
            "roles": [
                "1cdf9d47d7104b6f986ca765f1bd645f"
            ]
        },
        "serviceCatalog": [
            {
                "endpoints": [
                    {
                        "adminURL": "http://192.169.142.127:8774/v2/b47473d8953d49b29910fc681a2ff773",
                        "id": "97b30266582041e493b97c1c4c4607e0",
                        "internalURL": "http://192.169.142.127:8774/v2/b47473d8953d49b29910fc681a2ff773",
                        "publicURL": "http://192.169.142.127:8774/v2/b47473d8953d49b29910fc681a2ff773",
                        "region": "RegionOne"
                    }
                ],
                "endpoints_links": [],
                "name": "nova",
                "type": "compute"
            },
            {
                "endpoints": [
                    {
                        "adminURL": "http://192.169.142.127:9696",
                        "id": "0c317d48b6f04842affe435b836c753e",
                        "internalURL": "http://192.169.142.127:9696",
                        "publicURL": "http://192.169.142.127:9696",
                        "region": "RegionOne"
                    }
                ],
                "endpoints_links": [],
                "name": "neutron",
                "type": "network"
            },
            {
                "endpoints": [
                    {
                        "adminURL": "http://192.169.142.127:8776/v2/b47473d8953d49b29910fc681a2ff773",
                        "id": "0c1fecafd84743cebe7840dc70ab4988",
                        "internalURL": "http://192.169.142.127:8776/v2/b47473d8953d49b29910fc681a2ff773",
                        "publicURL": "http://192.169.142.127:8776/v2/b47473d8953d49b29910fc681a2ff773",
                        "region": "RegionOne"
                    }
                ],
                "endpoints_links": [],
                "name": "cinderv2",
                "type": "volumev2"
            },
            {
                "endpoints": [
                    {
                        "adminURL": "http://192.169.142.127:8774/v3",
                        "id": "02aa574672bc438aaeca1b62404f4725",
                        "internalURL": "http://192.169.142.127:8774/v3",
                        "publicURL": "http://192.169.142.127:8774/v3",
                        "region": "RegionOne"
                    }
                ],
                "endpoints_links": [],
                "name": "novav3",
                "type": "computev3"
            },
            {
                "endpoints": [
                    {
                        "adminURL": "http://192.169.142.127:8042",
                        "id": "070aa616f054492997a5b40678dfc988",
                        "internalURL": "http://192.169.142.127:8042",
                        "publicURL": "http://192.169.142.127:8042",
                        "region": "RegionOne"
                    }
                ],
                "endpoints_links": [],
                "name": "aodh",
                "type": "alarming"
            },
            {
                "endpoints": [
                    {
                        "adminURL": "http://192.169.142.127:9292",
                        "id": "32b93805cacf41e68e5ce96f783c485d",
                        "internalURL": "http://192.169.142.127:9292",
                        "publicURL": "http://192.169.142.127:9292",
                        "region": "RegionOne"
                    }
                ],
                "endpoints_links": [],
                "name": "Image Service",
                "type": "image"
            },
            {
                "endpoints": [
                    {
                        "adminURL": "http://127.0.0.1:8776/v3/b47473d8953d49b29910fc681a2ff773",
                        "id": "1f0bb25d054c463e842a2b236c56b3fe",
                        "internalURL": "http://127.0.0.1:8776/v3/b47473d8953d49b29910fc681a2ff773",
                        "publicURL": "http://127.0.0.1:8776/v3/b47473d8953d49b29910fc681a2ff773",
                        "region": "RegionOne"
                    }
                ],
                "endpoints_links": [],
                "name": "cinderv3",
                "type": "volumev3"
            },
            {
                "endpoints": [
                    {
                        "adminURL": "http://192.169.142.127:8777",
                        "id": "2ba4ceef2f6b42c5bf601cc7a2a92674",
                        "internalURL": "http://192.169.142.127:8777",
                        "publicURL": "http://192.169.142.127:8777",
                        "region": "RegionOne"
                    }
                ],
                "endpoints_links": [],
                "name": "ceilometer",
                "type": "metering"
            },
            {
                "endpoints": [
                    {
                        "adminURL": "http://192.169.142.127:8776/v1/b47473d8953d49b29910fc681a2ff773",
                        "id": "1c2192149d0e414ab6b0a41d0469d2e4",
                        "internalURL": "http://192.169.142.127:8776/v1/b47473d8953d49b29910fc681a2ff773",
                        "publicURL": "http://192.169.142.127:8776/v1/b47473d8953d49b29910fc681a2ff773",
                        "region": "RegionOne"
                    }
                ],
                "endpoints_links": [],
                "name": "cinder",
                "type": "volume"
            },
            {
                "endpoints": [
                    {
                        "adminURL": "http://192.169.142.127:8080/v1/AUTH_b47473d8953d49b29910fc681a2ff773",
                        "id": "5d548d206adb429c87245b502884a68b",
                        "internalURL": "http://192.169.142.127:8080/v1/AUTH_b47473d8953d49b29910fc681a2ff773",
                        "publicURL": "http://192.169.142.127:8080/v1/AUTH_b47473d8953d49b29910fc681a2ff773",
                        "region": "RegionOne"
                    }
                ],
                "endpoints_links": [],
                "name": "swift",
                "type": "object-store"
            },
            {
                "endpoints": [
                    {
                        "adminURL": "http://192.169.142.127:8041",
                        "id": "4707fa88cc86495798770713d74b9bd5",
                        "internalURL": "http://192.169.142.127:8041",
                        "publicURL": "http://192.169.142.127:8041",
                        "region": "RegionOne"
                    }
                ],
                "endpoints_links": [],
                "name": "gnocchi",
                "type": "metric"
            },
            {
                "endpoints": [
                    {
                        "adminURL": "http://192.169.142.127:35357/v2.0",
                        "id": "13544e1b0fcd4631aab057694f9b18bf",
                        "internalURL": "http://192.169.142.127:5000/v2.0",
                        "publicURL": "http://192.169.142.127:5000/v2.0",
                        "region": "RegionOne"
                    }
                ],
                "endpoints_links": [],
                "name": "keystone",
                "type": "identity"
            }
        ],
        "token": {
            "audit_ids": [
                "sTEp_tC3SRafHXV_SDqW5A"
            ],
            "expires": "2016-04-19T18:59:44Z",
            "id": "27c680cc964b4585bd335ea8a856ba64",   <== OS_TOKEN
            "issued_at": "2016-04-19T17:59:44.831957Z",
            "tenant": {
                "description": "admin tenant",
                "enabled": true,
                "id": "b47473d8953d49b29910fc681a2ff773", <== admin's tenant-id
                "name": "admin"
            }
        },
        "user": {
            "id": "13f372cb2598427d894c48b07b1934a6",
            "name": "admin",
            "roles": [
                {
                    "name": "admin"
                }
            ],
            "roles_links": [],
            "username": "admin"
        }
    }
}
*********************************
Now export OS_TOKEN
********************************
[root@ip-192-169-142-127 ~(keystone_admin)]# export OS_TOKEN=27c680cc964b4585bd335ea8a856ba64


**************************************************************************
Here we issue REST API request for all images uploaded to glance
**************************************************************************

[root@ip-192-169-142-127 ~(keystone_admin)]# curl -s -H "X-Auth-Token: $OS_TOKEN"   http://192.169.142.127:8774/v2/b47473d8953d49b29910fc681a2ff773/images | python -m json.tool{
    "images": [
        {
            "id": "50ada525-e618-4ee4-9268-4bfbd8396b70",
            "links": [
                {
                    "href": "http://192.169.142.127:8774/v2/b47473d8953d49b29910fc681a2ff773/images/50ada525-e618-4ee4-9268-4bfbd8396b70",
                    "rel": "self"
                },
                {
                    "href": "http://192.169.142.127:8774/b47473d8953d49b29910fc681a2ff773/images/50ada525-e618-4ee4-9268-4bfbd8396b70",
                    "rel": "bookmark"
                },
                {
                    "href": "http://192.169.142.127:9292/images/50ada525-e618-4ee4-9268-4bfbd8396b70",
                    "rel": "alternate",
                    "type": "application/vnd.openstack.image"
                }
            ],
            "name": "CentOS72Cloud-image"
        },
        {
            "id": "5b00b1a8-30d1-4e9d-bf7d-5f1abed5173b",
            "links": [
                {
                    "href": "http://192.169.142.127:8774/v2/b47473d8953d49b29910fc681a2ff773/images/5b00b1a8-30d1-4e9d-bf7d-5f1abed5173b",
                    "rel": "self"
                },
                {
                    "href": "http://192.169.142.127:8774/b47473d8953d49b29910fc681a2ff773/images/5b00b1a8-30d1-4e9d-bf7d-5f1abed5173b",
                    "rel": "bookmark"
                },
                {
                    "href": "http://192.169.142.127:9292/images/5b00b1a8-30d1-4e9d-bf7d-5f1abed5173b",
                    "rel": "alternate",
                    "type": "application/vnd.openstack.image"
                }
            ],
            "name": "VF23Cloud-image"
        },
        {
            "id": "9eafeb20-526b-43d3-af18-a20bd5bd8815",
            "links": [
                {
                    "href": "http://192.169.142.127:8774/v2/b47473d8953d49b29910fc681a2ff773/images/9eafeb20-526b-43d3-af18-a20bd5bd8815",
                    "rel": "self"
                },
                {
                    "href": "http://192.169.142.127:8774/b47473d8953d49b29910fc681a2ff773/images/9eafeb20-526b-43d3-af18-a20bd5bd8815",
                    "rel": "bookmark"
                },
                {
                    "href": "http://192.169.142.127:9292/images/9eafeb20-526b-43d3-af18-a20bd5bd8815",
                    "rel": "alternate",
                    "type": "application/vnd.openstack.image"
                }
            ],
            "name": "Ubuntu1510-image"
        },
        {
            "id": "edd00da8-4713-4b3a-83f2-40a53d930e5a",
            "links": [
                {
                    "href": "http://192.169.142.127:8774/v2/b47473d8953d49b29910fc681a2ff773/images/edd00da8-4713-4b3a-83f2-40a53d930e5a",
                    "rel": "self"
                },
                {
                    "href": "http://192.169.142.127:8774/b47473d8953d49b29910fc681a2ff773/images/edd00da8-4713-4b3a-83f2-40a53d930e5a",
                    "rel": "bookmark"
                },
                {
                    "href": "http://192.169.142.127:9292/images/edd00da8-4713-4b3a-83f2-40a53d930e5a",
                    "rel": "alternate",
                    "type": "application/vnd.openstack.image"
                }
            ],
            "name": "cirros"
        }
    ]
}

**************************************************************************
Here we issue REST API request for all  flavors in system
**************************************************************************

[root@ip-192-169-142-127 ~(keystone_admin)]# curl -s -H "X-Auth-Token: $OS_TOKEN"   http://192.169.142.127:8774/v2/b47473d8953d49b29910fc681a2ff773/flavors  | python -m json.tool
{
    "flavors": [
        {
            "id": "1",
            "links": [
                {
                    "href": "http://192.169.142.127:8774/v2/b47473d8953d49b29910fc681a2ff773/flavors/1",
                    "rel": "self"
                },
                {
                    "href": "http://192.169.142.127:8774/b47473d8953d49b29910fc681a2ff773/flavors/1",
                    "rel": "bookmark"
                }
            ],
            "name": "m1.tiny"
        },
        {
            "id": "2",
            "links": [
                {
                    "href": "http://192.169.142.127:8774/v2/b47473d8953d49b29910fc681a2ff773/flavors/2",
                    "rel": "self"
                },
                {
                    "href": "http://192.169.142.127:8774/b47473d8953d49b29910fc681a2ff773/flavors/2",
                    "rel": "bookmark"
                }
            ],
            "name": "m1.small"
        },
        {
            "id": "3",
            "links": [
                {
                    "href": "http://192.169.142.127:8774/v2/b47473d8953d49b29910fc681a2ff773/flavors/3",
                    "rel": "self"
                },
                {
                    "href": "http://192.169.142.127:8774/b47473d8953d49b29910fc681a2ff773/flavors/3",
                    "rel": "bookmark"
                }
            ],
            "name": "m1.medium"
        },
        {
            "id": "4",
            "links": [
                {
                    "href": "http://192.169.142.127:8774/v2/b47473d8953d49b29910fc681a2ff773/flavors/4",
                    "rel": "self"
                },
                {
                    "href": "http://192.169.142.127:8774/b47473d8953d49b29910fc681a2ff773/flavors/4",
                    "rel": "bookmark"
                }
            ],
            "name": "m1.large"
        },
        {
            "id": "5",
            "links": [
                {
                    "href": "http://192.169.142.127:8774/v2/b47473d8953d49b29910fc681a2ff773/flavors/5",
                    "rel": "self"
                },
                {
                    "href": "http://192.169.142.127:8774/b47473d8953d49b29910fc681a2ff773/flavors/5",
                    "rel": "bookmark"
                }
            ],
            "name": "m1.xlarge"
        }
    ]
}

*************************************************
Now ssh to Compute 192.169.142.137
**************************************************

  
  


   Same via Chrome RESTful Client