Plan API should return json/yaml as accept header specifies

Bug #1331093 reported by Noorul Islam K M
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Solum
Fix Released
Critical
Pierre Padrixe (stannie)

Bug Description

This [1] patch actually changed the behavior of plan related APIs to return YAML instead of JSON.

Here [2] is the conversation on IRC in which we agreed that it should be JSON by default.

[1] https://review.openstack.org/#/c/96804/
[2] https://botbot.me/freenode/solum/2014-06-17/?msg=16426161&page=1

Adrian Otto (aotto)
Changed in solum:
status: New → Triaged
importance: Undecided → Critical
assignee: nobody → Pierre Padrixe (stannie) (pierre-padrixe)
milestone: none → juno-2
Revision history for this message
Pierre Padrixe (stannie) (pierre-padrixe) wrote :

I don't agree with the title of this bug: "API should always return json" is not appropriated IMO.
If you POST a Plan in YAML format you should be able to GET your template in YAML format.

And that's really weird to POST a Plan in YAML and then get a JSON in the response body of the post.

Specifying the format (YAML or JSON) in Accept-Type header and return the appropriate format in response would be a more appropriate solution

Revision history for this message
Angus Salkeld (asalkeld) wrote : Re: Plan API should return json/yaml as content_type specifies

Pierre, I agree. I updated the title.

summary: - API should always return json
+ Plan API should return json/yaml as content_type specifies
summary: - Plan API should return json/yaml as content_type specifies
+ Plan API should return json/yaml as accept header specifies
Revision history for this message
Noorul Islam K M (noorul) wrote :

Angus, thank you for updating the summary. It is better now.

tags: added: plan-improvements-versionning-and-yaml-support
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to solum (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/115684

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Related fix proposed to branch: master
Review: https://review.openstack.org/115685

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Related fix proposed to branch: master
Review: https://review.openstack.org/115686

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Related fix proposed to branch: master
Review: https://review.openstack.org/115687

Changed in solum:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to solum (master)

Reviewed: https://review.openstack.org/115685
Committed: https://git.openstack.org/cgit/stackforge/solum/commit/?id=db9e67a319b8cf68ae6114925c74a4b6c472d56e
Submitter: Jenkins
Branch: master

commit db9e67a319b8cf68ae6114925c74a4b6c472d56e
Author: Pierre Padrixe <email address hidden>
Date: Mon Sep 15 16:44:57 2014 +0200

    Add accept json/yaml for GET /plans

    Change-Id: I984d745494b629f2ebab92b68c222f74ddab3b63
    Partially Implements: blueprint spec/plan-improvements-versionning-and-yaml-support
    Related-Bug: #1331093

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/115684
Committed: https://git.openstack.org/cgit/stackforge/solum/commit/?id=9d9ba8ce372c28d38ac9dd4854dc52e0a40fb5a1
Submitter: Jenkins
Branch: master

commit 9d9ba8ce372c28d38ac9dd4854dc52e0a40fb5a1
Author: Pierre Padrixe <email address hidden>
Date: Wed Aug 27 14:04:22 2014 +0200

    Add accept json/yaml for GET /plan/:id

    Change-Id: I7b6b01f7009c8d35a49b01a89c8ccc569ea2844e
    Partially Implements: blueprint spec/plan-improvements-versionning-and-yaml-support
    Related-Bug: #1331093

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/115686
Committed: https://git.openstack.org/cgit/stackforge/solum/commit/?id=39af9b19cdf4780a7abd7aa39941bca50fb00281
Submitter: Jenkins
Branch: master

commit 39af9b19cdf4780a7abd7aa39941bca50fb00281
Author: Pierre Padrixe <email address hidden>
Date: Thu Jul 3 17:42:03 2014 +0200

    Add content-type json/yaml for POST /plans

    Change-Id: Ife1fe8f3a7c5faff3b6c34421f6c5729ccc51ea0
    Partially Implements: blueprint spec/plan-improvements-versionning-and-yaml-support
    Related-Bug: #1331093

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/115687
Committed: https://git.openstack.org/cgit/stackforge/solum/commit/?id=6cb955b2a8e407dc0c9c019285f8ff73c58a1d16
Submitter: Jenkins
Branch: master

commit 6cb955b2a8e407dc0c9c019285f8ff73c58a1d16
Author: Pierre Padrixe <email address hidden>
Date: Thu Jul 3 17:42:20 2014 +0200

    Add content-type json/yaml for PUT /plan/:id

    Partially Implements: blueprint spec/plan-improvements-versionning-and-yaml-support
    Related-Bug: #1331093

    Change-Id: I1f872c11386a0347a77342ddb34f8db23a4da304

Adrian Otto (aotto)
Changed in solum:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.