Filtering of port list by fixed-ip doesn't work

Bug #1712527 reported by Dr. Jens Harbott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack SDK
Fix Released
Undecided
Dr. Jens Harbott
python-openstackclient
Invalid
Undecided
Unassigned

Bug Description

The recently added option to filter the port list output does not work for me. The following commands all produce identical output, even when there are ports with different addresses and subnets:

- openstack port list
- openstack port list --fixed-ip subnet=<valid subnet id>
- openstack port list --fixed-ip ip-address=<any ip>
- openstack port list --fixed-ip subnet=<valid subnet id>,ip-address=<any ip>

I do get an error when I specify a non-existing subnet id.

openstack --version: openstack 3.12.0
The cloud I am testing against is based on Ocata.

Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

So it seems like the patch introduced in https://review.openstack.org/388575 is incomplete, it needs a matching patch in openstacksdk in order to allow filtering by fixed_ips there.

Also the tests in that patch are bogus, they in fact verify exactly the behaviour described above.

Changed in python-openstacksdk:
assignee: nobody → Dr. Jens Harbott (j-harbott)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstacksdk (master)

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

Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

With that patch in openstacksdk, filtering is working as expected for me, but I fear that it will break unit tests for osc because they are confirming the non-filtered scenario.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstacksdk (master)

Reviewed: https://review.openstack.org/497228
Committed: https://git.openstack.org/cgit/openstack/python-openstacksdk/commit/?id=c9028ee6cf4e6cc5f439a35c7f3c36e71c15eeb3
Submitter: Jenkins
Branch: master

commit c9028ee6cf4e6cc5f439a35c7f3c36e71c15eeb3
Author: Jens Harbott <email address hidden>
Date: Thu Aug 24 12:28:51 2017 +0000

    Allow filtering network ports by fixed_ips

    The patch in [1] introduced filtering network ports by fixed-ip in the
    openstackclient, but it doesn't really work because the filter isn't
    accepted in the sdk.

    Add that option and add an unit test for the filter list.

    [1] https://review.openstack.org/388575

    Change-Id: I6cbb7f1aaff8ad12234f68ddb3fe564c556ece54
    Closes-Bug: 1712527

Changed in python-openstacksdk:
status: In Progress → Fix Released
Changed in python-openstackclient:
status: New → Invalid
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.