Adds V3 API samples for evacuate,ext-az,ext-serv-attrs

Partially implements blueprint v3-api-unittests
Partially implements blueprint v3-api-specification

Change-Id: I340456ba688bad4a42d66247899ee9f494fb429c
This commit is contained in:
He Jie Xu 2013-08-28 14:51:29 +08:00
parent 6a027703b9
commit d413c236ed
53 changed files with 1160 additions and 2 deletions

@ -0,0 +1,7 @@
{
"evacuate": {
"host": "b419863b7d814906a68fb31703c0dbd6",
"admin_password": "MySecretPass",
"on_shared_storage": "False"
}
}

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<evacuate xmlns="http://docs.openstack.org/compute/api/v2"
host="c8b85acac4394623a8bd99f66e6a623d"
admin_password="MySecretPass"
on_shared_storage="False"/>

@ -0,0 +1,3 @@
{
"admin_password": "MySecretPass"
}

@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<admin_password>MySecretPass</admin_password>

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

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1" image_ref="http://openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b" flavor_ref="http://openstack.example.com/flavors/1" name="new-server-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>

@ -0,0 +1,16 @@
{
"server": {
"admin_pass": "xCQm2Cs2vSFx",
"id": "5f1fbc62-29ed-4e4a-9f15-8affc5e0a796",
"links": [
{
"href": "http://openstack.example.com/v3/servers/5f1fbc62-29ed-4e4a-9f15-8affc5e0a796",
"rel": "self"
},
{
"href": "http://openstack.example.com/servers/5f1fbc62-29ed-4e4a-9f15-8affc5e0a796",
"rel": "bookmark"
}
]
}
}

@ -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="3a562c8b-23d4-4e66-81d5-db0892a86f87" admin_pass="N6HYdUMchD3L">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/3a562c8b-23d4-4e66-81d5-db0892a86f87" rel="self"/>
<atom:link href="http://openstack.example.com/servers/3a562c8b-23d4-4e66-81d5-db0892a86f87" rel="bookmark"/>
</server>

@ -0,0 +1,58 @@
{
"server": {
"access_ip_v4": "",
"access_ip_v6": "",
"addresses": {
"private": [
{
"addr": "192.168.0.3",
"mac_addr": "aa:bb:cc:dd:ee:ff",
"type": "fixed",
"version": 4
}
]
},
"created": "2013-09-16T02:54:56Z",
"flavor": {
"id": "1",
"links": [
{
"href": "http://openstack.example.com/flavors/1",
"rel": "bookmark"
}
]
},
"host_id": "b75d6736650f9b272223ceb48f4cde001de1856e381613a922117ab7",
"id": "f22e4521-d03a-4e9f-9fd3-016b9e227219",
"image": {
"id": "70a599e0-31e7-49b7-b260-868f441e862b",
"links": [
{
"href": "http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b",
"rel": "bookmark"
}
]
},
"key_name": null,
"links": [
{
"href": "http://openstack.example.com/v3/servers/f22e4521-d03a-4e9f-9fd3-016b9e227219",
"rel": "self"
},
{
"href": "http://openstack.example.com/servers/f22e4521-d03a-4e9f-9fd3-016b9e227219",
"rel": "bookmark"
}
],
"metadata": {
"My Server Name": "Apache1"
},
"name": "new-server-test",
"os-extended-availability-zone:availability_zone": "nova",
"progress": 0,
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2013-09-16T02:54:57Z",
"user_id": "fake"
}
}

@ -0,0 +1,19 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:os-extended-availability-zone="http://docs.openstack.org/compute/ext/extended_availability_zone/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" status="ACTIVE" updated="2013-09-16T02:55:02Z" user_id="fake" name="new-server-test" created="2013-09-16T02:55:01Z" tenant_id="openstack" access_ip_v4="" progress="0" host_id="146f5f54649a2655d2daed87b2da7eec04777520ce4aaa0642845173" id="d693cfcb-b6b8-4d9c-acb9-4db3bd16593f" access_ip_v6="" os-extended-availability-zone:availability_zone="nova" key_name="None">
<image id="70a599e0-31e7-49b7-b260-868f441e862b">
<atom:link href="http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b" rel="bookmark"/>
</image>
<flavor id="1">
<atom:link href="http://openstack.example.com/flavors/1" rel="bookmark"/>
</flavor>
<metadata>
<meta key="My Server Name">Apache1</meta>
</metadata>
<addresses>
<network id="private">
<ip version="4" type="fixed" addr="192.168.0.3" mac_addr="aa:bb:cc:dd:ee:ff"/>
</network>
</addresses>
<atom:link href="http://openstack.example.com/v3/servers/d693cfcb-b6b8-4d9c-acb9-4db3bd16593f" rel="self"/>
<atom:link href="http://openstack.example.com/servers/d693cfcb-b6b8-4d9c-acb9-4db3bd16593f" rel="bookmark"/>
</server>

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

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1" image_ref="http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b" flavor_ref="http://openstack.example.com/flavors/1" name="new-server-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>

@ -0,0 +1,16 @@
{
"server": {
"admin_pass": "87taVVreqh6R",
"id": "f22e4521-d03a-4e9f-9fd3-016b9e227219",
"links": [
{
"href": "http://openstack.example.com/v3/servers/f22e4521-d03a-4e9f-9fd3-016b9e227219",
"rel": "self"
},
{
"href": "http://openstack.example.com/servers/f22e4521-d03a-4e9f-9fd3-016b9e227219",
"rel": "bookmark"
}
]
}
}

@ -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="81a6e93a-eeeb-4169-b562-bbe42bffea27" admin_pass="3XURfmU9HAE5">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/81a6e93a-eeeb-4169-b562-bbe42bffea27" rel="self"/>
<atom:link href="http://openstack.example.com/servers/81a6e93a-eeeb-4169-b562-bbe42bffea27" rel="bookmark"/>
</server>

@ -0,0 +1,60 @@
{
"servers": [
{
"access_ip_v4": "",
"access_ip_v6": "",
"addresses": {
"private": [
{
"addr": "192.168.0.3",
"mac_addr": "aa:bb:cc:dd:ee:ff",
"type": "fixed",
"version": 4
}
]
},
"created": "2013-09-16T02:54:56Z",
"flavor": {
"id": "1",
"links": [
{
"href": "http://openstack.example.com/flavors/1",
"rel": "bookmark"
}
]
},
"host_id": "cf5540800371e53064a60b36ff9d6d1d6a8719ffc870c63a270c6bee",
"id": "55f43fa2-dc7c-4c0b-b21a-76f9abe516f9",
"image": {
"id": "70a599e0-31e7-49b7-b260-868f441e862b",
"links": [
{
"href": "http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b",
"rel": "bookmark"
}
]
},
"key_name": null,
"links": [
{
"href": "http://openstack.example.com/v3/servers/55f43fa2-dc7c-4c0b-b21a-76f9abe516f9",
"rel": "self"
},
{
"href": "http://openstack.example.com/servers/55f43fa2-dc7c-4c0b-b21a-76f9abe516f9",
"rel": "bookmark"
}
],
"metadata": {
"My Server Name": "Apache1"
},
"name": "new-server-test",
"os-extended-availability-zone:availability_zone": "nova",
"progress": 0,
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2013-09-16T02:54:58Z",
"user_id": "fake"
}
]
}

@ -0,0 +1,21 @@
<?xml version='1.0' encoding='UTF-8'?>
<servers xmlns:os-extended-availability-zone="http://docs.openstack.org/compute/ext/extended_availability_zone/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
<server status="ACTIVE" updated="2013-09-16T02:55:00Z" user_id="fake" name="new-server-test" created="2013-09-16T02:54:59Z" tenant_id="openstack" access_ip_v4="" progress="0" host_id="1c938f2d8fe831c1a6f1e1c013ae40400218c92013d1452fe4a8ffc3" id="81a6e93a-eeeb-4169-b562-bbe42bffea27" access_ip_v6="" os-extended-availability-zone:availability_zone="nova" key_name="None">
<image id="70a599e0-31e7-49b7-b260-868f441e862b">
<atom:link href="http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b" rel="bookmark"/>
</image>
<flavor id="1">
<atom:link href="http://openstack.example.com/flavors/1" rel="bookmark"/>
</flavor>
<metadata>
<meta key="My Server Name">Apache1</meta>
</metadata>
<addresses>
<network id="private">
<ip version="4" type="fixed" addr="192.168.0.3" mac_addr="aa:bb:cc:dd:ee:ff"/>
</network>
</addresses>
<atom:link href="http://openstack.example.com/v3/servers/81a6e93a-eeeb-4169-b562-bbe42bffea27" rel="self"/>
<atom:link href="http://openstack.example.com/servers/81a6e93a-eeeb-4169-b562-bbe42bffea27" rel="bookmark"/>
</server>
</servers>

@ -0,0 +1,60 @@
{
"server": {
"access_ip_v4": "",
"access_ip_v6": "",
"addresses": {
"private": [
{
"addr": "192.168.0.3",
"mac_addr": "aa:bb:cc:dd:ee:ff",
"type": "fixed",
"version": 4
}
]
},
"created": "2013-09-16T02:55:07Z",
"flavor": {
"id": "1",
"links": [
{
"href": "http://openstack.example.com/flavors/1",
"rel": "bookmark"
}
]
},
"host_id": "3bf189131c61d0e71b0a8686a897a0f50d1693b48c47b721fe77155b",
"id": "c278163e-36f9-4cf2-b1ac-80db4c63f7a8",
"image": {
"id": "70a599e0-31e7-49b7-b260-868f441e862b",
"links": [
{
"href": "http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b",
"rel": "bookmark"
}
]
},
"key_name": null,
"links": [
{
"href": "http://openstack.example.com/v3/servers/c278163e-36f9-4cf2-b1ac-80db4c63f7a8",
"rel": "self"
},
{
"href": "http://openstack.example.com/servers/c278163e-36f9-4cf2-b1ac-80db4c63f7a8",
"rel": "bookmark"
}
],
"metadata": {
"My Server Name": "Apache1"
},
"name": "new-server-test",
"os-extended-server-attributes:host": "c5f474bf81474f9dbbc404d5b2e4e9b3",
"os-extended-server-attributes:hypervisor_hostname": "fake-mini",
"os-extended-server-attributes:instance_name": "instance-00000001",
"progress": 0,
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2013-09-16T02:55:08Z",
"user_id": "fake"
}
}

@ -0,0 +1,19 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:os-extended-server-attributes="http://docs.openstack.org/compute/ext/extended_server_attributes/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" status="ACTIVE" updated="2013-09-16T02:54:58Z" user_id="fake" name="new-server-test" created="2013-09-16T02:54:56Z" tenant_id="openstack" access_ip_v4="" progress="0" host_id="6a5d92e002c044ec7a57b04d7b564d6536d172601518d66559bfd736" id="17f2690d-2369-4b8a-9b28-66e503c079e9" access_ip_v6="" os-extended-server-attributes:hypervisor_hostname="fake-mini" os-extended-server-attributes:instance_name="instance-00000001" os-extended-server-attributes:host="45dc15db04d54001801b10996b49db9e" key_name="None">
<image id="70a599e0-31e7-49b7-b260-868f441e862b">
<atom:link href="http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b" rel="bookmark"/>
</image>
<flavor id="1">
<atom:link href="http://openstack.example.com/flavors/1" rel="bookmark"/>
</flavor>
<metadata>
<meta key="My Server Name">Apache1</meta>
</metadata>
<addresses>
<network id="private">
<ip version="4" type="fixed" addr="192.168.0.3" mac_addr="aa:bb:cc:dd:ee:ff"/>
</network>
</addresses>
<atom:link href="http://openstack.example.com/v3/servers/17f2690d-2369-4b8a-9b28-66e503c079e9" rel="self"/>
<atom:link href="http://openstack.example.com/servers/17f2690d-2369-4b8a-9b28-66e503c079e9" rel="bookmark"/>
</server>

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

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1" image_ref="http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b" flavor_ref="http://openstack.example.com/flavors/1" name="new-server-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>

@ -0,0 +1,16 @@
{
"server": {
"admin_pass": "UCvmH8nHXm66",
"id": "a8c1c13d-ec7e-47c7-b4ff-077f72c1ca46",
"links": [
{
"href": "http://openstack.example.com/v3/servers/a8c1c13d-ec7e-47c7-b4ff-077f72c1ca46",
"rel": "self"
},
{
"href": "http://openstack.example.com/servers/a8c1c13d-ec7e-47c7-b4ff-077f72c1ca46",
"rel": "bookmark"
}
]
}
}

@ -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="17f2690d-2369-4b8a-9b28-66e503c079e9" admin_pass="NnZmn7JoUMHd">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/17f2690d-2369-4b8a-9b28-66e503c079e9" rel="self"/>
<atom:link href="http://openstack.example.com/servers/17f2690d-2369-4b8a-9b28-66e503c079e9" rel="bookmark"/>
</server>

@ -0,0 +1,62 @@
{
"servers": [
{
"access_ip_v4": "",
"access_ip_v6": "",
"addresses": {
"private": [
{
"addr": "192.168.0.3",
"mac_addr": "aa:bb:cc:dd:ee:ff",
"type": "fixed",
"version": 4
}
]
},
"created": "2013-09-16T02:55:03Z",
"flavor": {
"id": "1",
"links": [
{
"href": "http://openstack.example.com/flavors/1",
"rel": "bookmark"
}
]
},
"host_id": "63cf07a9fd82e1d2294926ec5c0d2e1e0ca449224246df75e16f23dc",
"id": "a8c1c13d-ec7e-47c7-b4ff-077f72c1ca46",
"image": {
"id": "70a599e0-31e7-49b7-b260-868f441e862b",
"links": [
{
"href": "http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b",
"rel": "bookmark"
}
]
},
"key_name": null,
"links": [
{
"href": "http://openstack.example.com/v3/servers/a8c1c13d-ec7e-47c7-b4ff-077f72c1ca46",
"rel": "self"
},
{
"href": "http://openstack.example.com/servers/a8c1c13d-ec7e-47c7-b4ff-077f72c1ca46",
"rel": "bookmark"
}
],
"metadata": {
"My Server Name": "Apache1"
},
"name": "new-server-test",
"os-extended-server-attributes:host": "bc8efe4fdb7148a4bb921a2b03d17de6",
"os-extended-server-attributes:hypervisor_hostname": "fake-mini",
"os-extended-server-attributes:instance_name": "instance-00000001",
"progress": 0,
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2013-09-16T02:55:05Z",
"user_id": "fake"
}
]
}

@ -0,0 +1,21 @@
<?xml version='1.0' encoding='UTF-8'?>
<servers xmlns:os-extended-server-attributes="http://docs.openstack.org/compute/ext/extended_server_attributes/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
<server status="ACTIVE" updated="2013-09-16T02:55:11Z" user_id="fake" name="new-server-test" created="2013-09-16T02:55:10Z" tenant_id="openstack" access_ip_v4="" progress="0" host_id="b9389d025797d258fd68840325fd2905a5f004d01d0f3dea37691c27" id="cf2daa06-ae23-430c-9c6e-6ea303339bd8" access_ip_v6="" os-extended-server-attributes:hypervisor_hostname="fake-mini" os-extended-server-attributes:instance_name="instance-00000001" os-extended-server-attributes:host="d1ba3610704b49fcbf70477d4d5840cd" key_name="None">
<image id="70a599e0-31e7-49b7-b260-868f441e862b">
<atom:link href="http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b" rel="bookmark"/>
</image>
<flavor id="1">
<atom:link href="http://openstack.example.com/flavors/1" rel="bookmark"/>
</flavor>
<metadata>
<meta key="My Server Name">Apache1</meta>
</metadata>
<addresses>
<network id="private">
<ip version="4" type="fixed" addr="192.168.0.3" mac_addr="aa:bb:cc:dd:ee:ff"/>
</network>
</addresses>
<atom:link href="http://openstack.example.com/v3/servers/cf2daa06-ae23-430c-9c6e-6ea303339bd8" rel="self"/>
<atom:link href="http://openstack.example.com/servers/cf2daa06-ae23-430c-9c6e-6ea303339bd8" rel="bookmark"/>
</server>
</servers>

@ -0,0 +1,7 @@
{
"evacuate": {
"host": "%(host)s",
"admin_password": "%(adminPass)s",
"on_shared_storage": "%(onSharedStorage)s"
}
}

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<evacuate xmlns="http://docs.openstack.org/compute/api/v2"
host="%(host)s"
admin_password="%(adminPass)s"
on_shared_storage="%(onSharedStorage)s"/>

@ -0,0 +1,3 @@
{
"admin_password": "%(password)s"
}

@ -0,0 +1 @@
<admin_password>%(password)s</admin_password>

@ -0,0 +1,16 @@
{
"server" : {
"name" : "new-server-test",
"image_ref" : "%(host)s/images/%(image_id)s",
"flavor_ref" : "%(host)s/flavors/1",
"metadata" : {
"My Server Name" : "Apache1"
},
"personality" : [
{
"path" : "/etc/banner.txt",
"contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVsc2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4gQnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRoZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlvdSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vyc2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
}
]
}
}

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1" image_ref="%(host)s/images/%(image_id)s" flavor_ref="%(host)s/flavors/1" name="new-server-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>

@ -0,0 +1,16 @@
{
"server": {
"admin_pass": "%(password)s",
"id": "%(id)s",
"links": [
{
"href": "%(host)s/v3/servers/%(uuid)s",
"rel": "self"
},
{
"href": "%(host)s/servers/%(uuid)s",
"rel": "bookmark"
}
]
}
}

@ -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="%(id)s" admin_pass="%(password)s">
<metadata/>
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>
</server>

@ -0,0 +1,58 @@
{
"server": {
"updated": "%(timestamp)s",
"created": "%(timestamp)s",
"os-extended-availability-zone:availability_zone": "nova",
"access_ip_v4": "",
"access_ip_v6": "",
"addresses": {
"private": [
{
"addr": "%(ip)s",
"version": 4,
"mac_addr": "aa:bb:cc:dd:ee:ff",
"type": "fixed"
}
]
},
"flavor": {
"id": "1",
"links": [
{
"href": "%(host)s/flavors/1",
"rel": "bookmark"
}
]
},
"host_id": "%(hostid)s",
"id": "%(uuid)s",
"image": {
"id": "%(uuid)s",
"links": [
{
"href": "%(glance_host)s/images/%(uuid)s",
"rel": "bookmark"
}
]
},
"links": [
{
"href": "%(host)s/v3/servers/%(uuid)s",
"rel": "self"
},
{
"href": "%(host)s/servers/%(uuid)s",
"rel": "bookmark"
}
],
"metadata": {
"My Server Name": "Apache1"
},
"name": "new-server-test",
"progress": 0,
"status": "ACTIVE",
"tenant_id": "openstack",
"user_id": "fake",
"key_name": null
}
}

@ -0,0 +1,19 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:os-extended-availability-zone="http://docs.openstack.org/compute/ext/extended_availability_zone/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" status="ACTIVE" updated="%(timestamp)s" host_id="%(hostid)s" name="new-server-test" created="%(timestamp)s" user_id="fake" tenant_id="openstack" access_ip_v4="" access_ip_v6="" progress="0" id="%(uuid)s" os-extended-availability-zone:availability_zone="nova" key_name="None">
<image id="%(uuid)s">
<atom:link href="%(glance_host)s/images/%(uuid)s" rel="bookmark"/>
</image>
<flavor id="1">
<atom:link href="%(host)s/flavors/1" rel="bookmark"/>
</flavor>
<metadata>
<meta key="My Server Name">Apache1</meta>
</metadata>
<addresses>
<network id="private">
<ip version="4" addr="%(ip)s" type="fixed" mac_addr="aa:bb:cc:dd:ee:ff"/>
</network>
</addresses>
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>
</server>

@ -0,0 +1,16 @@
{
"server" : {
"name" : "new-server-test",
"image_ref" : "%(glance_host)s/images/%(image_id)s",
"flavor_ref" : "%(host)s/flavors/1",
"metadata" : {
"My Server Name" : "Apache1"
},
"personality" : [
{
"path" : "/etc/banner.txt",
"contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVsc2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4gQnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRoZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlvdSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vyc2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
}
]
}
}

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1" image_ref="%(glance_host)s/images/%(image_id)s" flavor_ref="%(host)s/flavors/1" name="new-server-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>

@ -0,0 +1,16 @@
{
"server": {
"admin_pass": "%(password)s",
"id": "%(id)s",
"links": [
{
"href": "%(host)s/v3/servers/%(uuid)s",
"rel": "self"
},
{
"href": "%(host)s/servers/%(uuid)s",
"rel": "bookmark"
}
]
}
}

@ -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="%(id)s" admin_pass="%(password)s">
<metadata/>
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>
</server>

@ -0,0 +1,60 @@
{
"servers": [
{
"updated": "%(timestamp)s",
"created": "%(timestamp)s",
"os-extended-availability-zone:availability_zone": "nova",
"access_ip_v4": "",
"access_ip_v6": "",
"addresses": {
"private": [
{
"addr": "%(ip)s",
"version": 4,
"mac_addr": "aa:bb:cc:dd:ee:ff",
"type": "fixed"
}
]
},
"flavor": {
"id": "1",
"links": [
{
"href": "%(host)s/flavors/1",
"rel": "bookmark"
}
]
},
"host_id": "%(hostid)s",
"id": "%(uuid)s",
"image": {
"id": "%(uuid)s",
"links": [
{
"href": "%(glance_host)s/images/%(uuid)s",
"rel": "bookmark"
}
]
},
"links": [
{
"href": "%(host)s/v3/servers/%(id)s",
"rel": "self"
},
{
"href": "%(host)s/servers/%(id)s",
"rel": "bookmark"
}
],
"metadata": {
"My Server Name": "Apache1"
},
"name": "new-server-test",
"progress": 0,
"status": "ACTIVE",
"tenant_id": "openstack",
"user_id": "fake",
"key_name": null
}
]
}

@ -0,0 +1,20 @@
<?xml version='1.0' encoding='UTF-8'?>
<servers xmlns:os-extended-availability-zone="http://docs.openstack.org/compute/ext/extended_availability_zone/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1"> <server status="ACTIVE" updated="%(timestamp)s" host_id="%(hostid)s" name="new-server-test" created="%(timestamp)s" user_id="fake" tenant_id="openstack" access_ip_v4="" access_ip_v6="" progress="0" id="%(id)s" os-extended-availability-zone:availability_zone="nova" key_name="None">
<image id="%(uuid)s">
<atom:link href="%(glance_host)s/images/%(uuid)s" rel="bookmark"/>
</image>
<flavor id="1">
<atom:link href="%(host)s/flavors/1" rel="bookmark"/>
</flavor>
<metadata>
<meta key="My Server Name">Apache1</meta>
</metadata>
<addresses>
<network id="private">
<ip version="4" addr="%(ip)s" type="fixed" mac_addr="aa:bb:cc:dd:ee:ff"/>
</network>
</addresses>
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>
</server>
</servers>

@ -0,0 +1,60 @@
{
"server": {
"os-extended-server-attributes:host": "%(compute_host)s",
"os-extended-server-attributes:hypervisor_hostname": "%(hypervisor_hostname)s",
"os-extended-server-attributes:instance_name": "%(instance_name)s",
"updated": "%(timestamp)s",
"created": "%(timestamp)s",
"access_ip_v4": "",
"access_ip_v6": "",
"addresses": {
"private": [
{
"addr": "%(ip)s",
"version": 4,
"mac_addr": "aa:bb:cc:dd:ee:ff",
"type": "fixed"
}
]
},
"flavor": {
"id": "1",
"links": [
{
"href": "%(host)s/flavors/1",
"rel": "bookmark"
}
]
},
"host_id": "%(hostid)s",
"id": "%(uuid)s",
"image": {
"id": "%(uuid)s",
"links": [
{
"href": "%(glance_host)s/images/%(uuid)s",
"rel": "bookmark"
}
]
},
"links": [
{
"href": "%(host)s/v3/servers/%(uuid)s",
"rel": "self"
},
{
"href": "%(host)s/servers/%(uuid)s",
"rel": "bookmark"
}
],
"metadata": {
"My Server Name": "Apache1"
},
"name": "new-server-test",
"progress": 0,
"status": "ACTIVE",
"tenant_id": "openstack",
"user_id": "fake",
"key_name": null
}
}

@ -0,0 +1,19 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:os-extended-server-attributes="http://docs.openstack.org/compute/ext/extended_server_attributes/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" status="ACTIVE" updated="%(timestamp)s" host_id="%(hostid)s" name="new-server-test" created="%(timestamp)s" user_id="fake" tenant_id="openstack" access_ip_v4="" access_ip_v6="" progress="0" id="%(uuid)s" os-extended-server-attributes:instance_name="%(instance_name)s" os-extended-server-attributes:host="%(compute_host)s" os-extended-server-attributes:hypervisor_hostname="%(hypervisor_hostname)s" key_name="None">
<image id="%(uuid)s">
<atom:link href="%(glance_host)s/images/%(uuid)s" rel="bookmark"/>
</image>
<flavor id="1">
<atom:link href="%(host)s/flavors/1" rel="bookmark"/>
</flavor>
<metadata>
<meta key="My Server Name">Apache1</meta>
</metadata>
<addresses>
<network id="private">
<ip version="4" addr="%(ip)s" type="fixed" mac_addr="aa:bb:cc:dd:ee:ff"/>
</network>
</addresses>
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>
</server>

@ -0,0 +1,16 @@
{
"server" : {
"name" : "new-server-test",
"image_ref" : "%(glance_host)s/images/%(image_id)s",
"flavor_ref" : "%(host)s/flavors/1",
"metadata" : {
"My Server Name" : "Apache1"
},
"personality" : [
{
"path" : "/etc/banner.txt",
"contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVsc2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4gQnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRoZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlvdSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vyc2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
}
]
}
}

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1" image_ref="%(glance_host)s/images/%(image_id)s" flavor_ref="%(host)s/flavors/1" name="new-server-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>

@ -0,0 +1,16 @@
{
"server": {
"admin_pass": "%(password)s",
"id": "%(id)s",
"links": [
{
"href": "%(host)s/v3/servers/%(uuid)s",
"rel": "self"
},
{
"href": "%(host)s/servers/%(uuid)s",
"rel": "bookmark"
}
]
}
}

@ -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="%(id)s" admin_pass="%(password)s">
<metadata/>
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>
</server>

@ -0,0 +1,62 @@
{
"servers": [
{
"os-extended-server-attributes:host": "%(compute_host)s",
"os-extended-server-attributes:hypervisor_hostname": "%(hypervisor_hostname)s",
"os-extended-server-attributes:instance_name": "%(instance_name)s",
"updated": "%(timestamp)s",
"created": "%(timestamp)s",
"access_ip_v4": "",
"access_ip_v6": "",
"addresses": {
"private": [
{
"addr": "%(ip)s",
"version": 4,
"mac_addr": "aa:bb:cc:dd:ee:ff",
"type": "fixed"
}
]
},
"flavor": {
"id": "1",
"links": [
{
"href": "%(host)s/flavors/1",
"rel": "bookmark"
}
]
},
"host_id": "%(hostid)s",
"id": "%(uuid)s",
"image": {
"id": "%(uuid)s",
"links": [
{
"href": "%(glance_host)s/images/%(uuid)s",
"rel": "bookmark"
}
]
},
"links": [
{
"href": "%(host)s/v3/servers/%(id)s",
"rel": "self"
},
{
"href": "%(host)s/servers/%(id)s",
"rel": "bookmark"
}
],
"metadata": {
"My Server Name": "Apache1"
},
"name": "new-server-test",
"progress": 0,
"status": "ACTIVE",
"tenant_id": "openstack",
"user_id": "fake",
"key_name": null
}
]
}

@ -0,0 +1,21 @@
<?xml version='1.0' encoding='UTF-8'?>
<servers xmlns:os-extended-server-attributes="http://docs.openstack.org/compute/ext/extended_server_attributes/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
<server status="ACTIVE" updated="%(timestamp)s" host_id="%(hostid)s" name="new-server-test" created="%(timestamp)s" user_id="fake" tenant_id="openstack" access_ip_v4="" access_ip_v6="" progress="0" id="%(id)s" os-extended-server-attributes:instance_name="%(instance_name)s" os-extended-server-attributes:host="%(compute_host)s" os-extended-server-attributes:hypervisor_hostname="%(hypervisor_hostname)s" key_name="None">
<image id="%(uuid)s">
<atom:link href="%(glance_host)s/images/%(uuid)s" rel="bookmark"/>
</image>
<flavor id="1">
<atom:link href="%(host)s/flavors/1" rel="bookmark"/>
</flavor>
<metadata>
<meta key="My Server Name">Apache1</meta>
</metadata>
<addresses>
<network id="private">
<ip version="4" addr="%(ip)s" type="fixed" mac_addr="aa:bb:cc:dd:ee:ff"/>
</network>
</addresses>
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>
</server>
</servers>

@ -1,7 +1,7 @@
{
"server" : {
"name" : "new-server-test",
"image_ref" : "%(host)s/openstack/images/%(image_id)s",
"image_ref" : "%(glance_host)s/openstack/images/%(image_id)s",
"flavor_ref" : "%(host)s/openstack/flavors/1",
"metadata" : {
"My Server Name" : "Apache1"

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1" image_ref="%(host)s/openstack/images/%(image_id)s" flavor_ref="%(host)s/openstack/flavors/1" name="new-server-test">
<server xmlns="http://docs.openstack.org/compute/api/v1.1" image_ref="%(glance_host)s/openstack/images/%(image_id)s" flavor_ref="%(host)s/flavors/1" name="new-server-test">
<metadata>
<meta key="My Server Name">Apache1</meta>
</metadata>

@ -0,0 +1,58 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from nova.compute import api as compute_api
from nova.servicegroup import api as service_group_api
from nova.tests.integrated.v3 import test_servers
class EvacuateJsonTest(test_servers.ServersSampleBase):
extension_name = "os-evacuate"
def test_server_evacuate(self):
uuid = self._post_server()
req_subs = {
'host': self.compute.host,
"adminPass": "MySecretPass",
"onSharedStorage": 'False'
}
def fake_service_is_up(self, service):
"""Simulate validation of instance host is down."""
return False
def fake_service_get_by_compute_host(self, context, host):
"""Simulate that given host is a valid host."""
return {
'host_name': host,
'service': 'compute',
'zone': 'nova'
}
self.stubs.Set(service_group_api.API, 'service_is_up',
fake_service_is_up)
self.stubs.Set(compute_api.HostAPI, 'service_get_by_compute_host',
fake_service_get_by_compute_host)
response = self._do_post('servers/%s/action' % uuid,
'server-evacuate-req', req_subs)
subs = self._get_regexes()
self._verify_response('server-evacuate-resp', subs, response, 200)
class EvacuateXmlTest(EvacuateJsonTest):
ctype = 'xml'

@ -0,0 +1,39 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from nova.tests.integrated.v3 import test_servers
class ExtendedAvailabilityZoneJsonTests(test_servers.ServersSampleBase):
extension_name = "os-extended-availability-zone"
def test_show(self):
uuid = self._post_server()
response = self._do_get('servers/%s' % uuid)
subs = self._get_regexes()
subs['hostid'] = '[a-f0-9]+'
self._verify_response('server-get-resp', subs, response, 200)
def test_detail(self):
self._post_server()
response = self._do_get('servers/detail')
subs = self._get_regexes()
subs['hostid'] = '[a-f0-9]+'
self._verify_response('servers-detail-resp', subs, response, 200)
class ExtendedAvailabilityZoneXmlTests(ExtendedAvailabilityZoneJsonTests):
ctype = 'xml'

@ -0,0 +1,47 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from nova.tests.integrated.v3 import test_servers
class ExtendedServerAttributesJsonTest(test_servers.ServersSampleBase):
extension_name = "os-extended-server-attributes"
def test_show(self):
uuid = self._post_server()
response = self._do_get('servers/%s' % uuid)
subs = self._get_regexes()
subs['hostid'] = '[a-f0-9]+'
subs['id'] = uuid
subs['instance_name'] = 'instance-\d{8}'
subs['hypervisor_hostname'] = r'[\w\.\-]+'
self._verify_response('server-get-resp', subs, response, 200)
def test_detail(self):
uuid = self._post_server()
response = self._do_get('servers/detail')
subs = self._get_regexes()
subs['hostid'] = '[a-f0-9]+'
subs['id'] = uuid
subs['instance_name'] = 'instance-\d{8}'
subs['hypervisor_hostname'] = r'[\w\.\-]+'
self._verify_response('servers-detail-resp', subs, response, 200)
class ExtendedServerAttributesXmlTest(ExtendedServerAttributesJsonTest):
ctype = 'xml'