Feature #3768

Cyclades changes for compatibility with OS/Compute v2

Added by Christos Stavrakakis over 8 years ago. Updated about 8 years ago.

Status:Closed Start date:05/20/2013
Priority:High Due date:
Assignee:Christos Stavrakakis % Done:

100%

Category:Cyclades API Spent time: -
Target version:0.14.0

Description

Change Cyclades to be compatible with:

1. Adjust "meta" and "metadata" terms URIs
-2. Adjust "meta" and "metadata" terms
JSON request and response bodies-
3. Omit "values" term JSON request and response bodies
4. Rename some terms
JSON response bodies

1. Adjust "meta" and "metadata" terms @ URIs
---------------------------------------------------------------

OS/Compute v2 uses the term "metadata" on all service URIs.

Affected Cyclades URIs:

/servers/<server-id>/meta
/servers/<server-id>/meta/<key>
/images/<image-id>/meta
/images/<image-id>/meta/<key>

.. note:: Syntactically, both Cyclades and OS/Compute-v2 have a [/flavors GET] but [/flavors/details GET] is unique in Cyclades. Semantically, [/flavors/details GET] is semantically equivalent to OS/Comptute-v2 [/flavors GET], but the semantic equivalent of Cyclades [/flavors GET] does not exist in OS/Compute-v2.

2. Adjust "meta" and "metadata" terms @ JSON request and response bodies

No compatibility issues here.

3. Omit "values" term @ JSON request and response bodies

The term "values" is omitted in OS/Compute v2 JSON bodies, e.g.

Cyclades: {"servers": {"values":  [{..vm 1..}, {..vm 2..}, ...]}}
OS/Compute v2: {"servers": [{..vm 1..}, {..vm 2..}, ...]}

Cyclades "values" occurrences:

- /servers[/details] GET response:
     * {"servers": {"values" ...
     * {"servers": {"values": [ {"attachments": {"values" ...
     * {"servers": {"values": [ {"metadata": {"values" ...
- /servers POST request: * {"server": {"metadata": { "values" ...
- /servers POST response: * {"server": {"metadata": { "values" ... * {"server": {attachments": { "values" ...
- /servers/<server-id> GET response: * {"server": "attachments": {"values" ... * {"server": {"metadata": {"values" ...
- /servers/<server id>/ips GET response: * {"addresses"" {"values" ...
- /servers/<server-id>/meta[data] GET response: * {"metadata": {"values" ...
- /flavors[/detail] GET response: * {"flavors": {"values" ...
- /images/[/detail] GET response: * {"images": {"values" ... * {"images": {"values": [ {"metadata": {"values" ...
- /images/<image-id> GET response: * {"image": {"metadata": {"values" ...
- /images/<image-id>/meta[data] GET * {"metadata": {"values" ...
- /networks[/detail] GET response: * {"networks": {"values" ...

4. Rename some terms @ JSON response bodies

Renames:

flavorRef --> flavor
imageRef --> image

Locations where the renames should be applied:

- /servers[/details] GET response body
- /servers POST response body
- /servers/<id> GET response body


Related issues

blocks Synnefo - Feature #3767: Changes for compatibility with OS/Compute v2 Closed 05/20/2013

Associated revisions

Revision 8f6883bb
Added by Christos Stavrakakis over 8 years ago

cyclades: Rename 'cpu' to 'vcpus' to flavor API

Rename attribute of GET /flavors response, from 'cpu' to 'vcpus'.

Refs #3768

Revision 3ce3de46
Added by Christos Stavrakakis over 8 years ago

cyclades: Update tests

Update tests to use OpenStack Compute API v2.

Refs #3768

Revision 9aa42d8d
Added by Christos Stavrakakis over 8 years ago

cyclades: Remove 'Ref' suffix from servers API

Rename 'flavorRef' to 'flavor' and 'imageRef' to 'image', to responses of
/servers API. 'flavorRef' and 'imageRef' are still preserved to to request
parameters of POST /servers.

Refs #3768

Revision 50ce7084
Added by Christos Stavrakakis over 8 years ago

cyclades: Remove "values" term from API

For compatibility with OpenStack Compute API v2, we remove the
term 'values' from all JSON requests and responses.

Refs #3768

Revision 2245200f
Added by Christos Stavrakakis over 8 years ago

cyclades: Rename meta to metadata at Cyclades URLs

For compatibility with OpenStack Compute API v2, rename 'meta' to
'metadata' to Cyclades API URLs. Specifically, to the following ones:

  • /servers/<server-id>/meta
  • /servers/<server-id>/meta/<key>
  • /images/<image-id>/meta
  • /images/<image-id>/meta/<key>

Refs #3768

Revision 1489e9b1
Added by Kostas Papadimitriou over 8 years ago

cyclades ui: Revert server create params names

the new api changed image/flavor keys only in servers response.
imageRef and flavorRef are still required in server create requests
(makes sense)

Refs: #3768

Revision d5fd0d3c
Added by Kostas Papadimitriou over 8 years ago

cyclades ui: Update metadata post/delete url

the updated api uses /metadata/ instead of /meta/

Refs: #3768

Revision d63606c8
Added by Kostas Papadimitriou over 8 years ago

cyclades ui: Revert glance response parsing

Refs: #3768

Revision 45e274fc
Added by Stavros Sachtouris over 8 years ago

Document cyclades-api changes to fit OS API v2

Rename attribute of GET /flavors response, from 'cpu' to 'vcpus'.
Catholicaly remove "values" term from requests and responses
cyclades: Rename meta to metadata at Cyclades URLs: * /servers/<server-id>/meta * /servers/<server-id>/meta/<key> * /images/<image-id>/meta * /images/<image-id>/meta/<key>

Refs: #3768

Revision a333c901
Added by Christos Stavrakakis over 8 years ago

cyclades: Rename 'cpu' to 'vcpus' to flavor API

Rename attribute of GET /flavors response, from 'cpu' to 'vcpus'.

Refs #3768

Revision 2d04422f
Added by Christos Stavrakakis over 8 years ago

cyclades: Update tests

Update tests to use OpenStack Compute API v2.

Refs #3768

Revision e13aeb09
Added by Christos Stavrakakis over 8 years ago

cyclades: Remove 'Ref' suffix from servers API

Rename 'flavorRef' to 'flavor' and 'imageRef' to 'image', to responses of
/servers API. 'flavorRef' and 'imageRef' are still preserved to to request
parameters of POST /servers.

Refs #3768

Revision 5029ff36
Added by Christos Stavrakakis over 8 years ago

cyclades: Remove "values" term from API

For compatibility with OpenStack Compute API v2, we remove the
term 'values' from all JSON requests and responses.

Refs #3768

Revision 8a992938
Added by Christos Stavrakakis over 8 years ago

cyclades: Rename meta to metadata at Cyclades URLs

For compatibility with OpenStack Compute API v2, rename 'meta' to
'metadata' to Cyclades API URLs. Specifically, to the following ones:

  • /servers/<server-id>/meta
  • /servers/<server-id>/meta/<key>
  • /images/<image-id>/meta
  • /images/<image-id>/meta/<key>

Refs #3768

History

#1 Updated by Stavros Sachtouris over 8 years ago

2nd compatibility issue (2. Adjust "meta" and "metadata" terms @ JSON request and response bodies) is incorrectly reported as such.

#2 Updated by Christos Stavrakakis over 8 years ago

  • Status changed from Assigned to Feedback
  • % Done changed from 0 to 100

Suggested changes revised:

1. Adjust "meta" and "metadata" terms URIs
2. Omit "values" term
JSON request and response bodies
3. Rename some terms @ JSON response bodies

1. Adjust "meta" and "metadata" terms @ URIs
--------------------------------------------

OS/Compute v2 uses the term "metadata" on all service URIs.

Affected Cyclades URIs:

/servers/&lt;server-id&gt;/meta
/servers/&lt;server-id&gt;/meta/&lt;key&gt;
/images/&lt;image-id&gt;/meta
/images/&lt;image-id&gt;/meta/&lt;key&gt;

3. Omit "values" term @ JSON request and response bodies
--------------------------------------------------------

The term "values" is omitted in OS/Compute v2 JSON bodies, e.g.

Cyclades: {"servers": {"values":  [{..vm 1..}, {..vm 2..}, ...]}}
OS/Compute v2: {"servers": [{..vm 1..}, {..vm 2..}, ...]}

Cyclades "values" occurrences:

- /servers[/details] GET response:
     * {"servers": {"values" ...
     * {"servers": {"values": [ {"attachments": {"values" ...
     * {"servers": {"values": [ {"metadata": {"values" ...
- /servers POST request: * {"server": {"metadata": { "values" ...
- /servers POST response: * {"server": {"metadata": { "values" ... * {"server": {attachments": { "values" ...
- /servers/&lt;server-id&gt; GET response: * {"server": "attachments": {"values" ... * {"server": {"metadata": {"values" ...
- /servers/&lt;server id&gt;/ips GET response: * {"addresses"" {"values" ...
- /servers/&lt;server-id&gt;/meta[data] GET response: * {"metadata": {"values" ...
- /flavors[/detail] GET response: * {"flavors": {"values" ...
- /images/[/detail] GET response: * {"images": {"values" ... * {"images": {"values": [ {"metadata": {"values" ...
- /images/&lt;image-id&gt; GET response: * {"image": {"metadata": {"values" ...
- /images/&lt;image-id&gt;/meta[data] GET * {"metadata": {"values" ...
- /networks[/detail] GET response: * {"networks": {"values" ... * {"networks: [ {"attachments": {"values"..}..
- /versions

3. Rename some terms @ JSON response bodies
-------------------------------------------

Renames:

flavorRef --> flavor
imageRef --> image

Locations where the renames should be applied:

- /servers[/details] GET response body
- /servers POST response body (note: request body is already compatible)
- /servers/<id> GET response body

Renames:
cpus --> vcpus

#3 Updated by Christos Stavrakakis about 8 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF