metal-cli
metal-cli copied to clipboard
Base URL alternative should be configurable via the environment
Alternate base URLs, such as the legacy https://api.packet.net/, may be useful during testing.
A --metal-api-base-url argument (for example) would allow a user to override this value. Through Viper, this variable would also be environment and configuration file configurable.
Related packngo issue: https://github.com/packethost/packngo/issues/322
https://github.com/equinix/metal-cli/blob/main/cmd/cli.go#L55 could take a cobra/viper config value.
Today, there was a temporary outage of api.equinix.com that did not affect api.packet.net. The ability to toggle can be handy.