Adds V3 API samples for attach-interfaces
Adds api sample tests and api samples for attach interfaces Partially implements blueprint v3-api-unittests Partially implements blueprint v3-api-specification Change-Id: I54088cca1b83a8b92620062840606f2340a528c9
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"interface_attachment": {
|
||||
"port_id": "ce531f90-199f-48c0-816c-13e38010b442"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface_attachment>
|
||||
<port_id>ce531f90-199f-48c0-816c-13e38010b442</port_id>
|
||||
</interface_attachment>
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"interface_attachment": {
|
||||
"fixed_ips": [
|
||||
{
|
||||
"ip_address": "192.168.1.3",
|
||||
"subnet_id": "f8a6e8f8-c2ec-497c-9f23-da9616de54ef"
|
||||
}
|
||||
],
|
||||
"mac_addr": "fa:16:3e:4c:2c:30",
|
||||
"net_id": "3cb9bc59-5699-4588-a4b1-b87f96708bc6",
|
||||
"port_id": "ce531f90-199f-48c0-816c-13e38010b442",
|
||||
"port_state": "ACTIVE"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<interface_attachment>
|
||||
<port_state>ACTIVE</port_state>
|
||||
<fixed_ips>
|
||||
<fixed_ip>
|
||||
<subnet_id>f8a6e8f8-c2ec-497c-9f23-da9616de54ef</subnet_id>
|
||||
<ip_address>192.168.1.3</ip_address>
|
||||
</fixed_ip>
|
||||
</fixed_ips>
|
||||
<port_id>ce531f90-199f-48c0-816c-13e38010b442</port_id>
|
||||
<net_id>3cb9bc59-5699-4588-a4b1-b87f96708bc6</net_id>
|
||||
<mac_addr>fa:16:3e:4c:2c:30</mac_addr>
|
||||
</interface_attachment>
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"interface_attachments": [
|
||||
{
|
||||
"fixed_ips": [
|
||||
{
|
||||
"ip_address": "192.168.1.3",
|
||||
"subnet_id": "f8a6e8f8-c2ec-497c-9f23-da9616de54ef"
|
||||
}
|
||||
],
|
||||
"mac_addr": "fa:16:3e:4c:2c:30",
|
||||
"net_id": "3cb9bc59-5699-4588-a4b1-b87f96708bc6",
|
||||
"port_id": "ce531f90-199f-48c0-816c-13e38010b442",
|
||||
"port_state": "ACTIVE"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<interface_attachments>
|
||||
<interface_attachment>
|
||||
<port_state>ACTIVE</port_state>
|
||||
<fixed_ips>
|
||||
<fixed_ip>
|
||||
<subnet_id>f8a6e8f8-c2ec-497c-9f23-da9616de54ef</subnet_id>
|
||||
<ip_address>192.168.1.3</ip_address>
|
||||
</fixed_ip>
|
||||
</fixed_ips>
|
||||
<port_id>ce531f90-199f-48c0-816c-13e38010b442</port_id>
|
||||
<net_id>3cb9bc59-5699-4588-a4b1-b87f96708bc6</net_id>
|
||||
<mac_addr>fa:16:3e:4c:2c:30</mac_addr>
|
||||
</interface_attachment>
|
||||
</interface_attachments>
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"interface_attachment": {
|
||||
"fixed_ips": [
|
||||
{
|
||||
"ip_address": "192.168.1.3",
|
||||
"subnet_id": "f8a6e8f8-c2ec-497c-9f23-da9616de54ef"
|
||||
}
|
||||
],
|
||||
"mac_addr": "fa:16:3e:4c:2c:30",
|
||||
"net_id": "3cb9bc59-5699-4588-a4b1-b87f96708bc6",
|
||||
"port_id": "ce531f90-199f-48c0-816c-13e38010b442",
|
||||
"port_state": "ACTIVE"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<interface_attachment>
|
||||
<port_state>ACTIVE</port_state>
|
||||
<fixed_ips>
|
||||
<fixed_ip>
|
||||
<subnet_id>f8a6e8f8-c2ec-497c-9f23-da9616de54ef</subnet_id>
|
||||
<ip_address>192.168.1.3</ip_address>
|
||||
</fixed_ip>
|
||||
</fixed_ips>
|
||||
<port_id>ce531f90-199f-48c0-816c-13e38010b442</port_id>
|
||||
<net_id>3cb9bc59-5699-4588-a4b1-b87f96708bc6</net_id>
|
||||
<mac_addr>fa:16:3e:4c:2c:30</mac_addr>
|
||||
</interface_attachment>
|
||||
16
doc/v3/api_samples/os-attach-interfaces/server-post-req.json
Normal file
16
doc/v3/api_samples/os-attach-interfaces/server-post-req.json
Normal 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=="
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
19
doc/v3/api_samples/os-attach-interfaces/server-post-req.xml
Normal file
19
doc/v3/api_samples/os-attach-interfaces/server-post-req.xml
Normal 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>
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"server": {
|
||||
"admin_pass": "fjPxt8d8YcSR",
|
||||
"id": "c937be78-c423-495b-a99a-e590ab6f30ba",
|
||||
"links": [
|
||||
{
|
||||
"href": "http://openstack.example.com/v3/servers/c937be78-c423-495b-a99a-e590ab6f30ba",
|
||||
"rel": "self"
|
||||
},
|
||||
{
|
||||
"href": "http://openstack.example.com/servers/c937be78-c423-495b-a99a-e590ab6f30ba",
|
||||
"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="df8ced02-6e8e-447f-817e-eed7b4546931" admin_pass="h2kBdURmTqv4">
|
||||
<metadata/>
|
||||
<atom:link href="http://openstack.example.com/v3/servers/df8ced02-6e8e-447f-817e-eed7b4546931" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/servers/df8ced02-6e8e-447f-817e-eed7b4546931" rel="bookmark"/>
|
||||
</server>
|
||||
Reference in New Issue
Block a user