pecan: list or get resource with single fields fails

Bug #1590588 reported by Brandon Logan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Brandon Logan

Bug Description

stacking fails with:

$ neutron --os-cloud devstack-admin --os-region RegionOne subnet-create --tenant-id a213c00559414379b3f2848b01bc6544 --ip_version 4 --gateway 10.1.0.1 --name private-subnet 2293ccce-9150-49f0-83b8-f85d2cccdf7c 10.1.0.0/20
'id'

The problem was that the pecan code was handling the case of a single field query parameter being passed in the same way that it handles multiple field query parameter fields being passed.

GET /v2.0/networks?fields=id&fields=name

In pecan that gives us a fields argument that is a list BUT

GET /v2.0/networks?fields=id

gives us just a single string not in a list.

Tags: api
Changed in neutron:
status: New → In Progress
Revision history for this message
Miguel Angel Ajo (mangelajo) wrote :

Hi Brandon, thanks for working on this, can you provide more details? when does it fail with that?

Changed in neutron:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/327394
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=8a6d22ccb53f14a26876a06152b7a3b47ae1a8e1
Submitter: Jenkins
Branch: master

commit 8a6d22ccb53f14a26876a06152b7a3b47ae1a8e1
Author: Brandon Logan <email address hidden>
Date: Wed Jun 8 17:08:40 2016 -0500

    Pecan: handle single fields query parameter

    This also correctly handles the case where no fields are requested which seems
    to have started to break.

    Closes-Bug: #1590588
    Change-Id: Ida1e3ff575c7fe6c3199c5f4393679bbf89c0fe1

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
Brandon Logan (brandon-logan) wrote :

Oh sorry miguel, i didn't see this until just now. The patch got merged, but essentially the problem was that the pecan code was handling the case of a single field query parameter being passed in the same way that it handles multiple field query parameter fields being passed.

GET /v2.0/networks?fields=id&fields=name

In pecan that gives us a fields argument that is a list BUT

GET /v2.0/networks?fields=id

gives us just a single string not in a list.

description: updated
tags: added: neutron-proactive-backport-potential
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/neutron 9.0.0.0b2

This issue was fixed in the openstack/neutron 9.0.0.0b2 development milestone.

Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

pecan, not production ready, not worth a backport.

tags: removed: neutron-proactive-backport-potential
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.