Add pagination filters to 'openstack port list' command.

Bug #1735899 reported by Brooks Kaminski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
New
Undecided
Unassigned

Bug Description

The "Openstack port list" currently does not support the common pagination features available within the Neutron API and NeutronClient.

These options should exist to ensure parity and to support users with a larger amount of ports. Within the Neutron Client this is referred to as --page-size where it limits the connection and continues to page until no further pages exist. Within the API this is simply handled with Marker=/Limit=.

 Unfortunately it appears that the current state of Openstack Client is to just pull the default 100 results and stop. This can be seen as the final item on each return is the same as the final marker item on each default pull from the API, however it does not take the marker and continue to paginate as seen below:

From Openstack Client:

user@host:~ > openstack port list --network d18d2b5e-f79f-480f-8613-b78579c30539 -c ID
+--------------------------------------+
| ID |
+--------------------------------------+
...
...
...
| f186d022-4d9f-40df-ae6c-238fed8ded3a |
+--------------------------------------+

From the Neutron API:

        {
            ....
            .....
            "admin_state_up": true,
            "device_id": "",
            "id": "f186d022-4d9f-40df-ae6c-238fed8ded3a",
            ....
            ....
        }
    ],
    "ports_links": [
        {
            "href": "http://localhost:9696/v2.0/ports?network_id=d18d2b5e-f79f-480f-8613-b78579c30539&marker=f186d022-4d9f-40df-ae6c-238fed8ded3a",
            "rel": "next"
        },
        {
            "href": "http://localhost:9696/v2.0/ports?network_id=d18d2b5e-f79f-480f-8613-b78579c30539&marker=0204a156-f8ee-484e-8648-01c462fe8fce&page_reverse=True",
            "rel": "previous"
        }
    ]
}

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.