Add V3 api samples for access_ips
Adds api sample tests and api samples for access_ips Change-Id: I9d9249a48e7f7ccdff0146fbe5b25463d66a93a7
This commit is contained in:
parent
79d0ce6171
commit
69c9baa117
@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
"server": {
|
||||||
|
"addresses": {
|
||||||
|
"private": [
|
||||||
|
{
|
||||||
|
"addr": "192.168.0.3",
|
||||||
|
"mac_addr": "aa:bb:cc:dd:ee:ff",
|
||||||
|
"type": "fixed",
|
||||||
|
"version": 4
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"admin_password": "99WHAxN8gpvg",
|
||||||
|
"created": "2013-11-06T07:51:09Z",
|
||||||
|
"flavor": {
|
||||||
|
"id": "1",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://openstack.example.com/flavors/1",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"host_id": "5c8072dbcda8ce3f26deb6662bd7718e1a6d349bdf2296911d1be4ac",
|
||||||
|
"id": "53a63a19-c145-47f8-9ae5-b39d6bff33ec",
|
||||||
|
"image": {
|
||||||
|
"id": "70a599e0-31e7-49b7-b260-868f441e862b",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://openstack.example.com/v3/servers/53a63a19-c145-47f8-9ae5-b39d6bff33ec",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://openstack.example.com/servers/53a63a19-c145-47f8-9ae5-b39d6bff33ec",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"meta_var": "meta_val"
|
||||||
|
},
|
||||||
|
"name": "new-server-test",
|
||||||
|
"os-access-ips:access_ip_v4": "4.3.2.1",
|
||||||
|
"os-access-ips:access_ip_v6": "80fe::",
|
||||||
|
"progress": 0,
|
||||||
|
"status": "ACTIVE",
|
||||||
|
"tenant_id": "openstack",
|
||||||
|
"updated": "2013-11-06T07:51:11Z",
|
||||||
|
"user_id": "fake"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<server xmlns:os-access-ips="http://docs.openstack.org/compute/ext/os-access-ips/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" status="ACTIVE" updated="2013-11-06T07:51:17Z" user_id="fake" name="new-server-test" created="2013-11-06T07:51:16Z" tenant_id="openstack" progress="0" host_id="aa5947afded4011a123e96aa4ebb887c445cea196074a793eeb38f9c" id="c2eac137-f985-46a3-9796-ba3ff9990e54" admin_password="2HePqvKRz22B" os-access-ips:access_ip_v4="4.3.2.1" os-access-ips:access_ip_v6="80fe::">
|
||||||
|
<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="meta_var">meta_val</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/c2eac137-f985-46a3-9796-ba3ff9990e54" rel="self"/>
|
||||||
|
<atom:link href="http://openstack.example.com/servers/c2eac137-f985-46a3-9796-ba3ff9990e54" rel="bookmark"/>
|
||||||
|
</server>
|
17
doc/v3/api_samples/os-access-ips/server-action-rebuild.json
Normal file
17
doc/v3/api_samples/os-access-ips/server-action-rebuild.json
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"rebuild" : {
|
||||||
|
"os-access-ips:access_ip_v4": "4.3.2.1",
|
||||||
|
"os-access-ips:access_ip_v6": "80fe::",
|
||||||
|
"image_ref" : "http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b",
|
||||||
|
"name" : "new-server-test",
|
||||||
|
"metadata" : {
|
||||||
|
"meta_var" : "meta_val"
|
||||||
|
},
|
||||||
|
"personality" : [
|
||||||
|
{
|
||||||
|
"path" : "/etc/banner.txt",
|
||||||
|
"contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6 b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
24
doc/v3/api_samples/os-access-ips/server-action-rebuild.xml
Normal file
24
doc/v3/api_samples/os-access-ips/server-action-rebuild.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<rebuild
|
||||||
|
xmlns="http://docs.openstack.org/compute/api/v1.1"
|
||||||
|
name="new-server-test"
|
||||||
|
image_ref="http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b"
|
||||||
|
xmlns:os-access-ips="http://docs.openstack.org/compute/ext/os-access-ips/api/v3"
|
||||||
|
os-access-ips:access_ip_v4="4.3.2.1" os-access-ips:access_ip_v6="80fe::">
|
||||||
|
<metadata>
|
||||||
|
<meta key="meta_var">meta_val</meta>
|
||||||
|
</metadata>
|
||||||
|
<personality>
|
||||||
|
<file path="/etc/banner.txt">
|
||||||
|
ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
|
||||||
|
dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k
|
||||||
|
IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
|
||||||
|
c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g
|
||||||
|
QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
|
||||||
|
ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv
|
||||||
|
dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
|
||||||
|
c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6
|
||||||
|
b25zLiINCg0KLVJpY2hhcmQgQmFjaA==
|
||||||
|
</file>
|
||||||
|
</personality>
|
||||||
|
</rebuild>
|
57
doc/v3/api_samples/os-access-ips/server-get-resp.json
Normal file
57
doc/v3/api_samples/os-access-ips/server-get-resp.json
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
"server": {
|
||||||
|
"addresses": {
|
||||||
|
"private": [
|
||||||
|
{
|
||||||
|
"addr": "192.168.0.3",
|
||||||
|
"mac_addr": "aa:bb:cc:dd:ee:ff",
|
||||||
|
"type": "fixed",
|
||||||
|
"version": 4
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"created": "2013-09-11T03:23:12Z",
|
||||||
|
"flavor": {
|
||||||
|
"id": "1",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://openstack.example.com/flavors/1",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"host_id": "b3a6fd97c027e18d6d9c7506eea8a236cf2ceca420cfdfe0239a64a8",
|
||||||
|
"id": "5eedbf0c-c303-4ed3-933a-a4d3732cfa0a",
|
||||||
|
"image": {
|
||||||
|
"id": "70a599e0-31e7-49b7-b260-868f441e862b",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://openstack.example.com/v3/servers/5eedbf0c-c303-4ed3-933a-a4d3732cfa0a",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://openstack.example.com/servers/5eedbf0c-c303-4ed3-933a-a4d3732cfa0a",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"My Server Name": "Apache1"
|
||||||
|
},
|
||||||
|
"name": "new-server-test",
|
||||||
|
"os-access-ips:access_ip_v4": "1.2.3.4",
|
||||||
|
"os-access-ips:access_ip_v6": "fe80::",
|
||||||
|
"progress": 0,
|
||||||
|
"status": "ACTIVE",
|
||||||
|
"tenant_id": "openstack",
|
||||||
|
"updated": "2013-09-11T03:23:13Z",
|
||||||
|
"user_id": "fake",
|
||||||
|
"key_name": null
|
||||||
|
}
|
||||||
|
}
|
19
doc/v3/api_samples/os-access-ips/server-get-resp.xml
Normal file
19
doc/v3/api_samples/os-access-ips/server-get-resp.xml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<server xmlns:os-access-ips="http://docs.openstack.org/compute/ext/os-access-ips/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" status="ACTIVE" updated="2013-09-11T03:36:47Z" user_id="fake" name="new-server-test" created="2013-09-11T03:36:46Z" tenant_id="openstack" progress="0" host_id="7f9de0289b985e3cdc1965e58c00b3343fbb72bd82cb32e736fe0b7b" id="ad654a80-98fb-4254-9c11-ff9fa94c6332" os-access-ips:access_ip_v4="1.2.3.4" os-access-ips:access_ip_v6="fe80::" 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/ad654a80-98fb-4254-9c11-ff9fa94c6332" rel="self"/>
|
||||||
|
<atom:link href="http://openstack.example.com/servers/ad654a80-98fb-4254-9c11-ff9fa94c6332" rel="bookmark"/>
|
||||||
|
</server>
|
18
doc/v3/api_samples/os-access-ips/server-post-req.json
Normal file
18
doc/v3/api_samples/os-access-ips/server-post-req.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"server" : {
|
||||||
|
"os-access-ips:access_ip_v4": "1.2.3.4",
|
||||||
|
"os-access-ips:access_ip_v6": "fe80::",
|
||||||
|
"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=="
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
19
doc/v3/api_samples/os-access-ips/server-post-req.xml
Normal file
19
doc/v3/api_samples/os-access-ips/server-post-req.xml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<server xmlns:os-access-ips="http://docs.openstack.org/compute/ext/os-access-ips/api/v3" 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" os-access-ips:access_ip_v4="1.2.3.4" os-access-ips:access_ip_v6="fe80::">
|
||||||
|
<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>
|
18
doc/v3/api_samples/os-access-ips/server-post-resp.json
Normal file
18
doc/v3/api_samples/os-access-ips/server-post-resp.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"server": {
|
||||||
|
"admin_password": "n7JGBda664QG",
|
||||||
|
"id": "934760e1-2b0b-4f9e-a916-eac1e69839dc",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://openstack.example.com/v3/servers/934760e1-2b0b-4f9e-a916-eac1e69839dc",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://openstack.example.com/servers/934760e1-2b0b-4f9e-a916-eac1e69839dc",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"os-access-ips:access_ip_v4": "1.2.3.4",
|
||||||
|
"os-access-ips:access_ip_v6": "fe80::"
|
||||||
|
}
|
||||||
|
}
|
6
doc/v3/api_samples/os-access-ips/server-post-resp.xml
Normal file
6
doc/v3/api_samples/os-access-ips/server-post-resp.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<server xmlns:os-access-ips="http://docs.openstack.org/compute/ext/os-access-ips/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="bda1ab20-a0f2-4643-a56b-7447245e8b9f" admin_password="pe59TrCHUvxU" os-access-ips:access_ip_v4="1.2.3.4" os-access-ips:access_ip_v6="fe80::">
|
||||||
|
<metadata/>
|
||||||
|
<atom:link href="http://openstack.example.com/v3/servers/bda1ab20-a0f2-4643-a56b-7447245e8b9f" rel="self"/>
|
||||||
|
<atom:link href="http://openstack.example.com/servers/bda1ab20-a0f2-4643-a56b-7447245e8b9f" rel="bookmark"/>
|
||||||
|
</server>
|
6
doc/v3/api_samples/os-access-ips/server-put-req.json
Normal file
6
doc/v3/api_samples/os-access-ips/server-put-req.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"server": {
|
||||||
|
"os-access-ips:access_ip_v4": "4.3.2.1",
|
||||||
|
"os-access-ips:access_ip_v6": "80fe::"
|
||||||
|
}
|
||||||
|
}
|
5
doc/v3/api_samples/os-access-ips/server-put-req.xml
Normal file
5
doc/v3/api_samples/os-access-ips/server-put-req.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<server xmlns:os-access-ips="http://docs.openstack.org/compute/ext/os-access-ips/api/v3" xmlns="http://docs.openstack.org/compute/api/v1.1">
|
||||||
|
<os-access-ips:access_ip_v4>4.3.2.1</os-access-ips:access_ip_v4>
|
||||||
|
<os-access-ips:access_ip_v6>80fe::</os-access-ips:access_ip_v6>
|
||||||
|
</server>
|
56
doc/v3/api_samples/os-access-ips/server-put-resp.json
Normal file
56
doc/v3/api_samples/os-access-ips/server-put-resp.json
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"server": {
|
||||||
|
"addresses": {
|
||||||
|
"private": [
|
||||||
|
{
|
||||||
|
"addr": "192.168.0.3",
|
||||||
|
"mac_addr": "aa:bb:cc:dd:ee:ff",
|
||||||
|
"type": "fixed",
|
||||||
|
"version": 4
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"created": "2013-11-06T08:11:57Z",
|
||||||
|
"flavor": {
|
||||||
|
"id": "1",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://openstack.example.com/flavors/1",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"host_id": "ea0fd522e5bc2fea872429b331304a6f930f2d9aa2a5dc95b3c6061a",
|
||||||
|
"id": "fea9595c-ce6e-4565-987e-2d301fe056ac",
|
||||||
|
"image": {
|
||||||
|
"id": "70a599e0-31e7-49b7-b260-868f441e862b",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://openstack.example.com/v3/servers/fea9595c-ce6e-4565-987e-2d301fe056ac",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://openstack.example.com/servers/fea9595c-ce6e-4565-987e-2d301fe056ac",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"My Server Name": "Apache1"
|
||||||
|
},
|
||||||
|
"name": "new-server-test",
|
||||||
|
"os-access-ips:access_ip_v4": "4.3.2.1",
|
||||||
|
"os-access-ips:access_ip_v6": "80fe::",
|
||||||
|
"progress": 0,
|
||||||
|
"status": "ACTIVE",
|
||||||
|
"tenant_id": "openstack",
|
||||||
|
"updated": "2013-11-06T08:11:58Z",
|
||||||
|
"user_id": "fake"
|
||||||
|
}
|
||||||
|
}
|
19
doc/v3/api_samples/os-access-ips/server-put-resp.xml
Normal file
19
doc/v3/api_samples/os-access-ips/server-put-resp.xml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<server xmlns:os-access-ips="http://docs.openstack.org/compute/ext/os-access-ips/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" status="ACTIVE" updated="2013-11-06T08:12:00Z" user_id="fake" name="new-server-test" created="2013-11-06T08:11:59Z" tenant_id="openstack" progress="0" host_id="aa49f912ea14b9dd964b461cec1425b206449f316cc629140f0b74df" id="4746f15b-6acc-480c-929f-2989aa9f75e6" os-access-ips:access_ip_v4="4.3.2.1" os-access-ips:access_ip_v6="80fe::">
|
||||||
|
<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/4746f15b-6acc-480c-929f-2989aa9f75e6" rel="self"/>
|
||||||
|
<atom:link href="http://openstack.example.com/servers/4746f15b-6acc-480c-929f-2989aa9f75e6" rel="bookmark"/>
|
||||||
|
</server>
|
59
doc/v3/api_samples/os-access-ips/servers-details-resp.json
Normal file
59
doc/v3/api_samples/os-access-ips/servers-details-resp.json
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
"servers": [
|
||||||
|
{
|
||||||
|
"addresses": {
|
||||||
|
"private": [
|
||||||
|
{
|
||||||
|
"addr": "192.168.0.3",
|
||||||
|
"mac_addr": "aa:bb:cc:dd:ee:ff",
|
||||||
|
"type": "fixed",
|
||||||
|
"version": 4
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"created": "2013-09-11T03:23:11Z",
|
||||||
|
"flavor": {
|
||||||
|
"id": "1",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://openstack.example.com/flavors/1",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"host_id": "9896cb12c9845becf1b9b06c8ff5b131d20300f83e2cdffc92e3f4a4",
|
||||||
|
"id": "934760e1-2b0b-4f9e-a916-eac1e69839dc",
|
||||||
|
"image": {
|
||||||
|
"id": "70a599e0-31e7-49b7-b260-868f441e862b",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://openstack.example.com/v3/servers/934760e1-2b0b-4f9e-a916-eac1e69839dc",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://openstack.example.com/servers/934760e1-2b0b-4f9e-a916-eac1e69839dc",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"My Server Name": "Apache1"
|
||||||
|
},
|
||||||
|
"name": "new-server-test",
|
||||||
|
"os-access-ips:access_ip_v4": "1.2.3.4",
|
||||||
|
"os-access-ips:access_ip_v6": "fe80::",
|
||||||
|
"progress": 0,
|
||||||
|
"status": "ACTIVE",
|
||||||
|
"tenant_id": "openstack",
|
||||||
|
"updated": "2013-09-11T03:23:12Z",
|
||||||
|
"user_id": "fake",
|
||||||
|
"key_name": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
21
doc/v3/api_samples/os-access-ips/servers-details-resp.xml
Normal file
21
doc/v3/api_samples/os-access-ips/servers-details-resp.xml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<servers xmlns:os-access-ips="http://docs.openstack.org/compute/ext/os-access-ips/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-11T03:36:44Z" user_id="fake" name="new-server-test" created="2013-09-11T03:36:43Z" tenant_id="openstack" progress="0" host_id="03772f8ab4d1e3279a58bbf0a24ab4309e0bfa61a84fa649187441cd" id="7140cb40-0181-4cc4-a15c-1e714cfc6de8" os-access-ips:access_ip_v4="1.2.3.4" os-access-ips:access_ip_v6="fe80::" 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/7140cb40-0181-4cc4-a15c-1e714cfc6de8" rel="self"/>
|
||||||
|
<atom:link href="http://openstack.example.com/servers/7140cb40-0181-4cc4-a15c-1e714cfc6de8" rel="bookmark"/>
|
||||||
|
</server>
|
||||||
|
</servers>
|
@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
"server": {
|
||||||
|
"addresses": {
|
||||||
|
"private": [
|
||||||
|
{
|
||||||
|
"addr": "%(ip)s",
|
||||||
|
"version": 4,
|
||||||
|
"mac_addr": "aa:bb:cc:dd:ee:ff",
|
||||||
|
"type": "fixed"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"admin_password": "%(password)s",
|
||||||
|
"created": "%(timestamp)s",
|
||||||
|
"flavor": {
|
||||||
|
"id": "1",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/flavors/1",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"host_id": "%(hostid)s",
|
||||||
|
"id": "%(uuid)s",
|
||||||
|
"image": {
|
||||||
|
"id": "%(image_id)s",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(glance_host)s/images/%(image_id)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/v3/servers/%(uuid)s",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "%(host)s/servers/%(uuid)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"meta_var": "meta_val"
|
||||||
|
},
|
||||||
|
"name": "new-server-test",
|
||||||
|
"progress": 0,
|
||||||
|
"status": "ACTIVE",
|
||||||
|
"tenant_id": "openstack",
|
||||||
|
"updated": "%(timestamp)s",
|
||||||
|
"user_id": "fake",
|
||||||
|
"os-access-ips:access_ip_v4": "%(access_ip_v4)s",
|
||||||
|
"os-access-ips:access_ip_v6": "%(access_ip_v6)s"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<server xmlns="http://docs.openstack.org/compute/api/v1.1"
|
||||||
|
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||||
|
id="%(uuid)s"
|
||||||
|
tenant_id="openstack" user_id="fake"
|
||||||
|
name="new-server-test"
|
||||||
|
host_id="%(hostid)s" progress="0"
|
||||||
|
status="ACTIVE" admin_password="%(password)s"
|
||||||
|
created="%(timestamp)s"
|
||||||
|
updated="%(timestamp)s"
|
||||||
|
xmlns:os-access-ips="http://docs.openstack.org/compute/ext/os-access-ips/api/v3"
|
||||||
|
os-access-ips:access_ip_v4="%(access_ip_v4)s" os-access-ips:access_ip_v6="%(access_ip_v6)s">
|
||||||
|
<image id="%(image_id)s">
|
||||||
|
<atom:link
|
||||||
|
rel="bookmark"
|
||||||
|
href="%(glance_host)s/images/%(image_id)s"/>
|
||||||
|
</image>
|
||||||
|
<flavor id="1">
|
||||||
|
<atom:link
|
||||||
|
rel="bookmark"
|
||||||
|
href="%(host)s/flavors/1"/>
|
||||||
|
</flavor>
|
||||||
|
<metadata>
|
||||||
|
<meta key="meta_var">meta_val</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
|
||||||
|
rel="self"
|
||||||
|
href="%(host)s/v3/servers/%(uuid)s"/>
|
||||||
|
<atom:link
|
||||||
|
rel="bookmark"
|
||||||
|
href="%(host)s/servers/%(uuid)s"/>
|
||||||
|
</server>
|
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"rebuild" : {
|
||||||
|
"os-access-ips:access_ip_v4": "%(access_ip_v4)s",
|
||||||
|
"os-access-ips:access_ip_v6": "%(access_ip_v6)s",
|
||||||
|
"image_ref" : "%(glance_host)s/images/%(image_id)s",
|
||||||
|
"name" : "new-server-test",
|
||||||
|
"metadata" : {
|
||||||
|
"meta_var" : "meta_val"
|
||||||
|
},
|
||||||
|
"personality" : [
|
||||||
|
{
|
||||||
|
"path" : "/etc/banner.txt",
|
||||||
|
"contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6 b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<rebuild
|
||||||
|
xmlns="http://docs.openstack.org/compute/api/v1.1"
|
||||||
|
name="new-server-test"
|
||||||
|
image_ref="%(glance_host)s/images/%(image_id)s"
|
||||||
|
xmlns:os-access-ips="http://docs.openstack.org/compute/ext/os-access-ips/api/v3"
|
||||||
|
os-access-ips:access_ip_v4="%(access_ip_v4)s" os-access-ips:access_ip_v6="%(access_ip_v6)s">
|
||||||
|
<metadata>
|
||||||
|
<meta key="meta_var">meta_val</meta>
|
||||||
|
</metadata>
|
||||||
|
<personality>
|
||||||
|
<file path="/etc/banner.txt">
|
||||||
|
ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
|
||||||
|
dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k
|
||||||
|
IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
|
||||||
|
c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g
|
||||||
|
QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
|
||||||
|
ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv
|
||||||
|
dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
|
||||||
|
c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6
|
||||||
|
b25zLiINCg0KLVJpY2hhcmQgQmFjaA==
|
||||||
|
</file>
|
||||||
|
</personality>
|
||||||
|
</rebuild>
|
@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
"server": {
|
||||||
|
"os-access-ips:access_ip_v4": "%(access_ip_v4)s",
|
||||||
|
"os-access-ips:access_ip_v6": "%(access_ip_v6)s",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"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",
|
||||||
|
"updated": "%(timestamp)s",
|
||||||
|
"user_id": "fake",
|
||||||
|
"key_name": null
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<server xmlns:os-access-ips="http://docs.openstack.org/compute/ext/os-access-ips/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" 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" progress="0" host_id="%(hostid)s" id="%(id)s" os-access-ips:access_ip_v4="%(access_ip_v4)s" os-access-ips:access_ip_v6="%(access_ip_v6)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"/>
|
||||||
|
</server>
|
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"server" : {
|
||||||
|
"os-access-ips:access_ip_v4": "%(access_ip_v4)s",
|
||||||
|
"os-access-ips:access_ip_v6": "%(access_ip_v6)s",
|
||||||
|
"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=="
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<server xmlns:os-access-ips="http://docs.openstack.org/compute/ext/os-access-ips/api/v3" 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" os-access-ips:access_ip_v4="%(access_ip_v4)s" os-access-ips:access_ip_v6="%(access_ip_v6)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>
|
||||||
|
</server>
|
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"server": {
|
||||||
|
"os-access-ips:access_ip_v4": "%(access_ip_v4)s",
|
||||||
|
"os-access-ips:access_ip_v6": "%(access_ip_v6)s",
|
||||||
|
"admin_password": "%(password)s",
|
||||||
|
"id": "%(id)s",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://openstack.example.com/v3/servers/%(uuid)s",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://openstack.example.com/servers/%(uuid)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<server xmlns:os-access-ips="http://docs.openstack.org/compute/ext/os-access-ips/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_password="%(password)s" os-access-ips:access_ip_v4="%(access_ip_v4)s" os-access-ips:access_ip_v6="%(access_ip_v6)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,6 @@
|
|||||||
|
{
|
||||||
|
"server": {
|
||||||
|
"os-access-ips:access_ip_v4": "%(access_ip_v4)s",
|
||||||
|
"os-access-ips:access_ip_v6": "%(access_ip_v6)s"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<server xmlns:os-access-ips="http://docs.openstack.org/compute/ext/os-access-ips/api/v3" xmlns="http://docs.openstack.org/compute/api/v1.1">
|
||||||
|
<os-access-ips:access_ip_v4>%(access_ip_v4)s</os-access-ips:access_ip_v4>
|
||||||
|
<os-access-ips:access_ip_v6>%(access_ip_v6)s</os-access-ips:access_ip_v6>
|
||||||
|
</server>
|
@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"server": {
|
||||||
|
"os-access-ips:access_ip_v4": "%(access_ip_v4)s",
|
||||||
|
"os-access-ips:access_ip_v6": "%(access_ip_v6)s",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"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",
|
||||||
|
"updated": "%(timestamp)s",
|
||||||
|
"user_id": "fake"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<server xmlns:os-access-ips="http://docs.openstack.org/compute/ext/os-access-ips/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" 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" progress="0" host_id="%(hostid)s" id="%(id)s" os-access-ips:access_ip_v4="%(access_ip_v4)s" os-access-ips:access_ip_v6="%(access_ip_v6)s">
|
||||||
|
<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"/>
|
||||||
|
</server>
|
@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
"servers": [
|
||||||
|
{
|
||||||
|
"os-access-ips:access_ip_v4": "%(access_ip_v4)s",
|
||||||
|
"os-access-ips:access_ip_v6": "%(access_ip_v6)s",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/v3/servers/%(uuid)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",
|
||||||
|
"updated": "%(timestamp)s",
|
||||||
|
"user_id": "fake",
|
||||||
|
"key_name": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<servers xmlns:os-access-ips="http://docs.openstack.org/compute/ext/os-access-ips/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" progress="0" id="%(id)s" os-access-ips:access_ip_v4="%(access_ip_v4)s" os-access-ips:access_ip_v6="%(access_ip_v6)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/%(id)s" rel="self"/>
|
||||||
|
<atom:link href="%(host)s/servers/%(id)s" rel="bookmark"/>
|
||||||
|
</server>
|
||||||
|
</servers>
|
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"servers": [
|
||||||
|
{
|
||||||
|
"id": "%(id)s",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/v3/servers/%(id)s",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "%(host)s/servers/%(id)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "new-server-test"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -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="%(id)s">
|
||||||
|
<atom:link href="%(host)s/v3/servers/%(id)s" rel="self"/>
|
||||||
|
<atom:link href="%(host)s/servers/%(id)s" rel="bookmark"/>
|
||||||
|
</server>
|
||||||
|
</servers>
|
98
nova/tests/integrated/v3/test_access_ips.py
Normal file
98
nova/tests/integrated/v3/test_access_ips.py
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
# 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.image import fake
|
||||||
|
from nova.tests.integrated.v3 import api_sample_base
|
||||||
|
|
||||||
|
|
||||||
|
class AccessIPsSampleJsonTest(api_sample_base.ApiSampleTestBaseV3):
|
||||||
|
extension_name = 'os-access-ips'
|
||||||
|
|
||||||
|
def _servers_post(self, subs):
|
||||||
|
response = self._do_post('servers', 'server-post-req', subs)
|
||||||
|
subs.update(self._get_regexes())
|
||||||
|
return self._verify_response('server-post-resp', subs, response, 202)
|
||||||
|
|
||||||
|
def test_servers_post(self):
|
||||||
|
subs = {
|
||||||
|
'image_id': fake.get_valid_image_id(),
|
||||||
|
'host': self._get_host(),
|
||||||
|
'access_ip_v4': '1.2.3.4',
|
||||||
|
'access_ip_v6': 'fe80::'
|
||||||
|
}
|
||||||
|
self._servers_post(subs)
|
||||||
|
|
||||||
|
def test_servers_get(self):
|
||||||
|
subs = {
|
||||||
|
'image_id': fake.get_valid_image_id(),
|
||||||
|
'host': self._get_host(),
|
||||||
|
'access_ip_v4': '1.2.3.4',
|
||||||
|
'access_ip_v6': 'fe80::'
|
||||||
|
}
|
||||||
|
uuid = self._servers_post(subs)
|
||||||
|
response = self._do_get('servers/%s' % uuid)
|
||||||
|
subs['hostid'] = '[a-f0-9]+'
|
||||||
|
subs['id'] = uuid
|
||||||
|
self._verify_response('server-get-resp', subs, response, 200)
|
||||||
|
|
||||||
|
def test_servers_details(self):
|
||||||
|
subs = {
|
||||||
|
'image_id': fake.get_valid_image_id(),
|
||||||
|
'host': self._get_host(),
|
||||||
|
'access_ip_v4': '1.2.3.4',
|
||||||
|
'access_ip_v6': 'fe80::'
|
||||||
|
}
|
||||||
|
uuid = self._servers_post(subs)
|
||||||
|
response = self._do_get('servers/detail')
|
||||||
|
subs['hostid'] = '[a-f0-9]+'
|
||||||
|
subs['id'] = uuid
|
||||||
|
self._verify_response('servers-details-resp', subs, response, 200)
|
||||||
|
|
||||||
|
def test_servers_rebuild(self):
|
||||||
|
subs = {
|
||||||
|
'image_id': fake.get_valid_image_id(),
|
||||||
|
'host': self._get_host(),
|
||||||
|
'access_ip_v4': '1.2.3.4',
|
||||||
|
'access_ip_v6': 'fe80::'
|
||||||
|
}
|
||||||
|
uuid = self._servers_post(subs)
|
||||||
|
subs['access_ip_v4'] = "4.3.2.1"
|
||||||
|
subs['access_ip_v6'] = '80fe::'
|
||||||
|
response = self._do_post('servers/%s/action' % uuid,
|
||||||
|
'server-action-rebuild', subs)
|
||||||
|
subs['hostid'] = '[a-f0-9]+'
|
||||||
|
subs['id'] = uuid
|
||||||
|
self._verify_response('server-action-rebuild-resp',
|
||||||
|
subs, response, 202)
|
||||||
|
|
||||||
|
def test_servers_update(self):
|
||||||
|
subs = {
|
||||||
|
'image_id': fake.get_valid_image_id(),
|
||||||
|
'host': self._get_host(),
|
||||||
|
'access_ip_v4': '1.2.3.4',
|
||||||
|
'access_ip_v6': 'fe80::'
|
||||||
|
}
|
||||||
|
uuid = self._servers_post(subs)
|
||||||
|
subs['access_ip_v4'] = "4.3.2.1"
|
||||||
|
subs['access_ip_v6'] = '80fe::'
|
||||||
|
response = self._do_put('servers/%s' % uuid, 'server-put-req', subs)
|
||||||
|
subs['hostid'] = '[a-f0-9]+'
|
||||||
|
subs['id'] = uuid
|
||||||
|
self._verify_response('server-put-resp', subs, response, 200)
|
||||||
|
|
||||||
|
|
||||||
|
class AccessIPsSampleXmlTest(AccessIPsSampleJsonTest):
|
||||||
|
ctype = 'xml'
|
Loading…
Reference in New Issue
Block a user