Add UUID in API model

The only way we have currently to find the id of a ressource when
querying the API (for instance GET /v1/plans) is to parse the uri
field of the json object we get as a result

This patch simply add the uuid field to the api model.

It also disable the possibility for someone to specify its own
uuid when creating an object and fix a bug in fakes.py (comma at
the end of line) that was causing tests failures in this patch

Change-Id: Ie38fc2646b2d7e2cc146dc34382c2c841af0fa33
This commit is contained in:
Julien Vey
2014-02-28 17:33:15 +01:00
parent ca9bb8ee2d
commit c1e770d776
12 changed files with 24 additions and 11 deletions

View File

@@ -24,6 +24,9 @@ class Base(wtypes.Base):
uri = common_types.Uri
"URI to the resource."
uuid = wtypes.text
"Unique Identifier of the resource"
name = wtypes.text
"Name of the resource."