Merge "all_extensions api_samples testing for server actions"

This commit is contained in:
Jenkins 2012-09-30 07:35:12 +00:00 committed by Gerrit Code Review
commit 62e49b5ec4
33 changed files with 381 additions and 0 deletions

View File

@ -0,0 +1,5 @@
{
"changePassword" : {
"adminPass" : "foo"
}
}

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<changePassword
xmlns="http://docs.openstack.org/compute/api/v1.1"
adminPass="foo"/>

View File

@ -0,0 +1,3 @@
{
"confirmResize" : null
}

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<confirmResize
xmlns="http://docs.openstack.org/compute/api/v1.1"/>

View File

@ -0,0 +1,8 @@
{
"createImage" : {
"name" : "foo-image",
"metadata": {
"myvar": "foobar"
}
}
}

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<createImage
xmlns="http://docs.openstack.org/compute/api/v1.1"
name="foo-image">
<metadata>
<meta key="myvar">foobar</meta>
</metadata>
</createImage>

View File

@ -0,0 +1,5 @@
{
"reboot" : {
"type" : "SOFT"
}
}

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<reboot
xmlns="http://docs.openstack.org/compute/api/v1.1"
type="SOFT"/>

View File

@ -0,0 +1,56 @@
{
"server": {
"OS-DCF:diskConfig": "AUTO",
"accessIPv4": "1.2.3.4",
"accessIPv6": "fe80::100",
"addresses": {
"private": [
{
"addr": "192.168.0.3",
"version": 4
}
]
},
"adminPass": "seekr3t",
"created": "2012-09-25T13:36:08Z",
"flavor": {
"id": "1",
"links": [
{
"href": "http://openstack.example.com/openstack/flavors/1",
"rel": "bookmark"
}
]
},
"hostId": "935dcd1019fd43814a1d2a6e9b320dcac352d3a02c69f8be7ba41002",
"id": "27568e59-cfb7-4283-a00e-4af933f2d539",
"image": {
"id": "70a599e0-31e7-49b7-b260-868f441e862b",
"links": [
{
"href": "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
"rel": "bookmark"
}
]
},
"links": [
{
"href": "http://openstack.example.com/v2/openstack/servers/27568e59-cfb7-4283-a00e-4af933f2d539",
"rel": "self"
},
{
"href": "http://openstack.example.com/openstack/servers/27568e59-cfb7-4283-a00e-4af933f2d539",
"rel": "bookmark"
}
],
"metadata": {
"meta var": "meta val"
},
"name": "foobar",
"progress": 0,
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2012-09-25T13:36:09Z",
"user_id": "fake"
}
}

View File

@ -0,0 +1,19 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" status="ACTIVE" updated="2012-09-25T13:40:46Z" hostId="140a6675f54b67847d7ff7655a3a85f1483ea977e9024a1412f6d8ad" name="foobar" created="2012-09-25T13:40:45Z" userId="fake" tenantId="openstack" accessIPv4="1.2.3.4" accessIPv6="fe80::100" progress="0" id="1e1278ab-7011-4f0b-901f-eea5473b0824" adminPass="seekr3t" OS-DCF:diskConfig="AUTO">
<image id="70a599e0-31e7-49b7-b260-868f441e862b">
<atom:link href="http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b" rel="bookmark"/>
</image>
<flavor id="1">
<atom:link href="http://openstack.example.com/openstack/flavors/1" rel="bookmark"/>
</flavor>
<metadata>
<meta key="My Server Name">Apache1</meta>
</metadata>
<addresses>
<network id="private">
<ip version="4" addr="192.168.0.3"/>
</network>
</addresses>
<atom:link href="http://openstack.example.com/v2/openstack/servers/1e1278ab-7011-4f0b-901f-eea5473b0824" rel="self"/>
<atom:link href="http://openstack.example.com/openstack/servers/1e1278ab-7011-4f0b-901f-eea5473b0824" rel="bookmark"/>
</server>

View File

@ -0,0 +1,18 @@
{
"rebuild" : {
"imageRef" : "http://openstack.example.com/v2/32278/images/70a599e0-31e7-49b7-b260-868f441e862b",
"name" : "foobar",
"adminPass" : "seekr3t",
"accessIPv4" : "1.2.3.4",
"accessIPv6" : "fe80::100",
"metadata" : {
"meta var" : "meta val"
},
"personality" : [
{
"path" : "/etc/banner.txt",
"contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6 b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
}
]
}
}

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<rebuild
xmlns="http://docs.openstack.org/compute/api/v1.1"
name="foobar"
imageRef="http://openstack.example.com/v1.1/32278/images/70a599e0-31e7-49b7-b260-868f441e862b"
accessIPv4="1.2.3.4"
accessIPv6="fe80::100"
adminPass="seekr3t">
<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>
</rebuild>

View File

@ -0,0 +1,5 @@
{
"resize" : {
"flavorRef" : "2"
}
}

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<resize
xmlns="http://docs.openstack.org/compute/api/v1.1"
flavorRef="2"/>

View File

@ -0,0 +1,3 @@
{
"revertResize" : null
}

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<revertResize
xmlns="http://docs.openstack.org/compute/api/v1.1"/>

View File

@ -0,0 +1,5 @@
{
"changePassword" : {
"adminPass" : "%(password)s"
}
}

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<changePassword
xmlns="http://docs.openstack.org/compute/api/v1.1"
adminPass="%(password)s"/>

View File

@ -0,0 +1,3 @@
{
"confirmResize" : null
}

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<confirmResize
xmlns="http://docs.openstack.org/compute/api/v1.1"/>

View File

@ -0,0 +1,9 @@
{
"createImage" : {
"name" : "%(name)s",
"metadata": {
"%(meta_var)s": "%(meta_val)s"
}
}
}

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<createImage
xmlns="http://docs.openstack.org/compute/api/v1.1"
name="%(name)s">
<metadata>
<meta key="%(meta_var)s">%(meta_val)s</meta>
</metadata>
</createImage>

View File

@ -0,0 +1,5 @@
{
"reboot" : {
"type" : "%(type)s"
}
}

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<reboot
xmlns="http://docs.openstack.org/compute/api/v1.1"
type="%(type)s"/>

View File

@ -0,0 +1,56 @@
{
"server": {
"OS-DCF:diskConfig": "AUTO",
"accessIPv4": "%(ip)s",
"accessIPv6": "%(ip6)s",
"addresses": {
"private": [
{
"addr": "%(ip)s",
"version": 4
}
]
},
"adminPass": "%(password)s",
"created": "%(timestamp)s",
"flavor": {
"id": "1",
"links": [
{
"href": "%(host)s/openstack/flavors/1",
"rel": "bookmark"
}
]
},
"hostId": "%(hostid)s",
"id": "%(uuid)s",
"image": {
"id": "%(uuid)s",
"links": [
{
"href": "%(host)s/openstack/images/%(uuid)s",
"rel": "bookmark"
}
]
},
"links": [
{
"href": "%(host)s/v2/openstack/servers/%(uuid)s",
"rel": "self"
},
{
"href": "%(host)s/openstack/servers/%(uuid)s",
"rel": "bookmark"
}
],
"metadata": {
"meta var": "meta val"
},
"name": "%(name)s",
"progress": 0,
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
"user_id": "fake"
}
}

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1"
xmlns="http://docs.openstack.org/compute/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom"
id="%(uuid)s"
tenantId="openstack" userId="fake"
name="%(name)s"
hostId="%(hostid)s" progress="0"
status="ACTIVE" adminPass="%(password)s"
created="%(timestamp)s"
updated="%(timestamp)s"
accessIPv4="%(ip)s"
accessIPv6="%(ip6)s"
OS-DCF:diskConfig="AUTO">
<image id="%(uuid)s">
<atom:link
rel="bookmark"
href="%(host)s/openstack/images/%(uuid)s"/>
<atom:link
rel="self"
href="%(host)s/openstack/images/%(uuid)s"/>
</image>
<flavor id="1">
<atom:link
rel="bookmark"
href="%(host)s/openstack/flavors/1"/>
<atom:link
rel="self"
href="%(host)s/openstack/flavors/1"/>
</flavor>
<metadata>
<meta key="My Server Name">Apache1</meta>
</metadata>
<addresses>
<network id="private">
<ip version="4" addr="%(ip)s"/>
</network>
</addresses>
<atom:link
rel="self"
href="%(host)s/v2/openstack/servers/%(uuid)s"/>
<atom:link
rel="bookmark"
href="%(host)s/openstack/servers/%(uuid)s"/>
</server>

View File

@ -0,0 +1,18 @@
{
"rebuild" : {
"imageRef" : "%(host)s/v2/32278/images/%(uuid)s",
"name" : "%(name)s",
"adminPass" : "%(pass)s",
"accessIPv4" : "%(ip)s",
"accessIPv6" : "%(ip6)s",
"metadata" : {
"meta var" : "meta val"
},
"personality" : [
{
"path" : "/etc/banner.txt",
"contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6 b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
}
]
}
}

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<rebuild
xmlns="http://docs.openstack.org/compute/api/v1.1"
name="%(name)s"
imageRef="%(host)s/v1.1/32278/images/%(uuid)s"
accessIPv4="%(ip)s"
accessIPv6="%(ip6)s"
adminPass="%(pass)s">
<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>
</rebuild>

View File

@ -0,0 +1,5 @@
{
"resize" : {
"flavorRef" : "%(id)s"
}
}

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<resize
xmlns="http://docs.openstack.org/compute/api/v1.1"
flavorRef="%(id)s"/>

View File

@ -0,0 +1,3 @@
{
"revertResize" : null
}

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<revertResize
xmlns="http://docs.openstack.org/compute/api/v1.1"/>

View File

@ -598,6 +598,14 @@ class ServersActionsXmlTest(ServersActionsJsonTest):
ctype = 'xml'
class ServersActionsAllJsonTest(ServersActionsJsonTest):
all_extensions = True
class ServersActionsAllXmlTest(ServersActionsXmlTest):
all_extensions = True
class ServerStartStopJsonTest(ServersSampleBase):
extension_name = "nova.api.openstack.compute.contrib" + \
".server_start_stop.Server_start_stop"