cinder list endpoints results in parsing error

Bug #1608166 reported by Steve Martinelli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-cinderclient
Fix Released
Undecided
Steve Martinelli

Bug Description

the functional tests for cinderclient are failing: http://logs.openstack.org/67/348667/1/check/gate-cinderclient-dsvm-functional/781870c/testr_results.html.gz

this is due to the recent keystoneauth migration, and cinderclient's assumption of what the service catalog should always look a certain way with a top level 'serviceCatalog' key, which is v2.0 only, whereas in v3, there is a 'catalog' key.

def do_endpoints(cs, args):
    """Discovers endpoints registered by authentication service."""
    catalog = cs.client.service_catalog.catalog
    for e in catalog['serviceCatalog']:
        utils.print_dict(e['endpoints'][0], e['name'])

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

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

Changed in python-cinderclient:
assignee: nobody → Steve Martinelli (stevemar)
status: New → In Progress
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-cinderclient (master)

Reviewed: https://review.openstack.org/349221
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=f66b0d57d123941c46a6c27721a513927a7c6490
Submitter: Jenkins
Branch: master

commit f66b0d57d123941c46a6c27721a513927a7c6490
Author: Steve Martinelli <email address hidden>
Date: Sat Jul 30 20:54:23 2016 -0700

    print endpoints using new keystoneauth catalog object

    cinderclient was assuming an identity v2 styled service catalog
    would always be returned (when using `cinder endpoints`).

    keystoneclient would return either a v2 or v3 styled catalog,
    whereas keystoneauth abstracts out the differences and handles
    them internally. the result is that there is no need to look
    for specific ['serviceCatalog'] or ['catalog'] keys in the
    dictionary returned from keystoneauth.

    it should be noted that perhaps cinderclient should deprecate
    the ability to list endpoints since that is mostly an identity
    and admin level operation, and likely an artifact from early
    openstack days, it should now be handled by openstackclient.
    further, it's not clear whether the command is meant to list all
    endpoints or just the endpoints in the user's token (which it does
    now).

    Change-Id: Ibfcccedee5baf43f5b5c517d37e3f046c8743078
    Closes-Bug: 1608166

Changed in python-cinderclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to python-cinderclient (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/349602

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to python-cinderclient (master)

Reviewed: https://review.openstack.org/349602
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=7a566e69151ba30831a47966450f81ae085c91ff
Submitter: Jenkins
Branch: master

commit 7a566e69151ba30831a47966450f81ae085c91ff
Author: Steve Martinelli <email address hidden>
Date: Mon Aug 1 13:01:17 2016 -0400

    deprecate command `cinder endpoints`

    The command `cinder endpoints` will now print a warning message,
    indicating that users should use openstackclient instead.
    This has already been done in nova's CLI [1].

    Related-Bug: 1608166

    [1] https://github.com/openstack/python-novaclient/blob/master/novaclient/v2/shell.py#L4071-L4072

    Change-Id: If68b40cf8116aa0ec386d8067c58703cb7b7c0da

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-cinderclient 1.9.0

This issue was fixed in the openstack/python-cinderclient 1.9.0 release.

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.