Merge "v3 API samples for servers"

This commit is contained in:
Jenkins 2013-09-25 23:06:52 +00:00 committed by Gerrit Code Review
commit c808be8f83
21 changed files with 586 additions and 0 deletions

View File

@ -0,0 +1,75 @@
{
"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-23T13:37:00Z",
"flavor": {
"id": "1",
"links": [
{
"href": "http://openstack.example.com/flavors/1",
"rel": "bookmark"
}
]
},
"host_id": "9cc36101a27c2a69c1a18241f6228454d9d7f466bd90c62db8e8b856",
"id": "f474386b-4fb6-4e1f-b1d5-d6bf4437f7d5",
"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/f474386b-4fb6-4e1f-b1d5-d6bf4437f7d5",
"rel": "self"
},
{
"href": "http://openstack.example.com/servers/f474386b-4fb6-4e1f-b1d5-d6bf4437f7d5",
"rel": "bookmark"
}
],
"metadata": {
"My Server Name": "Apache1"
},
"name": "new-server-test",
"os-config-drive:config_drive": "",
"os-disk-config:disk_config": "AUTO",
"os-extended-availability-zone:availability_zone": "nova",
"os-extended-server-attributes:host": "b8b357f7100d4391828f2177c922ef93",
"os-extended-server-attributes:hypervisor_hostname": "fake-mini",
"os-extended-server-attributes:instance_name": "instance-00000001",
"os-extended-status:locked_by": null,
"os-extended-status:power_state": 1,
"os-extended-status:task_state": null,
"os-extended-status:vm_state": "active",
"os-extended-volumes:volumes_attached": [],
"os-server-usage:launched_at": "2013-09-23T13:37:00.880302",
"os-server-usage:terminated_at": null,
"progress": 0,
"security_groups": [
{
"name": "default"
}
],
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2013-09-23T13:37:00Z",
"user_id": "fake"
}
}

View File

@ -0,0 +1,22 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:os-extended-volumes="http://docs.openstack.org/compute/ext/extended_volumes/api/v3" xmlns:os-extended-availability-zone="http://docs.openstack.org/compute/ext/extended_availability_zone/api/v3" xmlns:os-extended-status="http://docs.openstack.org/compute/ext/extended_status/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:os-config-drive="http://docs.openstack.org/compute/ext/config_drive/api/v3" xmlns:os-extended-server-attributes="http://docs.openstack.org/compute/ext/extended_server_attributes/api/v3" xmlns:os-disk-config="http://docs.openstack.org/compute/ext/disk_config/api/v3" xmlns:os-server-usage="http://docs.openstack.org/compute/ext/os-server-usage/api/v3" xmlns="http://docs.openstack.org/compute/api/v1.1" status="ACTIVE" updated="2013-09-23T13:25:51Z" user_id="fake" name="new-server-test" created="2013-09-23T13:25:51Z" tenant_id="openstack" access_ip_v4="" progress="0" host_id="cf633433346bd3b095fe1ee9039b553f9d55b552f001c02544b1da64" id="97918d76-884c-4629-8500-4cc147194463" access_ip_v6="" os-config-drive:config_drive="" os-server-usage:launched_at="2013-09-23 13:25:51.254223" os-server-usage:terminated_at="None" os-extended-status:vm_state="active" os-extended-status:locked_by="None" os-extended-status:power_state="1" os-extended-status:task_state="None" os-disk-config:disk_config="AUTO" os-extended-availability-zone:availability_zone="nova" os-extended-server-attributes:hypervisor_hostname="fake-mini" os-extended-server-attributes:instance_name="instance-00000001" os-extended-server-attributes:host="b78e05fa358d404bb5c5f803aba22060" 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/97918d76-884c-4629-8500-4cc147194463" rel="self"/>
<atom:link href="http://openstack.example.com/servers/97918d76-884c-4629-8500-4cc147194463" rel="bookmark"/>
<security_groups>
<security_group name="default"/>
</security_groups>
</server>

View File

@ -0,0 +1,16 @@
{
"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",
"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" 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">
<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,22 @@
{
"server": {
"admin_pass": "zPnp2GseTqG4",
"id": "8195065c-fea4-4d57-b93f-5c5c63fe90e8",
"links": [
{
"href": "http://openstack.example.com/v3/servers/8195065c-fea4-4d57-b93f-5c5c63fe90e8",
"rel": "self"
},
{
"href": "http://openstack.example.com/servers/8195065c-fea4-4d57-b93f-5c5c63fe90e8",
"rel": "bookmark"
}
],
"os-disk-config:disk_config": "AUTO",
"security_groups": [
{
"name": "default"
}
]
}
}

View File

@ -0,0 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:os-disk-config="http://docs.openstack.org/compute/ext/disk_config/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="72885505-d8fb-4078-8bdb-65222c08f4d1" admin_pass="V24sJmhzzKLu" os-disk-config:disk_config="AUTO">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/72885505-d8fb-4078-8bdb-65222c08f4d1" rel="self"/>
<atom:link href="http://openstack.example.com/servers/72885505-d8fb-4078-8bdb-65222c08f4d1" rel="bookmark"/>
<security_groups>
<security_group name="default"/>
</security_groups>
</server>

View File

@ -0,0 +1,77 @@
{
"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-23T13:53:12Z",
"flavor": {
"id": "1",
"links": [
{
"href": "http://openstack.example.com/flavors/1",
"rel": "bookmark"
}
]
},
"host_id": "f1e160ad2bf07084f3d3e0dfdd0795d80da18a60825322c15775c0dd",
"id": "9cbefc35-d372-40c5-88e2-9fda1b6ea12c",
"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/9cbefc35-d372-40c5-88e2-9fda1b6ea12c",
"rel": "self"
},
{
"href": "http://openstack.example.com/servers/9cbefc35-d372-40c5-88e2-9fda1b6ea12c",
"rel": "bookmark"
}
],
"metadata": {
"My Server Name": "Apache1"
},
"name": "new-server-test",
"os-config-drive:config_drive": "",
"os-disk-config:disk_config": "AUTO",
"os-extended-availability-zone:availability_zone": "nova",
"os-extended-server-attributes:host": "c3f14e9812ad496baf92ccfb3c61e15f",
"os-extended-server-attributes:hypervisor_hostname": "fake-mini",
"os-extended-server-attributes:instance_name": "instance-00000001",
"os-extended-status:locked_by": null,
"os-extended-status:power_state": 1,
"os-extended-status:task_state": null,
"os-extended-status:vm_state": "active",
"os-extended-volumes:volumes_attached": [],
"os-server-usage:launched_at": "2013-09-23T13:53:12.774549",
"os-server-usage:terminated_at": null,
"progress": 0,
"security_groups": [
{
"name": "default"
}
],
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2013-09-23T13:53:12Z",
"user_id": "fake"
}
]
}

View File

@ -0,0 +1,24 @@
<?xml version='1.0' encoding='UTF-8'?>
<servers xmlns:os-extended-volumes="http://docs.openstack.org/compute/ext/extended_volumes/api/v3" xmlns:os-extended-availability-zone="http://docs.openstack.org/compute/ext/extended_availability_zone/api/v3" xmlns:os-extended-status="http://docs.openstack.org/compute/ext/extended_status/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:os-config-drive="http://docs.openstack.org/compute/ext/config_drive/api/v3" xmlns:os-extended-server-attributes="http://docs.openstack.org/compute/ext/extended_server_attributes/api/v3" xmlns:os-disk-config="http://docs.openstack.org/compute/ext/disk_config/api/v3" xmlns:os-server-usage="http://docs.openstack.org/compute/ext/os-server-usage/api/v3" xmlns="http://docs.openstack.org/compute/api/v1.1">
<server status="ACTIVE" updated="2013-09-23T13:29:37Z" user_id="fake" name="new-server-test" created="2013-09-23T13:29:36Z" tenant_id="openstack" access_ip_v4="" progress="0" host_id="6da2179515d81d177b0fb59fb11a1b70f7ca3b859bb6d8beb6331403" id="dbcc8944-8510-46bd-a017-ecacd6e6de5c" access_ip_v6="" os-config-drive:config_drive="" os-server-usage:launched_at="2013-09-23 13:29:37.150043" os-server-usage:terminated_at="None" os-extended-status:vm_state="active" os-extended-status:locked_by="None" os-extended-status:power_state="1" os-extended-status:task_state="None" os-disk-config:disk_config="AUTO" os-extended-availability-zone:availability_zone="nova" os-extended-server-attributes:hypervisor_hostname="fake-mini" os-extended-server-attributes:instance_name="instance-00000001" os-extended-server-attributes:host="ac7b409b83234b25af19fc4d36793f8d" 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/dbcc8944-8510-46bd-a017-ecacd6e6de5c" rel="self"/>
<atom:link href="http://openstack.example.com/servers/dbcc8944-8510-46bd-a017-ecacd6e6de5c" rel="bookmark"/>
<security_groups>
<security_group name="default"/>
</security_groups>
</server>
</servers>

View File

@ -0,0 +1,18 @@
{
"servers": [
{
"id": "a291599e-6de2-41a6-88df-c443ddcef70d",
"links": [
{
"href": "http://openstack.example.com/v3/servers/a291599e-6de2-41a6-88df-c443ddcef70d",
"rel": "self"
},
{
"href": "http://openstack.example.com/servers/a291599e-6de2-41a6-88df-c443ddcef70d",
"rel": "bookmark"
}
],
"name": "new-server-test"
}
]
}

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<servers xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
<server name="new-server-test" id="1e3b5dab-196d-4e3e-af99-13afe40837da">
<atom:link href="http://openstack.example.com/v3/servers/1e3b5dab-196d-4e3e-af99-13afe40837da" rel="self"/>
<atom:link href="http://openstack.example.com/servers/1e3b5dab-196d-4e3e-af99-13afe40837da" rel="bookmark"/>
</server>
</servers>

View File

@ -0,0 +1,75 @@
{
"server": {
"access_ip_v4": "",
"access_ip_v6": "",
"addresses": {
"private": [
{
"addr": "%(ip)s",
"mac_addr": "aa:bb:cc:dd:ee:ff",
"type": "fixed",
"version": 4
}
]
},
"created": "%(timestamp)s",
"flavor": {
"id": "1",
"links": [
{
"href": "%(host)s/flavors/1",
"rel": "bookmark"
}
]
},
"host_id": "%(hostid)s",
"id": "%(id)s",
"image": {
"id": "%(uuid)s",
"links": [
{
"href": "%(glance_host)s/images/%(uuid)s",
"rel": "bookmark"
}
]
},
"key_name": null,
"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",
"os-config-drive:config_drive": "",
"os-disk-config:disk_config": "AUTO",
"os-extended-availability-zone:availability_zone": "nova",
"os-extended-server-attributes:host": "%(compute_host)s",
"os-extended-server-attributes:hypervisor_hostname": "%(hypervisor_hostname)s",
"os-extended-server-attributes:instance_name": "instance-00000001",
"os-extended-status:locked_by": null,
"os-extended-status:power_state": 1,
"os-extended-status:task_state": null,
"os-extended-status:vm_state": "active",
"os-extended-volumes:volumes_attached": [],
"os-server-usage:launched_at": "%(timestamp)s",
"os-server-usage:terminated_at": null,
"progress": 0,
"security_groups": [
{
"name": "default"
}
],
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
"user_id": "fake"
}
}

View File

@ -0,0 +1,22 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:os-extended-volumes="http://docs.openstack.org/compute/ext/extended_volumes/api/v3" 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:os-extended-status="http://docs.openstack.org/compute/ext/extended_status/api/v3" xmlns:os-config-drive="http://docs.openstack.org/compute/ext/config_drive/api/v3" xmlns:os-extended-server-attributes="http://docs.openstack.org/compute/ext/extended_server_attributes/api/v3" xmlns:os-disk-config="http://docs.openstack.org/compute/ext/disk_config/api/v3" xmlns:os-server-usage="http://docs.openstack.org/compute/ext/os-server-usage/api/v3" xmlns="http://docs.openstack.org/compute/api/v1.1" status="ACTIVE" updated="%(timestamp)s" user_id="fake" name="new-server-test" created="%(timestamp)s" tenant_id="openstack" access_ip_v4="" progress="0" host_id="%(hostid)s" id="%(id)s" access_ip_v6="" os-config-drive:config_drive="" os-server-usage:launched_at="%(timestamp)s" os-server-usage:terminated_at="None" os-extended-status:vm_state="active" os-extended-status:locked_by="None" os-extended-status:power_state="1" os-extended-status:task_state="None" os-disk-config:disk_config="AUTO" os-extended-availability-zone:availability_zone="nova" os-extended-server-attributes:hypervisor_hostname="%(hypervisor_hostname)s" os-extended-server-attributes:instance_name="instance-00000001" os-extended-server-attributes:host="%(compute_host)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" type="fixed" addr="%(ip)s" 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"/>
<security_groups>
<security_group name="default"/>
</security_groups>
</server>

View File

@ -0,0 +1,16 @@
{
"server" : {
"name" : "new-server-test",
"image_ref" : "%(host)s/openstack/images/%(image_id)s",
"flavor_ref" : "%(host)s/openstack/flavors/1",
"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" image_ref="%(host)s/openstack/images/%(image_id)s" flavor_ref="%(host)s/openstack/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>

View File

@ -0,0 +1,22 @@
{
"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"
}
],
"os-disk-config:disk_config": "AUTO",
"security_groups": [
{
"name": "default"
}
]
}
}

View File

@ -0,0 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:os-disk-config="http://docs.openstack.org/compute/ext/disk_config/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_pass="%(password)s" os-disk-config:disk_config="AUTO">
<metadata/>
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>
<security_groups>
<security_group name="default"/>
</security_groups>
</server>

View File

@ -0,0 +1,77 @@
{
"servers": [
{
"access_ip_v4": "",
"access_ip_v6": "",
"addresses": {
"private": [
{
"addr": "%(ip)s",
"mac_addr": "aa:bb:cc:dd:ee:ff",
"type": "fixed",
"version": 4
}
]
},
"created": "%(timestamp)s",
"flavor": {
"id": "1",
"links": [
{
"href": "%(host)s/flavors/1",
"rel": "bookmark"
}
]
},
"host_id": "%(hostid)s",
"id": "%(id)s",
"image": {
"id": "%(uuid)s",
"links": [
{
"href": "%(glance_host)s/images/%(uuid)s",
"rel": "bookmark"
}
]
},
"key_name": null,
"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",
"os-config-drive:config_drive": "",
"os-disk-config:disk_config": "AUTO",
"os-extended-availability-zone:availability_zone": "nova",
"os-extended-server-attributes:host": "%(compute_host)s",
"os-extended-server-attributes:hypervisor_hostname": "%(hypervisor_hostname)s",
"os-extended-server-attributes:instance_name": "instance-00000001",
"os-extended-status:locked_by": null,
"os-extended-status:power_state": 1,
"os-extended-status:task_state": null,
"os-extended-status:vm_state": "active",
"os-extended-volumes:volumes_attached": [],
"os-server-usage:launched_at": "%(timestamp)s",
"os-server-usage:terminated_at": null,
"progress": 0,
"security_groups": [
{
"name": "default"
}
],
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
"user_id": "fake"
}
]
}

View File

@ -0,0 +1,24 @@
<?xml version='1.0' encoding='UTF-8'?>
<servers xmlns:os-extended-volumes="http://docs.openstack.org/compute/ext/extended_volumes/api/v3" 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:os-extended-status="http://docs.openstack.org/compute/ext/extended_status/api/v3" xmlns:os-config-drive="http://docs.openstack.org/compute/ext/config_drive/api/v3" xmlns:os-extended-server-attributes="http://docs.openstack.org/compute/ext/extended_server_attributes/api/v3" xmlns:os-disk-config="http://docs.openstack.org/compute/ext/disk_config/api/v3" xmlns:os-server-usage="http://docs.openstack.org/compute/ext/os-server-usage/api/v3" xmlns="http://docs.openstack.org/compute/api/v1.1">
<server status="ACTIVE" updated="%(timestamp)s" user_id="fake" name="new-server-test" created="%(timestamp)s" tenant_id="openstack" access_ip_v4="" progress="0" host_id="%(hostid)s" id="%(id)s" access_ip_v6="" os-config-drive:config_drive="" os-server-usage:launched_at="%(timestamp)s" os-server-usage:terminated_at="None" os-extended-status:vm_state="active" os-extended-status:locked_by="None" os-extended-status:power_state="1" os-extended-status:task_state="None" os-disk-config:disk_config="AUTO" os-extended-availability-zone:availability_zone="nova" os-extended-server-attributes:hypervisor_hostname="%(hypervisor_hostname)s" os-extended-server-attributes:instance_name="instance-00000001" os-extended-server-attributes:host="%(compute_host)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" type="fixed" addr="%(ip)s" 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"/>
<security_groups>
<security_group name="default"/>
</security_groups>
</server>
</servers>

View File

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

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<servers xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
<server name="new-server-test" id="%(uuid)s">
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>
</server>
</servers>

View File

@ -66,3 +66,11 @@ class ServersSampleJsonTest(ServersSampleBase):
class ServersSampleXmlTest(ServersSampleJsonTest):
ctype = 'xml'
class ServersSampleAllExtensionJsonTest(ServersSampleJsonTest):
all_extensions = True
class ServersSampleAllExtensionXmlTest(ServersSampleXmlTest):
all_extensions = True