From 9e79b8c86585f85168b117530770f0b10c8f1b59 Mon Sep 17 00:00:00 2001 From: Diane Fleming Date: Fri, 28 Feb 2014 11:33:10 -0600 Subject: [PATCH] Add missing "networks" element to the POST /servers call Closes-Bug: #1158691 Change-Id: If17585db9ea3d5556cff6a252f701a298b10b8c0 author: diane fleming --- .../src/v2/api_samples/server-post-req.json | 26 +- .../src/v2/api_samples/server-post-req.xml | 28 ++- .../src/v2/api_samples/server-post-resp.json | 34 +-- .../src/v2/api_samples/server-post-resp.xml | 20 +- .../src/wadls/compute-api/src/v2/common.ent | 235 ++++++++++-------- 5 files changed, 202 insertions(+), 141 deletions(-) diff --git a/api-ref/src/wadls/compute-api/src/v2/api_samples/server-post-req.json b/api-ref/src/wadls/compute-api/src/v2/api_samples/server-post-req.json index 2269848f4..e87ba6cb6 100644 --- a/api-ref/src/wadls/compute-api/src/v2/api_samples/server-post-req.json +++ b/api-ref/src/wadls/compute-api/src/v2/api_samples/server-post-req.json @@ -1,16 +1,14 @@ { - "server": { - "flavorRef": "http://openstack.example.com/openstack/flavors/1", - "imageRef": "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b", - "metadata": { - "My Server Name": "Apache1" - }, - "name": "new-server-test", - "personality": [ - { - "contents": "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVsc2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4gQnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRoZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlvdSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vyc2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6b25zLiINCg0KLVJpY2hhcmQgQmFjaA==", - "path": "/etc/banner.txt" - } - ] - } + "server":{ + "name":"server-test-1", + "imageRef":"b5660a6e-4b46-4be3-9707-6b47221b454f", + "flavorRef":"2", + "max_count":1, + "min_count":1, + "networks":[ + { + "uuid":"d32019d3-bc6e-4319-9c1d-6722fc136a22" + } + ] + } } \ No newline at end of file diff --git a/api-ref/src/wadls/compute-api/src/v2/api_samples/server-post-req.xml b/api-ref/src/wadls/compute-api/src/v2/api_samples/server-post-req.xml index 2dbbb4438..58e1b7a66 100644 --- a/api-ref/src/wadls/compute-api/src/v2/api_samples/server-post-req.xml +++ b/api-ref/src/wadls/compute-api/src/v2/api_samples/server-post-req.xml @@ -1,19 +1,23 @@ - + - Apache1 + API Test Server XML - ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp - dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k - IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs - c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g - QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo - ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv - dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy - c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6 - b25zLiINCg0KLVJpY2hhcmQgQmFjaA== - + ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp + dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k + IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs + c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g + QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo + ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv + dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy + c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6 + b25zLiINCg0KLVJpY2hhcmQgQmFjaA== + + + diff --git a/api-ref/src/wadls/compute-api/src/v2/api_samples/server-post-resp.json b/api-ref/src/wadls/compute-api/src/v2/api_samples/server-post-resp.json index 29ce13717..22e4d0e9f 100644 --- a/api-ref/src/wadls/compute-api/src/v2/api_samples/server-post-resp.json +++ b/api-ref/src/wadls/compute-api/src/v2/api_samples/server-post-resp.json @@ -1,16 +1,22 @@ { - "server": { - "adminPass": "MVk5HPrazHcG", - "id": "5bbcc3c4-1da2-4437-a48a-66f15b1b13f9", - "links": [ - { - "href": "http://openstack.example.com/v2/openstack/servers/5bbcc3c4-1da2-4437-a48a-66f15b1b13f9", - "rel": "self" - }, - { - "href": "http://openstack.example.com/openstack/servers/5bbcc3c4-1da2-4437-a48a-66f15b1b13f9", - "rel": "bookmark" - } - ] - } + "server":{ + "security_groups":[ + { + "name":"default" + } + ], + "OS-DCF:diskConfig":"MANUAL", + "id":"c6d04159-9bfc-4ab8-823d-0d5ca2abe152", + "links":[ + { + "href":"http://166.78.46.130:8774/v2/4fd44f30292945e481c7b8a0c8908869/servers/c6d04159-9bfc-4ab8-823d-0d5ca2abe152", + "rel":"self" + }, + { + "href":"http://166.78.46.130:8774/4fd44f30292945e481c7b8a0c8908869/servers/c6d04159-9bfc-4ab8-823d-0d5ca2abe152", + "rel":"bookmark" + } + ], + "adminPass":"aabbccddeeff" + } } \ No newline at end of file diff --git a/api-ref/src/wadls/compute-api/src/v2/api_samples/server-post-resp.xml b/api-ref/src/wadls/compute-api/src/v2/api_samples/server-post-resp.xml index 9725f33bf..279e228d9 100644 --- a/api-ref/src/wadls/compute-api/src/v2/api_samples/server-post-resp.xml +++ b/api-ref/src/wadls/compute-api/src/v2/api_samples/server-post-resp.xml @@ -1,6 +1,18 @@ - + - - - \ No newline at end of file + + + + + + diff --git a/api-ref/src/wadls/compute-api/src/v2/common.ent b/api-ref/src/wadls/compute-api/src/v2/common.ent index f3806ceaa..10a71b54b 100644 --- a/api-ref/src/wadls/compute-api/src/v2/common.ent +++ b/api-ref/src/wadls/compute-api/src/v2/common.ent @@ -134,103 +134,144 @@ '> - - The name - of the security group. If blank, the server is - created in the "default" security - group. - - - Configuration information or scripts to use - upon launch. Must be Base64 encoded. - - - The - availability zone in which to launch the - server. - - - - server. - - - - - The image reference for the desired image - for your server instance. - Specify as an ID or full - URL. - - - - The flavor reference for the desired flavor - for your server instance. - Specify as an ID or full - URL. - - - - The name for your created - server. - - - - Metadata key and value pairs. The maximum - size of the metadata key and value is 255 - bytes each. - - - - File path and contents (text only) to inject - into the server at launch. The maximum size of - the file path data is 255 bytes. The maximum - limit refers to the number of bytes in the - decoded data and not the number of characters - in the encoded data. - + + The name + of the security group. If blank, the server is + created in the "default" security + group. + + + Configuration information or scripts to use + upon launch. Must be Base64 encoded. + + + The + availability zone in which to launch the + server. + + + + server. + + + + + The image reference for the desired image + for your server instance. + Specify as an ID or full + URL. + + + + The flavor reference for the desired flavor + for your server instance. + Specify as an ID or full + URL. + + + + A networks object. By default, the server + instance is provisioned with all isolated networks for the + tenant. + Optionally, you can create one or more NICs on the + server. + To provision the server instance with a NIC for a + nova-network network, specify the UUID in + the uuid attribute in a networks + object. + To provision the server instance with a NIC for a + neutron network, specify the UUID in the + port attribute in a networks + object. + You can specify multiple NICs on the server. + + + + + To provision the server instance with a NIC for a + nova-network network, specify the UUID in + the uuid attribute in a networks + object. Required if you omit the port + attribute. + + + + + To provision the server instance with a NIC for a + neutron network, specify the UUID in the + port attribute in a networks + object. Required if you omit the uuid + attribute. + + + + + A fixed IPv4 address for the NIC. Valid with a + neutron or nova-networks + network. + + + + + The server name. + + + + Metadata key and value pairs. The maximum + size of the metadata key and value is 255 + bytes each. + + + + File path and contents (text only) to inject + into the server at launch. The maximum size of + the file path data is 255 bytes. The maximum + limit refers to the number of bytes in the + decoded data and not the number of characters + in the encoded data. + '>