Allow defining REST API with attribute tables

When Neutron APIs are implemented using its declarative attribute map
facility, allow specification of REST resource APIs in terms of those
attributes. An example table format is included in template.rst.

Change-Id: I16aa17e847295839985cd0dec1264c8f6132dcfc
This commit is contained in:
Robert Kukura 2014-04-18 11:05:40 -04:00
parent 03ec632b72
commit ec31bcfc58
1 changed files with 24 additions and 1 deletions

View File

@ -159,7 +159,30 @@ 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 specify the name, type, and other essential details of
each new or modified attribute. A table similar to the following may
be used:
+----------+-------+---------+---------+------------+--------------+
|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