diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bcdc79b0..e54830931 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ### Bug Fixes: - fix(compute/serve): provide default `override_host` to Viceroy via temporary manifest and handle IPv6 hostnames ([#1940](https://github.com/fastly/cli/pull/1940)) +- fix(service-version): `--version` help on commands that support `--autoclone` notes that the version must be a draft unless `--autoclone` is used. ### Enhancements: diff --git a/pkg/argparser/common.go b/pkg/argparser/common.go index 082704f28..112ba1baa 100644 --- a/pkg/argparser/common.go +++ b/pkg/argparser/common.go @@ -29,6 +29,9 @@ var ( FlagVersionName = "version" // FlagVersionDesc is the flag description. FlagVersionDesc = "'latest', 'active', 'staged', or the number of a specific Fastly service version" + // FlagVersionDescWithAutoClone is FlagVersionDesc for commands that support + // --autoclone when the chosen version is active or locked. + FlagVersionDescWithAutoClone = FlagVersionDesc + " (must be a draft unless --autoclone is used)" // FlagVersionOptionalDesc is the flag description for commands where the // version flag is optional. It describes what OptionalServiceVersion.Parse // does when the flag is omitted. diff --git a/pkg/commands/compute/update.go b/pkg/commands/compute/update.go index fd96c005c..934572eaa 100644 --- a/pkg/commands/compute/update.go +++ b/pkg/commands/compute/update.go @@ -48,7 +48,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman }) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/acl/create.go b/pkg/commands/service/acl/create.go index d58837333..f3849836b 100644 --- a/pkg/commands/service/acl/create.go +++ b/pkg/commands/service/acl/create.go @@ -27,7 +27,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman // Required. c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/acl/delete.go b/pkg/commands/service/acl/delete.go index 824664e58..4bba24409 100644 --- a/pkg/commands/service/acl/delete.go +++ b/pkg/commands/service/acl/delete.go @@ -27,7 +27,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the ACL to delete").Required().StringVar(&c.name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/acl/update.go b/pkg/commands/service/acl/update.go index d47680486..db5068fe1 100644 --- a/pkg/commands/service/acl/update.go +++ b/pkg/commands/service/acl/update.go @@ -28,7 +28,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("new-name", "The new name of the ACL").Required().StringVar(&c.newName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/backend/create.go b/pkg/commands/service/backend/create.go index 9fd8752aa..9496457be 100644 --- a/pkg/commands/service/backend/create.go +++ b/pkg/commands/service/backend/create.go @@ -77,7 +77,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman // Required. c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/backend/delete.go b/pkg/commands/service/backend/delete.go index 4ce3d91a0..698632531 100644 --- a/pkg/commands/service/backend/delete.go +++ b/pkg/commands/service/backend/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "Backend name").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/backend/update.go b/pkg/commands/service/backend/update.go index 8a5c68576..cda1b805f 100644 --- a/pkg/commands/service/backend/update.go +++ b/pkg/commands/service/backend/update.go @@ -75,7 +75,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman // Required. c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/dictionary/create.go b/pkg/commands/service/dictionary/create.go index 5c7f138dd..5b397c99e 100644 --- a/pkg/commands/service/dictionary/create.go +++ b/pkg/commands/service/dictionary/create.go @@ -40,7 +40,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman // Required. c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/dictionary/delete.go b/pkg/commands/service/dictionary/delete.go index b6d4632f0..2606f4ae1 100644 --- a/pkg/commands/service/dictionary/delete.go +++ b/pkg/commands/service/dictionary/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "Name of Dictionary").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/dictionary/update.go b/pkg/commands/service/dictionary/update.go index 100055d18..12d5ad16e 100644 --- a/pkg/commands/service/dictionary/update.go +++ b/pkg/commands/service/dictionary/update.go @@ -43,7 +43,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "Old name of Dictionary").Short('n').Required().StringVar(&c.input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/domain/create.go b/pkg/commands/service/domain/create.go index 84b686e9d..10cba471a 100644 --- a/pkg/commands/service/domain/create.go +++ b/pkg/commands/service/domain/create.go @@ -40,7 +40,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman // Required. c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/domain/delete.go b/pkg/commands/service/domain/delete.go index 1c8d79af3..d1ec10516 100644 --- a/pkg/commands/service/domain/delete.go +++ b/pkg/commands/service/domain/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "Domain name").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/domain/update.go b/pkg/commands/service/domain/update.go index bc9e78658..bbef2c0e4 100644 --- a/pkg/commands/service/domain/update.go +++ b/pkg/commands/service/domain/update.go @@ -40,7 +40,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "Domain name").Short('n').Required().StringVar(&c.input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/healthcheck/create.go b/pkg/commands/service/healthcheck/create.go index 4b2d59ae4..5217b065a 100644 --- a/pkg/commands/service/healthcheck/create.go +++ b/pkg/commands/service/healthcheck/create.go @@ -50,7 +50,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman // Required. c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/healthcheck/delete.go b/pkg/commands/service/healthcheck/delete.go index fffca34e1..2af09861f 100644 --- a/pkg/commands/service/healthcheck/delete.go +++ b/pkg/commands/service/healthcheck/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "Healthcheck name").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/healthcheck/update.go b/pkg/commands/service/healthcheck/update.go index 59e1446c2..47433e2e8 100644 --- a/pkg/commands/service/healthcheck/update.go +++ b/pkg/commands/service/healthcheck/update.go @@ -49,7 +49,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "Healthcheck name").Short('n').Required().StringVar(&c.input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/azureblob/create.go b/pkg/commands/service/logging/azureblob/create.go index 17bc56ea5..051fe5cde 100644 --- a/pkg/commands/service/logging/azureblob/create.go +++ b/pkg/commands/service/logging/azureblob/create.go @@ -59,7 +59,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman // Required. c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/azureblob/delete.go b/pkg/commands/service/logging/azureblob/delete.go index 1340335eb..e262b1d2c 100644 --- a/pkg/commands/service/logging/azureblob/delete.go +++ b/pkg/commands/service/logging/azureblob/delete.go @@ -35,7 +35,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman // Required. c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/azureblob/update.go b/pkg/commands/service/logging/azureblob/update.go index 50f7a0672..c29132fe0 100644 --- a/pkg/commands/service/logging/azureblob/update.go +++ b/pkg/commands/service/logging/azureblob/update.go @@ -60,7 +60,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman // Required. c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/bigquery/create.go b/pkg/commands/service/logging/bigquery/create.go index 06072a299..7e6c46d0d 100644 --- a/pkg/commands/service/logging/bigquery/create.go +++ b/pkg/commands/service/logging/bigquery/create.go @@ -54,7 +54,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman // Required. c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/bigquery/delete.go b/pkg/commands/service/logging/bigquery/delete.go index f27d1355d..c20930076 100644 --- a/pkg/commands/service/logging/bigquery/delete.go +++ b/pkg/commands/service/logging/bigquery/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the BigQuery logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/bigquery/update.go b/pkg/commands/service/logging/bigquery/update.go index 2f7c8820d..7d70c8c5c 100644 --- a/pkg/commands/service/logging/bigquery/update.go +++ b/pkg/commands/service/logging/bigquery/update.go @@ -57,7 +57,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the BigQuery logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/cloudfiles/create.go b/pkg/commands/service/logging/cloudfiles/create.go index 2ccc2b675..619cbd58f 100644 --- a/pkg/commands/service/logging/cloudfiles/create.go +++ b/pkg/commands/service/logging/cloudfiles/create.go @@ -60,7 +60,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman // Required. c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/cloudfiles/delete.go b/pkg/commands/service/logging/cloudfiles/delete.go index eaa32792c..7cd725ae0 100644 --- a/pkg/commands/service/logging/cloudfiles/delete.go +++ b/pkg/commands/service/logging/cloudfiles/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the Cloudfiles logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/cloudfiles/update.go b/pkg/commands/service/logging/cloudfiles/update.go index 9c9c3e5be..e0eaf90f9 100644 --- a/pkg/commands/service/logging/cloudfiles/update.go +++ b/pkg/commands/service/logging/cloudfiles/update.go @@ -61,7 +61,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the Cloudfiles logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/datadog/create.go b/pkg/commands/service/logging/datadog/create.go index ae7e72e0a..bce6f1ff7 100644 --- a/pkg/commands/service/logging/datadog/create.go +++ b/pkg/commands/service/logging/datadog/create.go @@ -50,7 +50,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("name", "The name of the Datadog logging object. Used as a primary key for API access").Short('n').Action(c.EndpointName.Set).StringVar(&c.EndpointName.Value) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/datadog/delete.go b/pkg/commands/service/logging/datadog/delete.go index a5661202a..2d2675c20 100644 --- a/pkg/commands/service/logging/datadog/delete.go +++ b/pkg/commands/service/logging/datadog/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the Datadog logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/datadog/update.go b/pkg/commands/service/logging/datadog/update.go index e40a72422..985ee3c78 100644 --- a/pkg/commands/service/logging/datadog/update.go +++ b/pkg/commands/service/logging/datadog/update.go @@ -52,7 +52,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the Datadog logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/digitalocean/create.go b/pkg/commands/service/logging/digitalocean/create.go index 083b5ec3e..7276f23ba 100644 --- a/pkg/commands/service/logging/digitalocean/create.go +++ b/pkg/commands/service/logging/digitalocean/create.go @@ -59,7 +59,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman // Required. c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/digitalocean/delete.go b/pkg/commands/service/logging/digitalocean/delete.go index 43a6e9856..98cbdc855 100644 --- a/pkg/commands/service/logging/digitalocean/delete.go +++ b/pkg/commands/service/logging/digitalocean/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the DigitalOcean Spaces logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/digitalocean/update.go b/pkg/commands/service/logging/digitalocean/update.go index 0e9cc84e4..fe92aa06c 100644 --- a/pkg/commands/service/logging/digitalocean/update.go +++ b/pkg/commands/service/logging/digitalocean/update.go @@ -61,7 +61,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the DigitalOcean Spaces logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/elasticsearch/create.go b/pkg/commands/service/logging/elasticsearch/create.go index b4d0e9cc8..59241fba8 100644 --- a/pkg/commands/service/logging/elasticsearch/create.go +++ b/pkg/commands/service/logging/elasticsearch/create.go @@ -59,7 +59,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("name", "The name of the Elasticsearch logging object. Used as a primary key for API access").Short('n').Action(c.EndpointName.Set).StringVar(&c.EndpointName.Value) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/elasticsearch/delete.go b/pkg/commands/service/logging/elasticsearch/delete.go index a9e493fa8..2e9f54086 100644 --- a/pkg/commands/service/logging/elasticsearch/delete.go +++ b/pkg/commands/service/logging/elasticsearch/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the Elasticsearch logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/elasticsearch/update.go b/pkg/commands/service/logging/elasticsearch/update.go index c6d3f1056..e0e98fafc 100644 --- a/pkg/commands/service/logging/elasticsearch/update.go +++ b/pkg/commands/service/logging/elasticsearch/update.go @@ -61,7 +61,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the Elasticsearch logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/ftp/create.go b/pkg/commands/service/logging/ftp/create.go index afcae390b..cd9465890 100644 --- a/pkg/commands/service/logging/ftp/create.go +++ b/pkg/commands/service/logging/ftp/create.go @@ -57,7 +57,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman // Required. c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/ftp/delete.go b/pkg/commands/service/logging/ftp/delete.go index ade505163..9ce6d057d 100644 --- a/pkg/commands/service/logging/ftp/delete.go +++ b/pkg/commands/service/logging/ftp/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the FTP logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/ftp/update.go b/pkg/commands/service/logging/ftp/update.go index 423a60f3b..02a054ca9 100644 --- a/pkg/commands/service/logging/ftp/update.go +++ b/pkg/commands/service/logging/ftp/update.go @@ -60,7 +60,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the FTP logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/gcs/create.go b/pkg/commands/service/logging/gcs/create.go index 17ed6cf23..f8894d438 100644 --- a/pkg/commands/service/logging/gcs/create.go +++ b/pkg/commands/service/logging/gcs/create.go @@ -61,7 +61,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("name", "The name of the GCS logging object. Used as a primary key for API access").Short('n').Action(c.EndpointName.Set).StringVar(&c.EndpointName.Value) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/gcs/delete.go b/pkg/commands/service/logging/gcs/delete.go index 3d83ebdac..b62b4b80b 100644 --- a/pkg/commands/service/logging/gcs/delete.go +++ b/pkg/commands/service/logging/gcs/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the GCS logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/gcs/update.go b/pkg/commands/service/logging/gcs/update.go index 4f3f7b778..962887f33 100644 --- a/pkg/commands/service/logging/gcs/update.go +++ b/pkg/commands/service/logging/gcs/update.go @@ -62,7 +62,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the GCS logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/googlepubsub/create.go b/pkg/commands/service/logging/googlepubsub/create.go index 4d6c29662..aa0d35b1b 100644 --- a/pkg/commands/service/logging/googlepubsub/create.go +++ b/pkg/commands/service/logging/googlepubsub/create.go @@ -53,7 +53,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("name", "The name of the Google Cloud Pub/Sub logging object. Used as a primary key for API access").Short('n').Action(c.EndpointName.Set).StringVar(&c.EndpointName.Value) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/googlepubsub/delete.go b/pkg/commands/service/logging/googlepubsub/delete.go index e25a530d5..ca3c10e60 100644 --- a/pkg/commands/service/logging/googlepubsub/delete.go +++ b/pkg/commands/service/logging/googlepubsub/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the Google Cloud Pub/Sub logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/googlepubsub/update.go b/pkg/commands/service/logging/googlepubsub/update.go index 4337bf1e9..f6357b850 100644 --- a/pkg/commands/service/logging/googlepubsub/update.go +++ b/pkg/commands/service/logging/googlepubsub/update.go @@ -55,7 +55,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the Google Cloud Pub/Sub logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/grafanacloudlogs/create.go b/pkg/commands/service/logging/grafanacloudlogs/create.go index e66bcfaa9..9807c779b 100644 --- a/pkg/commands/service/logging/grafanacloudlogs/create.go +++ b/pkg/commands/service/logging/grafanacloudlogs/create.go @@ -53,7 +53,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("name", "The name of the Grafana Cloud Logs logging endpoint. Used as a primary key for API access").Short('n').Action(c.EndpointName.Set).StringVar(&c.EndpointName.Value) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/grafanacloudlogs/delete.go b/pkg/commands/service/logging/grafanacloudlogs/delete.go index 950708fce..dc246cf9a 100644 --- a/pkg/commands/service/logging/grafanacloudlogs/delete.go +++ b/pkg/commands/service/logging/grafanacloudlogs/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the Grafana Cloud Logs logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/grafanacloudlogs/update.go b/pkg/commands/service/logging/grafanacloudlogs/update.go index 1633f7615..51a93e473 100644 --- a/pkg/commands/service/logging/grafanacloudlogs/update.go +++ b/pkg/commands/service/logging/grafanacloudlogs/update.go @@ -55,7 +55,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the Grafana Cloud Logs logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/heroku/create.go b/pkg/commands/service/logging/heroku/create.go index 55404683e..afbea31ec 100644 --- a/pkg/commands/service/logging/heroku/create.go +++ b/pkg/commands/service/logging/heroku/create.go @@ -50,7 +50,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("name", "The name of the Heroku logging object. Used as a primary key for API access").Short('n').Action(c.EndpointName.Set).StringVar(&c.EndpointName.Value) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/heroku/delete.go b/pkg/commands/service/logging/heroku/delete.go index 3eb794141..6480066f0 100644 --- a/pkg/commands/service/logging/heroku/delete.go +++ b/pkg/commands/service/logging/heroku/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the Heroku logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/heroku/update.go b/pkg/commands/service/logging/heroku/update.go index 6aeef6189..2200da253 100644 --- a/pkg/commands/service/logging/heroku/update.go +++ b/pkg/commands/service/logging/heroku/update.go @@ -52,7 +52,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the Heroku logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/honeycomb/create.go b/pkg/commands/service/logging/honeycomb/create.go index 2bf8c56af..4c85e0593 100644 --- a/pkg/commands/service/logging/honeycomb/create.go +++ b/pkg/commands/service/logging/honeycomb/create.go @@ -50,7 +50,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("name", "The name of the Honeycomb logging object. Used as a primary key for API access").Short('n').Action(c.EndpointName.Set).StringVar(&c.EndpointName.Value) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/honeycomb/delete.go b/pkg/commands/service/logging/honeycomb/delete.go index 9bb7391af..57bb24f0f 100644 --- a/pkg/commands/service/logging/honeycomb/delete.go +++ b/pkg/commands/service/logging/honeycomb/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the Honeycomb logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/honeycomb/update.go b/pkg/commands/service/logging/honeycomb/update.go index 1c76baec4..13bd92b92 100644 --- a/pkg/commands/service/logging/honeycomb/update.go +++ b/pkg/commands/service/logging/honeycomb/update.go @@ -52,7 +52,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the Honeycomb logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/https/create.go b/pkg/commands/service/logging/https/create.go index afb417661..dedf808fb 100644 --- a/pkg/commands/service/logging/https/create.go +++ b/pkg/commands/service/logging/https/create.go @@ -65,7 +65,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("name", "The name of the HTTPS logging object. Used as a primary key for API access").Short('n').Action(c.EndpointName.Set).StringVar(&c.EndpointName.Value) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/https/delete.go b/pkg/commands/service/logging/https/delete.go index 8e0ccc2b7..5b90dae51 100644 --- a/pkg/commands/service/logging/https/delete.go +++ b/pkg/commands/service/logging/https/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the HTTPS logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/https/update.go b/pkg/commands/service/logging/https/update.go index 053a8a419..6649d0f5e 100644 --- a/pkg/commands/service/logging/https/update.go +++ b/pkg/commands/service/logging/https/update.go @@ -66,7 +66,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the HTTPS logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/kafka/create.go b/pkg/commands/service/logging/kafka/create.go index c218f5a00..282594387 100644 --- a/pkg/commands/service/logging/kafka/create.go +++ b/pkg/commands/service/logging/kafka/create.go @@ -64,7 +64,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("name", "The name of the Kafka logging object. Used as a primary key for API access").Short('n').Action(c.EndpointName.Set).StringVar(&c.EndpointName.Value) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/kafka/delete.go b/pkg/commands/service/logging/kafka/delete.go index 24cf0dcef..afe88c039 100644 --- a/pkg/commands/service/logging/kafka/delete.go +++ b/pkg/commands/service/logging/kafka/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the Kafka logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/kafka/update.go b/pkg/commands/service/logging/kafka/update.go index 3f2089106..bf8e41d20 100644 --- a/pkg/commands/service/logging/kafka/update.go +++ b/pkg/commands/service/logging/kafka/update.go @@ -67,7 +67,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the Kafka logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/kinesis/create.go b/pkg/commands/service/logging/kinesis/create.go index 95b7da9ab..36a813e40 100644 --- a/pkg/commands/service/logging/kinesis/create.go +++ b/pkg/commands/service/logging/kinesis/create.go @@ -57,7 +57,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("name", "The name of the Kinesis logging object. Used as a primary key for API access").Short('n').Action(c.EndpointName.Set).StringVar(&c.EndpointName.Value) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/kinesis/delete.go b/pkg/commands/service/logging/kinesis/delete.go index 7708148fc..b44659a38 100644 --- a/pkg/commands/service/logging/kinesis/delete.go +++ b/pkg/commands/service/logging/kinesis/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the Kinesis logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/kinesis/update.go b/pkg/commands/service/logging/kinesis/update.go index 5b08cd49d..5a2c0ee7c 100644 --- a/pkg/commands/service/logging/kinesis/update.go +++ b/pkg/commands/service/logging/kinesis/update.go @@ -55,7 +55,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the Kinesis logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/loggly/create.go b/pkg/commands/service/logging/loggly/create.go index 750488a0c..6b027af86 100644 --- a/pkg/commands/service/logging/loggly/create.go +++ b/pkg/commands/service/logging/loggly/create.go @@ -49,7 +49,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("name", "The name of the Loggly logging object. Used as a primary key for API access").Short('n').Action(c.EndpointName.Set).StringVar(&c.EndpointName.Value) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/loggly/delete.go b/pkg/commands/service/logging/loggly/delete.go index c4ffa75fb..5d330fe35 100644 --- a/pkg/commands/service/logging/loggly/delete.go +++ b/pkg/commands/service/logging/loggly/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the Loggly logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/loggly/update.go b/pkg/commands/service/logging/loggly/update.go index 1a2b9018b..d0cd8e708 100644 --- a/pkg/commands/service/logging/loggly/update.go +++ b/pkg/commands/service/logging/loggly/update.go @@ -51,7 +51,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the Loggly logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/logshuttle/create.go b/pkg/commands/service/logging/logshuttle/create.go index 14228c344..008b11bd2 100644 --- a/pkg/commands/service/logging/logshuttle/create.go +++ b/pkg/commands/service/logging/logshuttle/create.go @@ -50,7 +50,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("name", "The name of the Logshuttle logging object. Used as a primary key for API access").Short('n').Action(c.EndpointName.Set).StringVar(&c.EndpointName.Value) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/logshuttle/delete.go b/pkg/commands/service/logging/logshuttle/delete.go index f88cc4dde..2ff8d29e0 100644 --- a/pkg/commands/service/logging/logshuttle/delete.go +++ b/pkg/commands/service/logging/logshuttle/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the Logshuttle logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/logshuttle/update.go b/pkg/commands/service/logging/logshuttle/update.go index e33d7a3ff..be13f7960 100644 --- a/pkg/commands/service/logging/logshuttle/update.go +++ b/pkg/commands/service/logging/logshuttle/update.go @@ -52,7 +52,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the Logshuttle logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/newrelic/create.go b/pkg/commands/service/logging/newrelic/create.go index e7bbcf1b4..39f2ba369 100644 --- a/pkg/commands/service/logging/newrelic/create.go +++ b/pkg/commands/service/logging/newrelic/create.go @@ -48,7 +48,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("name", "The name for the real-time logging configuration").Action(c.name.Set).StringVar(&c.name.Value) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/newrelic/delete.go b/pkg/commands/service/logging/newrelic/delete.go index 9c42f23b8..5ef19f5f5 100644 --- a/pkg/commands/service/logging/newrelic/delete.go +++ b/pkg/commands/service/logging/newrelic/delete.go @@ -27,7 +27,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name for the real-time logging configuration to delete").Required().StringVar(&c.name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/newrelic/update.go b/pkg/commands/service/logging/newrelic/update.go index 0329c4334..1a249eece 100644 --- a/pkg/commands/service/logging/newrelic/update.go +++ b/pkg/commands/service/logging/newrelic/update.go @@ -49,7 +49,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name for the real-time logging configuration to update").Required().StringVar(&c.endpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/newrelicotlp/create.go b/pkg/commands/service/logging/newrelicotlp/create.go index cb7dcc67a..86dc6da6e 100644 --- a/pkg/commands/service/logging/newrelicotlp/create.go +++ b/pkg/commands/service/logging/newrelicotlp/create.go @@ -49,7 +49,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("name", "The name for the real-time logging configuration").Action(c.name.Set).StringVar(&c.name.Value) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/newrelicotlp/delete.go b/pkg/commands/service/logging/newrelicotlp/delete.go index 346818466..64738b1bf 100644 --- a/pkg/commands/service/logging/newrelicotlp/delete.go +++ b/pkg/commands/service/logging/newrelicotlp/delete.go @@ -27,7 +27,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name for the real-time logging configuration to delete").Required().StringVar(&c.name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/newrelicotlp/update.go b/pkg/commands/service/logging/newrelicotlp/update.go index fa57fe707..ddebf771a 100644 --- a/pkg/commands/service/logging/newrelicotlp/update.go +++ b/pkg/commands/service/logging/newrelicotlp/update.go @@ -50,7 +50,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name for the real-time logging configuration to update").Required().StringVar(&c.endpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/openstack/create.go b/pkg/commands/service/logging/openstack/create.go index d9fabd089..0b74bc242 100644 --- a/pkg/commands/service/logging/openstack/create.go +++ b/pkg/commands/service/logging/openstack/create.go @@ -60,7 +60,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("name", "The name of the OpenStack logging object. Used as a primary key for API access").Short('n').Action(c.EndpointName.Set).StringVar(&c.EndpointName.Value) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/openstack/delete.go b/pkg/commands/service/logging/openstack/delete.go index 806c82f65..0b819ea4a 100644 --- a/pkg/commands/service/logging/openstack/delete.go +++ b/pkg/commands/service/logging/openstack/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the OpenStack logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/openstack/update.go b/pkg/commands/service/logging/openstack/update.go index 1dd1dd2dd..dad7d167b 100644 --- a/pkg/commands/service/logging/openstack/update.go +++ b/pkg/commands/service/logging/openstack/update.go @@ -61,7 +61,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the OpenStack logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/papertrail/create.go b/pkg/commands/service/logging/papertrail/create.go index a3d1f84bb..ff61062d2 100644 --- a/pkg/commands/service/logging/papertrail/create.go +++ b/pkg/commands/service/logging/papertrail/create.go @@ -50,7 +50,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("name", "The name of the Papertrail logging object. Used as a primary key for API access").Short('n').Action(c.EndpointName.Set).StringVar(&c.EndpointName.Value) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/papertrail/delete.go b/pkg/commands/service/logging/papertrail/delete.go index ccd12ae79..19705c4b8 100644 --- a/pkg/commands/service/logging/papertrail/delete.go +++ b/pkg/commands/service/logging/papertrail/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the Papertrail logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/papertrail/update.go b/pkg/commands/service/logging/papertrail/update.go index 82d1ba932..958c6a281 100644 --- a/pkg/commands/service/logging/papertrail/update.go +++ b/pkg/commands/service/logging/papertrail/update.go @@ -52,7 +52,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the Papertrail logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/s3/create.go b/pkg/commands/service/logging/s3/create.go index 2af58c3c4..763c929f2 100644 --- a/pkg/commands/service/logging/s3/create.go +++ b/pkg/commands/service/logging/s3/create.go @@ -68,7 +68,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("name", "The name of the S3 logging object. Used as a primary key for API access").Short('n').Action(c.EndpointName.Set).StringVar(&c.EndpointName.Value) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/s3/delete.go b/pkg/commands/service/logging/s3/delete.go index 8f55e0313..2f5015abf 100644 --- a/pkg/commands/service/logging/s3/delete.go +++ b/pkg/commands/service/logging/s3/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the S3 logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/s3/update.go b/pkg/commands/service/logging/s3/update.go index 2cf0c2b9b..6e8759f4a 100644 --- a/pkg/commands/service/logging/s3/update.go +++ b/pkg/commands/service/logging/s3/update.go @@ -67,7 +67,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the S3 logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/scalyr/create.go b/pkg/commands/service/logging/scalyr/create.go index 5f029fcb4..62dc220aa 100644 --- a/pkg/commands/service/logging/scalyr/create.go +++ b/pkg/commands/service/logging/scalyr/create.go @@ -51,7 +51,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("name", "The name of the Scalyr logging object. Used as a primary key for API access").Short('n').Action(c.EndpointName.Set).StringVar(&c.EndpointName.Value) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/scalyr/delete.go b/pkg/commands/service/logging/scalyr/delete.go index b70263e7c..c0df3888b 100644 --- a/pkg/commands/service/logging/scalyr/delete.go +++ b/pkg/commands/service/logging/scalyr/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the Scalyr logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/scalyr/update.go b/pkg/commands/service/logging/scalyr/update.go index 54023f69b..534bd313d 100644 --- a/pkg/commands/service/logging/scalyr/update.go +++ b/pkg/commands/service/logging/scalyr/update.go @@ -53,7 +53,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the Scalyr logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/sftp/create.go b/pkg/commands/service/logging/sftp/create.go index 46fb3d6ec..069185de4 100644 --- a/pkg/commands/service/logging/sftp/create.go +++ b/pkg/commands/service/logging/sftp/create.go @@ -62,7 +62,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("name", "The name of the SFTP logging object. Used as a primary key for API access").Short('n').Action(c.EndpointName.Set).StringVar(&c.EndpointName.Value) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/sftp/delete.go b/pkg/commands/service/logging/sftp/delete.go index 844270718..65fafc866 100644 --- a/pkg/commands/service/logging/sftp/delete.go +++ b/pkg/commands/service/logging/sftp/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the SFTP logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/sftp/update.go b/pkg/commands/service/logging/sftp/update.go index 6fc8be371..ba9a2e74c 100644 --- a/pkg/commands/service/logging/sftp/update.go +++ b/pkg/commands/service/logging/sftp/update.go @@ -63,7 +63,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the SFTP logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/splunk/create.go b/pkg/commands/service/logging/splunk/create.go index a5c4c8f06..836bdcb82 100644 --- a/pkg/commands/service/logging/splunk/create.go +++ b/pkg/commands/service/logging/splunk/create.go @@ -55,7 +55,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("name", "The name of the Splunk logging object. Used as a primary key for API access").Short('n').Action(c.EndpointName.Set).StringVar(&c.EndpointName.Value) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/splunk/delete.go b/pkg/commands/service/logging/splunk/delete.go index b4f8fb70d..6dfa927bb 100644 --- a/pkg/commands/service/logging/splunk/delete.go +++ b/pkg/commands/service/logging/splunk/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the Splunk logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/splunk/update.go b/pkg/commands/service/logging/splunk/update.go index f9eaaedb0..cefd2aaa3 100644 --- a/pkg/commands/service/logging/splunk/update.go +++ b/pkg/commands/service/logging/splunk/update.go @@ -56,7 +56,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the Splunk logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/sumologic/create.go b/pkg/commands/service/logging/sumologic/create.go index 2cd8e15b9..4f979653d 100644 --- a/pkg/commands/service/logging/sumologic/create.go +++ b/pkg/commands/service/logging/sumologic/create.go @@ -50,7 +50,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("name", "The name of the Sumologic logging object. Used as a primary key for API access").Short('n').Action(c.EndpointName.Set).StringVar(&c.EndpointName.Value) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/sumologic/delete.go b/pkg/commands/service/logging/sumologic/delete.go index 234ea454e..196bcc2df 100644 --- a/pkg/commands/service/logging/sumologic/delete.go +++ b/pkg/commands/service/logging/sumologic/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the Sumologic logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/sumologic/update.go b/pkg/commands/service/logging/sumologic/update.go index 24c0fd302..2615fa577 100644 --- a/pkg/commands/service/logging/sumologic/update.go +++ b/pkg/commands/service/logging/sumologic/update.go @@ -52,7 +52,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the Sumologic logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/syslog/create.go b/pkg/commands/service/logging/syslog/create.go index ff43d48b2..01786a7b2 100644 --- a/pkg/commands/service/logging/syslog/create.go +++ b/pkg/commands/service/logging/syslog/create.go @@ -57,7 +57,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("name", "The name of the Syslog logging object. Used as a primary key for API access").Short('n').Action(c.EndpointName.Set).StringVar(&c.EndpointName.Value) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/syslog/delete.go b/pkg/commands/service/logging/syslog/delete.go index dd3b2eef5..7f8b23601 100644 --- a/pkg/commands/service/logging/syslog/delete.go +++ b/pkg/commands/service/logging/syslog/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the Syslog logging object").Short('n').Required().StringVar(&c.Input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/logging/syslog/update.go b/pkg/commands/service/logging/syslog/update.go index c7fae14f7..93dd38e69 100644 --- a/pkg/commands/service/logging/syslog/update.go +++ b/pkg/commands/service/logging/syslog/update.go @@ -59,7 +59,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the Syslog logging object").Short('n').Required().StringVar(&c.EndpointName) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.ServiceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/ratelimit/create.go b/pkg/commands/service/ratelimit/create.go index 1bb29c964..e054f1bee 100644 --- a/pkg/commands/service/ratelimit/create.go +++ b/pkg/commands/service/ratelimit/create.go @@ -57,7 +57,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman // Required. c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/resourcelink/create.go b/pkg/commands/service/resourcelink/create.go index 24c633fc5..971502c3c 100644 --- a/pkg/commands/service/resourcelink/create.go +++ b/pkg/commands/service/resourcelink/create.go @@ -49,7 +49,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman }) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/resourcelink/delete.go b/pkg/commands/service/resourcelink/delete.go index f786905fe..270270492 100644 --- a/pkg/commands/service/resourcelink/delete.go +++ b/pkg/commands/service/resourcelink/delete.go @@ -43,7 +43,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman }) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/resourcelink/update.go b/pkg/commands/service/resourcelink/update.go index 618398232..374d3d496 100644 --- a/pkg/commands/service/resourcelink/update.go +++ b/pkg/commands/service/resourcelink/update.go @@ -54,7 +54,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman }) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/vcl/condition/create.go b/pkg/commands/service/vcl/condition/create.go index d4f5712d1..10bd8cb95 100644 --- a/pkg/commands/service/vcl/condition/create.go +++ b/pkg/commands/service/vcl/condition/create.go @@ -46,7 +46,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman // Required flags c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/vcl/condition/delete.go b/pkg/commands/service/vcl/condition/delete.go index ec5d48b85..6fff01c36 100644 --- a/pkg/commands/service/vcl/condition/delete.go +++ b/pkg/commands/service/vcl/condition/delete.go @@ -36,7 +36,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "Condition name").Short('n').Required().StringVar(&c.name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/vcl/condition/update.go b/pkg/commands/service/vcl/condition/update.go index 624fdb7b7..e6b744a52 100644 --- a/pkg/commands/service/vcl/condition/update.go +++ b/pkg/commands/service/vcl/condition/update.go @@ -40,7 +40,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "Domain name").Short('n').Required().StringVar(&c.input.Name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/vcl/custom/create.go b/pkg/commands/service/vcl/custom/create.go index 19e6932fb..933ffd964 100644 --- a/pkg/commands/service/vcl/custom/create.go +++ b/pkg/commands/service/vcl/custom/create.go @@ -27,7 +27,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("content", "VCL passed as file path or content, e.g. $(< main.vcl)").Action(c.content.Set).StringVar(&c.content.Value) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/vcl/custom/delete.go b/pkg/commands/service/vcl/custom/delete.go index beab809df..f62124c06 100644 --- a/pkg/commands/service/vcl/custom/delete.go +++ b/pkg/commands/service/vcl/custom/delete.go @@ -27,7 +27,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the VCL to delete").Required().StringVar(&c.name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/vcl/custom/update.go b/pkg/commands/service/vcl/custom/update.go index a6d45bfef..abe35e691 100644 --- a/pkg/commands/service/vcl/custom/update.go +++ b/pkg/commands/service/vcl/custom/update.go @@ -28,7 +28,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("name", "The name of the VCL to update").Required().StringVar(&c.name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/vcl/snippet/create.go b/pkg/commands/service/vcl/snippet/create.go index 6af8c2af4..71aead2f3 100644 --- a/pkg/commands/service/vcl/snippet/create.go +++ b/pkg/commands/service/vcl/snippet/create.go @@ -29,7 +29,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman // Required. c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/vcl/snippet/delete.go b/pkg/commands/service/vcl/snippet/delete.go index 5f26769b7..c7f470f29 100644 --- a/pkg/commands/service/vcl/snippet/delete.go +++ b/pkg/commands/service/vcl/snippet/delete.go @@ -27,7 +27,7 @@ func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteComman c.CmdClause.Flag("name", "The name of the VCL snippet to delete").Required().StringVar(&c.name) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/vcl/snippet/update.go b/pkg/commands/service/vcl/snippet/update.go index d48d312ef..43922eba0 100644 --- a/pkg/commands/service/vcl/snippet/update.go +++ b/pkg/commands/service/vcl/snippet/update.go @@ -27,7 +27,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman // Required. c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/version/activate.go b/pkg/commands/service/version/activate.go index 18d85de6b..298f52744 100644 --- a/pkg/commands/service/version/activate.go +++ b/pkg/commands/service/version/activate.go @@ -42,7 +42,7 @@ func NewActivateCommand(parent argparser.Registerer, g *global.Data) *ActivateCo }) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/version/serviceversion_test.go b/pkg/commands/service/version/serviceversion_test.go index 10e7b032a..d870b6a25 100644 --- a/pkg/commands/service/version/serviceversion_test.go +++ b/pkg/commands/service/version/serviceversion_test.go @@ -1,15 +1,21 @@ package version_test import ( + "bytes" "context" + stderrors "errors" "fmt" + "io" "strings" "testing" "github.com/fastly/go-fastly/v19/fastly" + "github.com/fastly/cli/pkg/app" root "github.com/fastly/cli/pkg/commands/service" sub "github.com/fastly/cli/pkg/commands/service/version" + "github.com/fastly/cli/pkg/errors" + "github.com/fastly/cli/pkg/global" "github.com/fastly/cli/pkg/mock" "github.com/fastly/cli/pkg/testutil" ) @@ -371,6 +377,34 @@ func TestVersionStage(t *testing.T) { testutil.RunCLIScenarios(t, []string{root.CommandName, sub.CommandName, "stage"}, scenarios) } +func TestVersionStageHelp(t *testing.T) { + var stdout bytes.Buffer + args := testutil.SplitArgs("service version stage --help") + app.Init = func(_ []string, _ io.Reader) (*global.Data, error) { + return testutil.MockGlobalData(args, &stdout), nil + } + err := app.Run(args, nil) + output := stdout.String() + if err != nil { + var re errors.RemediationError + var se errors.SkipExitError + if stderrors.As(err, &re) { + output += re.Prefix + } else if stderrors.As(err, &se) { + if inner, ok := se.Err.(errors.RemediationError); ok { + output += inner.Prefix + } + } + output += err.Error() + } + if !strings.Contains(output, "'latest', 'active', 'staged'") { + t.Fatalf("stage --version help missing version aliases:\n%s", output) + } + if !strings.Contains(output, "must be a draft unless --autoclone") { + t.Fatalf("stage --version help missing autoclone draft note:\n%s", output) + } +} + func TestVersionUnstage(t *testing.T) { scenarios := []testutil.CLIScenario{ { diff --git a/pkg/commands/service/version/stage.go b/pkg/commands/service/version/stage.go index 8e92d5a4d..d5d4f2957 100644 --- a/pkg/commands/service/version/stage.go +++ b/pkg/commands/service/version/stage.go @@ -42,7 +42,7 @@ func NewStageCommand(parent argparser.Registerer, g *global.Data) *StageCommand }) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, }) diff --git a/pkg/commands/service/version/update.go b/pkg/commands/service/version/update.go index eaab68a24..7e2d5c07c 100644 --- a/pkg/commands/service/version/update.go +++ b/pkg/commands/service/version/update.go @@ -46,7 +46,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman }) c.RegisterFlag(argparser.StringFlagOpts{ Name: argparser.FlagVersionName, - Description: argparser.FlagVersionDesc, + Description: argparser.FlagVersionDescWithAutoClone, Dst: &c.serviceVersion.Value, Required: true, })