Inconsistent params names in the API

Bug #1259619 reported by Lucas Alvares Gomes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Low
Imre Farkas

Bug Description

There's many methods on the API that is suppose to receive the UUID of that resource (Nodes, Chassis or Ports), in the moment there's no consistent with the name of those paremeters and it's bad for the auto generated documentation.

For e.g in the v1/node.py[1] file:

Some methods use 'node_id' and some others use 'uuid', the latter is even worst because conflicts with the name of the uuid stdlib.

So this should be fixed, I suggest using "*_uuid" (eg node_uuid, chassis_uuid or port_uuid) for all those parameters since our API should only accept UUIDs (numeric IDs are internal only)

[1] https://github.com/openstack/ironic/blob/master/ironic/api/controllers/v1/node.py

Changed in ironic:
milestone: none → icehouse-2
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
importance: Undecided → Low
assignee: Lucas Alvares Gomes (lucasagomes) → Imre Farkas (ifarkas)
description: updated
aeva black (tenbrae)
Changed in ironic:
status: New → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

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

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

Reviewed: https://review.openstack.org/64684
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=8ab07022fe5870e7c67c02a3571d3191e9bc4f41
Submitter: Jenkins
Branch: master

commit 8ab07022fe5870e7c67c02a3571d3191e9bc4f41
Author: Imre Farkas <email address hidden>
Date: Thu Jan 2 15:12:19 2014 +0100

    Make param names more consistent in API

    Param names for resource ids were inconsistent in the API. This patch
    converts them to *_uuid form.

    Closes-Bug: #1259619
    Change-Id: Icb6cb1f9ebab7c9d516ec297eeee6f2db8b52eb2

Changed in ironic:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ironic:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: icehouse-2 → 2014.1
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.