diff options
author | Sean Dague <sean@dague.net> | 2014-11-07 14:27:03 +0100 |
---|---|---|
committer | Sean Dague <sean@dague.net> | 2014-11-12 15:31:08 -0500 |
commit | 89cd6a0c493e26b5a9e017c99d731464292abbaf (patch) | |
tree | c2bf790d1684cd539b820247113492495123a163 /nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image | |
parent | 5c8bbaafef590e4d346a03051a0ba55c8be26c5c (diff) | |
download | nova-89cd6a0c493e26b5a9e017c99d731464292abbaf.tar.gz |
move all tests to nova/tests/unit
As part of the split of functional and unit tests we need to isolate
the unit tests into a separate directory for having multiple test
targets in a sane way.
Part of bp:functional-tests-for-nova
Change-Id: Id42ba373c1bda6a312b673ab2b489ca56da8c628
Diffstat (limited to 'nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image')
10 files changed, 143 insertions, 0 deletions
diff --git a/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-get-resp-rescue.json.tpl b/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-get-resp-rescue.json.tpl new file mode 100755 index 0000000000..d9a355319e --- /dev/null +++ b/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-get-resp-rescue.json.tpl @@ -0,0 +1,53 @@ +{ + "server": { + "accessIPv4": "", + "accessIPv6": "", + "addresses": { + "private": [ + { + "addr": "%(ip)s", + "version": 4 + } + ] + }, + "created": "%(isotime)s", + "flavor": { + "id": "1", + "links": [ + { + "href": "%(host)s/openstack/flavors/1", + "rel": "bookmark" + } + ] + }, + "hostId": "%(hostid)s", + "id": "%(id)s", + "image": { + "id": "%(uuid)s", + "links": [ + { + "href": "%(host)s/openstack/images/%(uuid)s", + "rel": "bookmark" + } + ] + }, + "links": [ + { + "href": "%(host)s/v2/openstack/servers/%(id)s", + "rel": "self" + }, + { + "href": "%(host)s/openstack/servers/%(id)s", + "rel": "bookmark" + } + ], + "metadata": { + "My Server Name": "Apache1" + }, + "name": "new-server-test", + "status": "%(status)s", + "tenant_id": "openstack", + "updated": "%(isotime)s", + "user_id": "fake" + } +} diff --git a/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-get-resp-rescue.xml.tpl b/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-get-resp-rescue.xml.tpl new file mode 100755 index 0000000000..fee8326e0c --- /dev/null +++ b/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-get-resp-rescue.xml.tpl @@ -0,0 +1,19 @@ +<?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" status="%(status)s" updated="%(isotime)s" hostId="%(hostid)s" name="new-server-test" created="%(isotime)s" userId="fake" tenantId="openstack" accessIPv4="" accessIPv6="" id="%(id)s"> + <image id="%(uuid)s"> + <atom:link href="%(host)s/openstack/images/%(uuid)s" rel="bookmark"/> + </image> + <flavor id="1"> + <atom:link href="%(host)s/openstack/flavors/1" rel="bookmark"/> + </flavor> + <metadata> + <meta key="My Server Name">Apache1</meta> + </metadata> + <addresses> + <network id="private"> + <ip version="4" addr="%(ip)s"/> + </network> + </addresses> + <atom:link href="%(host)s/v2/openstack/servers/%(id)s" rel="self"/> + <atom:link href="%(host)s/openstack/servers/%(id)s" rel="bookmark"/> +</server> diff --git a/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-post-req.json.tpl b/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-post-req.json.tpl new file mode 100755 index 0000000000..d3916d1aa6 --- /dev/null +++ b/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-post-req.json.tpl @@ -0,0 +1,16 @@ +{ + "server" : { + "name" : "new-server-test", + "imageRef" : "%(host)s/openstack/images/%(image_id)s", + "flavorRef" : "%(host)s/openstack/flavors/1", + "metadata" : { + "My Server Name" : "Apache1" + }, + "personality" : [ + { + "path" : "/etc/banner.txt", + "contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVsc2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4gQnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRoZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlvdSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vyc2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6b25zLiINCg0KLVJpY2hhcmQgQmFjaA==" + } + ] + } +} diff --git a/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-post-req.xml.tpl b/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-post-req.xml.tpl new file mode 100755 index 0000000000..f926149842 --- /dev/null +++ b/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-post-req.xml.tpl @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<server xmlns="http://docs.openstack.org/compute/api/v1.1" imageRef="%(host)s/openstack/images/%(image_id)s" flavorRef="%(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> diff --git a/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-post-resp.json.tpl b/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-post-resp.json.tpl new file mode 100755 index 0000000000..d5f030c873 --- /dev/null +++ b/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-post-resp.json.tpl @@ -0,0 +1,16 @@ +{ + "server": { + "adminPass": "%(password)s", + "id": "%(id)s", + "links": [ + { + "href": "%(host)s/v2/openstack/servers/%(uuid)s", + "rel": "self" + }, + { + "href": "%(host)s/openstack/servers/%(uuid)s", + "rel": "bookmark" + } + ] + } +} diff --git a/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-post-resp.xml.tpl b/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-post-resp.xml.tpl new file mode 100755 index 0000000000..3bb13e69bd --- /dev/null +++ b/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-post-resp.xml.tpl @@ -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" adminPass="%(password)s"> + <metadata/> + <atom:link href="%(host)s/v2/openstack/servers/%(uuid)s" rel="self"/> + <atom:link href="%(host)s/openstack/servers/%(uuid)s" rel="bookmark"/> +</server> diff --git a/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-rescue-req.json.tpl b/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-rescue-req.json.tpl new file mode 100755 index 0000000000..0f2e751fcf --- /dev/null +++ b/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-rescue-req.json.tpl @@ -0,0 +1,6 @@ +{ + "rescue": { + "adminPass": "%(password)s", + "rescue_image_ref" : "%(rescue_image_ref)s" + } +}
\ No newline at end of file diff --git a/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-rescue-req.xml.tpl b/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-rescue-req.xml.tpl new file mode 100755 index 0000000000..75666d81a2 --- /dev/null +++ b/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-rescue-req.xml.tpl @@ -0,0 +1,3 @@ +<?xml version="1.0" encoding="UTF-8"?> +<rescue xmlns="http://docs.openstack.org/compute/api/v1.1" + adminPass="%(password)s" rescue_image_ref="%(rescue_image_ref)s"/>
\ No newline at end of file diff --git a/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-rescue.json.tpl b/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-rescue.json.tpl new file mode 100755 index 0000000000..1922e4db1b --- /dev/null +++ b/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-rescue.json.tpl @@ -0,0 +1,3 @@ +{ + "adminPass": "%(password)s" +}
\ No newline at end of file diff --git a/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-rescue.xml.tpl b/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-rescue.xml.tpl new file mode 100755 index 0000000000..b3b95fdde4 --- /dev/null +++ b/nova/tests/unit/integrated/api_samples/os-extended-rescue-with-image/server-rescue.xml.tpl @@ -0,0 +1,2 @@ +<?xml version='1.0' encoding='UTF-8'?> +<adminPass>%(password)s</adminPass>
\ No newline at end of file |