Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Comments

Add support for TO_API_VERSION env var in to-access.sh#4429

Merged
ocket8888 merged 1 commit intoapache:masterfrom
rawlinp:add-to-access-version-override
Feb 21, 2020
Merged

Add support for TO_API_VERSION env var in to-access.sh#4429
ocket8888 merged 1 commit intoapache:masterfrom
rawlinp:add-to-access-version-override

Conversation

@rawlinp
Copy link
Contributor

@rawlinp rawlinp commented Feb 21, 2020

What does this PR (Pull Request) do?

By default, make requests at 2.0 but allow overriding the version when
necessary to deal with older TO servers.

  • This PR is not related to any Issue

Which Traffic Control components are affected by this PR?

  • CDN in a Box

What is the best way to verify this PR?

With TO_URL, TO_USER, and TO_PASSWORD vars set appropriately:
. to-access.sh; to-auth -> verify that the login request was made to TO at API version 2.0.
TO_API_VERSION=1.4; . to-access.sh; to-auth -> verify that the login request was made to TO at API version 1.4.

Start up a Docker CIAB instance, make sure it all starts up properly as it depends on the to-access.sh script.

The following criteria are ALL met by this PR

  • Starting up CIAB tests this script pretty well -- doesn't have its own specific tests
  • The to-access.sh script doesn't have docs
  • A changelog entry would be a little overkill for this undocumented script
  • This PR includes any and all required license headers
  • This PR does not include a database migration
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

By default, make requests at 2.0 but allow overriding the version when
necessary to deal with older TO servers.
@rawlinp rawlinp added new feature A new feature, capability or behavior cdn-in-a-box related to the Docker-based CDN-in-a-Box system labels Feb 21, 2020
@zrhoffman
Copy link
Member

Do you think TO_API_VERSION should be in variables.env?

@rawlinp
Copy link
Contributor Author

rawlinp commented Feb 21, 2020

I don't think it would be required there. In general CIAB should just take the default version set in the script itself -- only users sourcing the script directly for non-CIAB purposes would care to set a specific version.

Copy link
Contributor

@mhoppa mhoppa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works in CDN box, works manually testing setting the API version to different versions

@ocket8888 ocket8888 merged commit 27e9128 into apache:master Feb 21, 2020
@rawlinp rawlinp deleted the add-to-access-version-override branch February 21, 2020 20:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cdn-in-a-box related to the Docker-based CDN-in-a-Box system new feature A new feature, capability or behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants