neutronclient can't parse keystone v3 endpoints correctly

Bug #1295056 reported by Yaguang Tang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-neutronclient
Fix Released
High
Yaguang Tang

Bug Description

V3 service catalog:

 [{u'endpoints': [{u'id': u'6c205a937fc94cd89ef6d25804631742',
                  u'interface': u'internal',
                  u'legacy_endpoint_id': u'52d0fe4693094e29a1f3737aa6a74024',
                  u'region': u'RegionOne',
                  u'url': u'http://10.9.1.147:8776/v1/e7a9800dba03489ca2716ab03226a277'},
                  {u'id': u'c289637b673643b69565a04ed1561a4c',
                  u'interface': u'public',
                  u'legacy_endpoint_id': u'52d0fe4693094e29a1f3737aa6a74024',
                  u'region': u'RegionOne',
                  u'url': u'http://10.9.1.147:8776/v1/e7a9800dba03489ca2716ab03226a277'},
                  {u'id': u'f23ede3238974e0685b5e478971a566d',
                   u'interface': u'admin',
                   u'legacy_endpoint_id': u'52d0fe4693094e29a1f3737aa6a74024',
                   u'region': u'RegionOne',
                  u'url': u'http://10.9.1.147:8776/v1/e7a9800dba03489ca2716ab03226a277'}],
                  u'id': u'9206e300379a448592df585587c68a40',
                  u'type': u'volume'}]

V2 service catalog:

 [{u'endpoints': [{u'adminURL': u'http://10.9.1.147:8776/v1/e7a9800dba03489ca27',
               u'id': u'6c205a937fc94cd89ef6d25804631742',
               u'internalURL': u'http://10.9.1.147:8776/v1/e7a9800dba03486ab03226a277',
              u'publicURL': u'http://10.9.1.147:8776/v1/e7a9800dba03489c6ab03226a277',
              u'region': u'RegionOne'}]

neutronclient code

   endpoints = service['endpoints']
 76 for endpoint in endpoints:
 77 if not filter_value or endpoint.get(attr) == filter_value:
 78 matching_endpoints.append(endpoint)
 79
 80 if not matching_endpoints:
 81 raise exceptions.EndpointNotFound()
 82 elif len(matching_endpoints) > 1:
 83 raise exceptions.AmbiguousEndpoints(message=matching_endpoints)
 84 else:
 85 if endpoint_type not in matching_endpoints[0]:
 86 raise exceptions.EndpointTypeNotFound(message=endpoint_type)
 87
 88 return matching_endpoints[0][endpoint_type]

Yaguang Tang (heut2008)
Changed in python-novaclient:
assignee: nobody → Yaguang Tang (heut2008)
affects: python-novaclient → python-neutronclient
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :
Changed in python-neutronclient:
status: New → In Progress
Changed in python-neutronclient:
assignee: Yaguang Tang (heut2008) → Armando Migliaccio (armando-migliaccio)
Changed in python-neutronclient:
assignee: Armando Migliaccio (armando-migliaccio) → Yaguang Tang (heut2008)
Changed in python-neutronclient:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-neutronclient (master)

Reviewed: https://review.openstack.org/81767
Committed: https://git.openstack.org/cgit/openstack/python-neutronclient/commit/?id=864be88ef9b33e1f74e13c225f1a3b4cbf17bce3
Submitter: Jenkins
Branch: master

commit 864be88ef9b33e1f74e13c225f1a3b4cbf17bce3
Author: Yaguang Tang <email address hidden>
Date: Thu Mar 20 18:48:38 2014 +0800

    Make neutronclient parse keystone v3 endpoints correctly

    Import keystone access module to handle various verion of keystone
    catalog.

    Change-Id: Ie8de15da6341cdb3af73c0fa8753f7e754bf6275
    Closes-bug: 1295056

Changed in python-neutronclient:
status: In Progress → Fix Committed
Kyle Mestery (mestery)
Changed in python-neutronclient:
milestone: none → 2.3.5
Akihiro Motoki (amotoki)
Changed in python-neutronclient:
status: Fix Committed → Fix Released
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.