-
Notifications
You must be signed in to change notification settings - Fork 29
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
Lip tenant lookup command #304
Conversation
cmd/provisioning/lookup.go
Outdated
|
||
log.WithFields(log.Fields{"command": cmd.Name(), "vanityUrl": vanityUrl}).Info("Provisioning group command") | ||
|
||
response := callBackend(vanityUrl) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note that the cmdkit.FetchAndPrint provides the combined functionality of calling the API and printing the result.
cmd/provisioning/api_version.go
Outdated
"fmt" | ||
"strings" | ||
|
||
"github.com/pkg/errors" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"github.com/pkg/errors" | |
"errors" |
cmd/provisioning/api_version.go
Outdated
"strings" | ||
|
||
"github.com/pkg/errors" | ||
"golang.org/x/exp/slices" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"golang.org/x/exp/slices" | |
"slices" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and the previous ones can just move to use the recent places for these packages, as they are now part of the standard library. I will also correct the uql/api_version.go where the old ones seem to have come from.
cmd/provisioning/lookup.go
Outdated
package provisioning | ||
|
||
import ( | ||
"github.com/apex/log" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"github.com/apex/log" | |
"github.com/apex/log" | |
"github.com/spf13/cobra" | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realised that I missed make go-impi and make pre-commit before 2nd PR so imports were changed.
cmd/provisioning/lookup.go
Outdated
Long: `Check whether tenant exist and return tenant Id if it does. | ||
Tenant lookup doesn't require valid authentication (auth=none) but any configured auth type/tenant will also work.`, | ||
Example: ` fsoc provisioning lookup your-vanity-url.appdynamics.com | ||
or with alias |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or with alias |
cmd/provisioning/lookup.go
Outdated
Short: "Lookup for a tenant Id by vanity URL", | ||
Long: `Check whether tenant exist and return tenant Id if it does. | ||
Tenant lookup doesn't require valid authentication (auth=none) but any configured auth type/tenant will also work.`, | ||
Example: ` fsoc provisioning lookup your-vanity-url.appdynamics.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example: ` fsoc provisioning lookup your-vanity-url.appdynamics.com | |
Example: ` fsoc provisioning lookup MYTENANT.observe.appdynamics.com |
This is the pattern we use elsewhere, e.g., in config set --help
. It will be more consistent to use it this way.
cmd/provisioning/api_version.go
Outdated
import ( | ||
"fmt" | ||
"strings" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To accommodate for the changes below, which will make these standard library imports. Please sort (or use make pre-commit
to automatically adjust the order) if your editor doesn't.
Description
New hidden command group provisioning is created. This command is needed to provision new tenants to the platform. It should be used only internally by platform admins.
Type of Change
Checklist