Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCP: Fix uninstaller to not use hardcoded base path. #3702

Merged

Commits on Jun 10, 2020

  1. GCP: Fix uninstaller to not use hardcoded base path.

    The uninstaller currently hard codes the base path as the GCP
    API base path has changed.
    
    Change 1:
    For the getZoneName function, the InstanceGroupAggregatedList,
    InstanceAggregatedList and the disk list functions that calls
    this to get the proper url all have a shortened URL as the key
    in the list.Items map. Example of a shortened URL is
    zones/us-central1-a.
    Reusing the key value instead of hard coding the base path
    and TrimLeft operation.
    
    Change 2:
    For the getInstanceGroupURL function, the call to the underlying
    InstanceGroupAggregatedList to get the InstanceGroups already have
    the URL to hit called the SelfLink which is now set to the returning
    object and used for the URL, thus not requiring the call.
    
    Change 3:
    For the getInstanceNameAndZone, since the underlying object has only
    the URL and no other relevant information, the base path is removed
    and the TrimLeft operation is changed to Split based on the '/projects/'
    URL query parameter instead of using the base path.
    
    Previous commit information:
    openshift@11c9773#diff-4781d154886c4da10a007bb219f27d8aL170
    TODO: Find a better solution for change 3.
    rna-afk committed Jun 10, 2020
    Copy the full SHA
    269031f View commit details
    Browse the repository at this point in the history