Merge "Add v3 api samples for availability_zone"

This commit is contained in:
Jenkins
2013-11-22 10:51:30 +00:00
committed by Gerrit Code Review
8 changed files with 209 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
{
"availability_zone_info": [
{
"hosts": {
"cells": {
"nova-cells": {
"active": true,
"available": true,
"updated_at": null
}
},
"cert": {
"nova-cert": {
"active": true,
"available": true,
"updated_at": null
}
},
"conductor": {
"nova-conductor": {
"active": true,
"available": true,
"updated_at": null
}
},
"consoleauth": {
"nova-consoleauth": {
"active": true,
"available": true,
"updated_at": null
}
},
"network": {
"nova-network": {
"active": true,
"available": true,
"updated_at": null
}
},
"scheduler": {
"nova-scheduler": {
"active": true,
"available": true,
"updated_at": null
}
}
},
"zone_name": "internal",
"zone_state": {
"available": true
}
},
{
"hosts": {
"compute": {
"nova-compute": {
"active": true,
"available": true,
"updated_at": null
}
}
},
"zone_name": "nova",
"zone_state": {
"available": true
}
}
]
}

View File

@@ -0,0 +1,64 @@
<?xml version='1.0' encoding='UTF-8'?>
<availability_zones xmlns:os-availability-zone="http://docs.openstack.org/compute/ext/availabilityzone/api/v3">
<availability_zone name="internal">
<zone_state available="True"/>
<hosts>
<host name="network">
<services>
<service name="nova-network">
<service_state available="True" active="True" updated_at="None"/>
</service>
</services>
</host>
<host name="conductor">
<services>
<service name="nova-conductor">
<service_state available="True" active="True" updated_at="None"/>
</service>
</services>
</host>
<host name="cells">
<services>
<service name="nova-cells">
<service_state available="True" active="True" updated_at="None"/>
</service>
</services>
</host>
<host name="cert">
<services>
<service name="nova-cert">
<service_state available="True" active="True" updated_at="None"/>
</service>
</services>
</host>
<host name="scheduler">
<services>
<service name="nova-scheduler">
<service_state available="True" active="True" updated_at="None"/>
</service>
</services>
</host>
<host name="consoleauth">
<services>
<service name="nova-consoleauth">
<service_state available="True" active="True" updated_at="None"/>
</service>
</services>
</host>
</hosts>
<metadata/>
</availability_zone>
<availability_zone name="nova">
<zone_state available="True"/>
<hosts>
<host name="compute">
<services>
<service name="nova-compute">
<service_state available="True" active="True" updated_at="None"/>
</service>
</services>
</host>
</hosts>
<metadata/>
</availability_zone>
</availability_zones>

View File

@@ -0,0 +1,11 @@
{
"availability_zone_info": [
{
"hosts": null,
"zone_name": "nova",
"zone_state": {
"available": true
}
}
]
}

View File

@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<availability_zones xmlns:os-availability-zone="http://docs.openstack.org/compute/ext/availabilityzone/api/v3">
<availability_zone name="nova">
<zone_state available="True"/>
<metadata/>
</availability_zone>
</availability_zones>

View File

@@ -0,0 +1,17 @@
{
"server" : {
"name" : "new-server-test",
"image_ref" : "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
"flavor_ref" : "http://openstack.example.com/openstack/flavors/1",
"os-availability-zone:availability_zone" : "test"
"metadata" : {
"My Server Name" : "Apache1"
},
"personality" : [
{
"path" : "/etc/banner.txt",
"contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVsc2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4gQnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRoZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlvdSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vyc2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
}
]
}
}

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1" xmlns:os-availability-zone="http://docs.openstack.org/compute/ext/availabilityzone/api/v3" image_ref="http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b" flavor_ref="http://openstack.example.com/openstack/flavors/1" name="new-server-test" os-availability-zone:availability_zone="test">
<metadata>
<meta key="My Server Name">Apache1</meta>
</metadata>
<personality>
<file path="/etc/banner.txt">
ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k
IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g
QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv
dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6
b25zLiINCg0KLVJpY2hhcmQgQmFjaA==
</file>
</personality>
</server>

View File

@@ -0,0 +1,16 @@
{
"server": {
"admin_password": "a2apKsfp7Rom",
"id": "e88c3898-e971-42e5-8325-b7ff921efb15",
"links": [
{
"href": "http://openstack.example.com/v3/servers/e88c3898-e971-42e5-8325-b7ff921efb15",
"rel": "self"
},
{
"href": "http://openstack.example.com/servers/e88c3898-e971-42e5-8325-b7ff921efb15",
"rel": "bookmark"
}
]
}
}

View File

@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="eb1657bd-f530-4077-b885-c54701898cc9" admin_password="sxQ5ZbjnTjzg">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/eb1657bd-f530-4077-b885-c54701898cc9" rel="self"/>
<atom:link href="http://openstack.example.com/servers/eb1657bd-f530-4077-b885-c54701898cc9" rel="bookmark"/>
</server>