Allow defining REST API with attribute tables

When Neutron APIs are implemented using its declarative attribute map
facility, REST resource APIs can be sufficiently described with a
simple table defining their attributes.

Change-Id: I16aa17e847295839985cd0dec1264c8f6132dcfc
This commit is contained in:
Robert Kukura 2014-04-18 11:05:40 -04:00
parent d76bec4015
commit 765251c0ea
1 changed files with 23 additions and 1 deletions

View File

@ -91,7 +91,29 @@ Questions which need to be addressed by this section include:
REST API impact
---------------
Each API method which is either added or changed should have the following
For each API resource to be implemented using Neutron's attribute map
facility (see the neutron.api.v2.attributes), describe the resource
collection and include a table similar to the following describing the
new or modified attributes:
+----------+-------+---------+---------+------------+--------------+
|Attribute |Type |Access |Default |Validation/ |Description |
|Name | | |Value |Conversion | |
+==========+=======+=========+=========+============+==============+
|id |string |RO, all |generated|N/A |identity |
| |(UUID) | | | | |
+----------+-------+---------+---------+------------+--------------+
|name |string |RW, all |'' |string |human-readable|
| | | | | |name |
+----------+-------+---------+---------+------------+--------------+
|color |string |RW, admin|'red' |'red', |color |
| | | | |'yellow', or|indicating |
| | | | |'green' |state |
+----------+-------+---------+---------+------------+--------------+
Each API method which is either added or changed that does not use
Neutron's attribute map facility should have the following:
* Specification for the method