[API] POST v1/nodes didn't return incorrect content

Bug #1642379 reported by Lin Yang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Valence
In Progress
High
Lin Yang

Bug Description

According to api-ref, https://github.com/openstack/rsc/blob/master/api-ref/source/mockup/composed-node-create-response.json

when do post to v1/nodes to compose node, api should return following response.

{
  "uuid" : "eeeecccc-dddd-ffff-aaaa-uuuukkkk",
  "name" : "Test-node-1",
  "links" : [
    {
      "rel" : "self",
      "href" : "https://127.0.0.1/v1/nodes/eeeecccc-dddd-ffff-aaaa-uuuukkkk"
    },
    {
      "href" : "https://127.0.0.1/v1/nodes/eeeecccc-dddd-ffff-aaaa-uuuukkkk",
      "rel" : "bookmark"
    }
  ]
}

But current it only return "Location" in response header. For example,

{"node": "https://127.0.0.1:8442/redfish/v1/Nodes/2"}

Lin Yang (lin-a-yang)
Changed in openstack-valence:
assignee: nobody → Lin Yang (lin-a-yang)
milestone: none → ocata-1
importance: Undecided → High
Revision history for this message
Ananth Narayan S (ananth-narayan) wrote :

Lin,
Wondering if the API response needs to be this elaborate. I understand this API response is mimicking OpenStack APIs, but if there are fields that we could simplify, I suggest we could do that.
Thoughts?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to rsc (master)

Fix proposed to branch: master
Review: https://review.openstack.org/398768

Changed in openstack-valence:
status: New → In Progress
Revision history for this message
Lin Yang (lin-a-yang) wrote :

Usually when user create a resource through api, I think it would be better to give back a brief info about the new resource. Otherwise user have to issue another GET request. Make sense?

Because the api spec is critical part for valence, I suggest all of us review the api-ref again before we go any further.

Revision history for this message
chesterkuo (chester-kuo) wrote :

the Response of data defined in the api-ref are common used in the OpenStack component , I will suggest we keep this format and extend if we have others needs.

Second , for the error response if any patch/get/post cmd file , suggest we can follow Openstack,

http://specs.openstack.org/openstack/api-wg/guidelines/errors.html

This is generic one and easy to understand, if we plan to add other Orchestation software plug-in this can be applied also.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on valence (master)

Change abandoned by Lin Yang (<email address hidden>) on branch: master
Review: https://review.openstack.org/398768
Reason: This has been fixed in another patch.

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.