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

parsing of Region name is incorrect

XMLWordPrintable

      in the documentation at https://docs.onap.org/en/latest/guides/onap-operator/cloud_site/openstack/index.html in step 3 there is 

      https://msb.api.discovery.simpledemo.onap.org:30283/api/multicloud/v1/MyCompanyName/ONAP_Cloud_Region_Name/registry

      The problem is this will result in a search in AAI for 

      https://aai.onap:8443/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/MyCompanyName/ONAPCloudRegionName

      the problem is in pub/msapi/extsys.py 

      def split_vim_to_owner_region(vim_id):
      split_vim = vim_id.split('_')
      cloud_owner = split_vim[0]
      cloud_region = "".join(split_vim[1:])
      return cloud_owner, cloud_region

      this is meant to just split of the first _ but it actually removes all the _ in the cloud_region as well.

      I think it should be 

      def split_vim_to_owner_region(vim_id):
      split_vim = vim_id.split('_')
      cloud_owner = split_vim[0]
      #cloud_region = "".join(split_vim[1:])

      cloud_region = vim_id.replace(cloud_owner+"_","")
      return cloud_owner, cloud_region

       

      Documentation at https://docs.onap.org/en/latest/guides/onap-operator/cloud_site/openstack/index.html should be updated to match this fix

       

            biny993 biny993
            afenner afenner
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: