Create a route for listing availability zones

Registered by Dan Nguyen on 2013-10-16

Description
----------------
Nova and Trove have the ability to pass an optional argument to specify the availability zone for instance creation. At the moment the Trove API doesn't have a way to list the availability zones.

Note: we will probably want to add this to the python-troveclient too

Nova Request
--------------------
curl -i

http://192.168.85.193:8774/v2/0d43b1d40c4d4c9d85eba3f60a2b13d6/os-availability-zone/detail

-X GET

-H "X-Auth-Project-Id: trove"
-H "User-Agent: python-novaclient"
-H "Accept: application/json"
-H "X-Auth-Token: <blah>"

Nova Response
-----------------------

RESP: [200]
CaseInsensitiveDict
({
'date': 'Wed, 16 Oct 2013 20:56:29 GMT',
'content-length': '777',
'content-type': 'application/json',
'x-compute-request-id': 'req-493e6b35-1cbf-4a0f-929c-124d6c2c355a'
})

RESP BODY:

{
    "availabilityZoneInfo": [
        {
            "zoneState": {
                "available": true
            },
            "hosts": {
                "ubuntu.": {
                    "nova-conductor": {
                        "available": true,
                        "active": true,
                        "updated_at": "2013-10-16T20:56:23.000000"
                    },
                    "nova-scheduler": {
                        "available": true,
                        "active": true,
                        "updated_at": "2013-10-16T20:56:20.000000"
                    },
                    "nova-consoleauth": {
                        "available": true,
                        "active": true,
                        "updated_at": "2013-10-16T20:56:24.000000"
                    },
                    "nova-cert": {
                        "available": true,
                        "active": true,
                        "updated_at": "2013-10-16T20:56:27.000000"
                    },
                    "nova-network": {
                        "available": true,
                        "active": true,
                        "updated_at": "2013-10-16T20:56:28.000000"
                    }
                }
            },
            "zoneName": "internal" # we could skip all of this
        },
        {
            "zoneState": {
                "available": true
            },
            "hosts": {
                "ubuntu.": {
                    "nova-compute": {
                        "available": true,
                        "active": true,
                        "updated_at": "2013-10-16T20:56:23.000000"
                    }
                }
            },
            "zoneName": "nova" # We are probably only interested in zoneName for trove
        }
    ]
}

Proposed Trove API call
---------------------------------
Basically ignore internal I think...

Trove Request
-----------------------
curl -i

http://192.168.85.193:8779/v1.0/0d43b1d40c4d4c9d85eba3f60a2b13d6/os-availability-zone/detail

-X GET

-H "X-Auth-Project-Id: trove"
-H "User-Agent: python-troveclient"
-H "Accept: application/json"
-H "X-Auth-Token: <blah>"

Trove Response
-----------------------

RESP: [200]
CaseInsensitiveDict
({
'date': 'Wed, 16 Oct 2013 20:56:29 GMT',
'content-length': '777',
'content-type': 'application/json',
'x-compute-request-id': 'req-493e6b35-1cbf-4a0f-929c-124d6c2c355a'
})

RESP BODY:

{
    "availabilityZoneInfo": [
        {
            "zoneState": {
                "available": true
            },
            "hosts": {
                "ubuntu.": {
                    "nova-compute": {
                        "available": true,
                        "active": true,
                        "updated_at": "2013-10-16T20:56:23.000000"
                    }
                }
            },
            "zoneName": "nova" # We are probably only interested in zoneName for trove
        }
    ]
}

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Dan Nguyen
Direction:
Needs approval
Assignee:
Dan Nguyen
Definition:
Drafting
Series goal:
None
Implementation:
Not started
Milestone target:
milestone icon next

Related branches

Sprints

Whiteboard

Why do we need to implement new routs for listing AZ's ? Nova does it. - denis_makogon

Our users don't have direct access to our private Nova, meaning they can't use nova client to list the available AZ's - esp

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.