Uploaded image for project: 'Multicloud'
  1. Multicloud
  2. MULTICLOUD-478

Handling of mapping from v3 keystone to v2 keystone is faulty

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: High High
    • Dublin Release
    • Casablanca Maintenance Release
    • MULTICLOUD-OPENSTACK
    • None
    • MultiCloud Dublin M2

      When an openstack has a v3 keystone the results are mapped to a v2 style internally.

      This is in the class newton_base/proxy/identityV3.py

      ...

      class TokensV2(Tokens):
      ...
      def post(self, request, vimid=""):
      self._logger.info("vimid > %s" % vimid)
      ...
      #convert endpoints
      v2_catalog1_endpoints = None
      for v3_endpoint in v3_catalog['endpoints']:
      v2_catalog1_endpoints =

      { "id": v3_endpoint['id'], "region":v3_endpoint['region'], "region_name": v3_endpoint['region_id'], 'interface':v3_endpoint['interface'] }

      if v3_endpoint['interface'] == 'public':
      v2_catalog1_endpoints['publicURL'] = v3_endpoint['url']
      elif v3_endpoint['interface'] == 'admin':
      v2_catalog1_endpoints['adminURL'] = v3_endpoint['url']
      elif v3_endpoint['interface'] == 'internal':
      v2_catalog1_endpoints['internalURL'] = v3_endpoint['url']

      if v2_catalog1_endpoints:
      v2_catalog1['endpoints'].append(v2_catalog1_endpoints)

      v2_catalog.append(v2_catalog1)
      ....

      The problem is that only the last endpoint is mapped.

      I think the code
      if v2_catalog1_endpoints:
      v2_catalog1['endpoints'].append(v2_catalog1_endpoints)
      should be in the loop

      for v3_endpoint in v3_catalog['endpoints']:

      so that all the endpoints are mapped.

       

            xiaohua626 xiaohua626
            afenner afenner
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: