Passing portgroup_uuid in POST /ports silently ignored in old api versions

Bug #1646120 reported by Vladyslav Drok on 2016-11-30
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
In Progress
Medium
Vladyslav Drok

Bug Description

As can be seen in the test in https://review.openstack.org/#/c/360647/25/ironic/tests/unit/api/v1/test_ports.py@958 , we don't handle passing portgroup_uuid in older api microversions properly. https://github.com/openstack/ironic/blob/dd57ed5a2d2c42abc72ac13ce7eb491c27b7468a/ironic/api/controllers/v1/port.py#L95-L97 just ignores portgroup_uuid value, as this method is used to reply to old GET requests too, this bit is needed to hide portgroup from the port. But in case of POST requests, the check https://github.com/openstack/ironic/blob/dd57ed5a2d2c42abc72ac13ce7eb491c27b7468a/ironic/api/controllers/v1/port.py#L507-L508 is not triggered as the created api object does not contain portgroup_uuid. We need to check the request body instead.

Vladyslav Drok (vdrok) on 2016-11-30
Changed in ironic:
assignee: nobody → Vladyslav Drok (vdrok)

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

Changed in ironic:
status: New → In Progress
Changed in ironic:
importance: Undecided → Medium

Change abandoned by Riccardo Pittau (<email address hidden>) on branch: master
Review: https://review.opendev.org/404839
Reason: inactivity

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers