From ec31bcfc581783278aa2ca411aa211e27f29c938 Mon Sep 17 00:00:00 2001 From: Robert Kukura Date: Fri, 18 Apr 2014 11:05:40 -0400 Subject: [PATCH] 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 --- specs/template.rst | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/specs/template.rst b/specs/template.rst index 288d4a23b..163e7c914 100644 --- a/specs/template.rst +++ b/specs/template.rst @@ -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