[CDTOOL-1690] add platform integrations command group - #1868
[CDTOOL-1690] add platform integrations command group#1868anthony-gomez-fastly wants to merge 4 commits into
Conversation
99646d8 to
6a6cbec
Compare
Add `fastly integration` commands to manage platform integrations, covering create, update, delete, describe, list, and list-types operations for Datadog, Jira Issue, JSM, Opsgenie, and Splunk On-Call.
6a6cbec to
667c85e
Compare
| c.CmdClause = parent.Command("describe", "Retrieve a single notification integration").Alias("get") | ||
|
|
||
| // Required. | ||
| c.CmdClause.Arg("id", "Integration ID").Required().StringVar(&c.Input.ID) |
There was a problem hiding this comment.
Delete and describe at the integration level only take ID as an arg, so i made them positional args instead of named ones
kpfleming
left a comment
There was a problem hiding this comment.
One small change and a couple of outstanding questions.
|
|
||
| // Required. | ||
| c.CmdClause.Arg("id", "Integration ID").Required().StringVar(&c.ID) | ||
| c.CmdClause.Flag("api-key", "Datadog API key").Required().StringVar(&c.APIKey) |
There was a problem hiding this comment.
Looking at the API documentation they haven't provided separate request body schemas for 'create' and 'update', so that's why the api-key is listed as required for both. I suspect it's not actually requireed for 'update' though, the user should be able to modify the name or description without having to provide the API key again. Let's talk to the SDS team to confirm which attributes are actually required in 'update' operations, so we can relax the requirements in this update command (and the ones for the other integrations too).
| // knownIntegrationTypes lists the integration type values with dedicated CLI | ||
| // sub-families, offered as shell-completion hints for --type. Other type | ||
| // values (e.g. legacy integration types) are still accepted. | ||
| var knownIntegrationTypes = []string{ |
There was a problem hiding this comment.
All of these types are new in the CLI, so why are they listed in this slice differently?
There was a problem hiding this comment.
ah, i mixed them from the go-fastly import, i'll standardize
There was a problem hiding this comment.
fixed in 4e0ab0d0
Co-authored-by: Kevin P. Fleming <kpfleming@users.noreply.github.com>
Change summary
Add
fastly integrationcommands to manage platform integrations, covering create, update, delete, describe, list, and list-types operations for Datadog, Jira Issue, JSM, Opsgenie, and Splunk On-Call.Delete, List, and Describe are generic, create and update are specific to the integration type
All Submissions:
New Feature Submissions: