--long option breaks in router list if availability_zone ext is not loaded

Bug #1622565 reported by Fernando Jalon on 2016-09-12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fix Released

Bug Description

when calling router list with --long OSC expects the availability_zone field in the response, even if this extension is not loaded:


In /usr/lib/python2.7/site-packages/openstackclient/network/v2/router.py if --long is called it's trying to parse availability_zones field:

    def take_action(self, parsed_args):
        client = self.app.client_manager.network

        columns = (
        column_headers = (
        if parsed_args.long:
            columns = columns + (
            column_headers = column_headers + (
                'External gateway info',
                'Availability zones'

        data = client.routers()
        return (column_headers,
                    s, columns,
                ) for s in data))


Seen also with OSC 2.6.0

description: updated
Richard Theis (rtheis) on 2016-09-12
tags: added: network
Ukesh (ukeshkumar) on 2016-09-12
Changed in python-openstackclient:
assignee: nobody → Ukesh (ukeshkumar)

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

Changed in python-openstackclient:
status: New → In Progress

Reviewed: https://review.openstack.org/370574
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=e04e389da2e9d8ec96398356ceda2ab2388cdad5
Submitter: Jenkins
Branch: master

commit e04e389da2e9d8ec96398356ceda2ab2388cdad5
Author: Ukesh Kumar Vasudevan <email address hidden>
Date: Thu Sep 15 12:51:23 2016 +0530

    router list if availability_zone ext not enabled

    when calling router list with --long OSC expects the availability_zone
    field in the response, even if this extension is not loaded:

    As per the document, http://developer.openstack.org/api-ref/networking/
    v2/?expanded=list-routers-detail, The availability zone(s) for the router
    is available when router_availability_zone extension is enabled.

    Added testcase to test router list without availability zone

    Change-Id: Ic9abb06140eb310b797ade8b0463a876d8bea1b8
    Closes-bug: #1622565

Changed in python-openstackclient:
status: In Progress → Fix Released

This issue was fixed in the openstack/python-openstackclient 3.3.0 release.

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

Other bug subscribers