From 760550040a04039ebd7e9a1265f42e871fc976c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20L=C3=A9one?= Date: Thu, 7 Jan 2021 11:16:38 +0100 Subject: [PATCH] feat: remove deprecation warning on organization --- ...est-all-usage-instance-server-create-usage.golden | 4 +--- internal/core/arg_specs.go | 12 ------------ .../namespaces/instance/v1/custom_server_create.go | 2 +- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/cmd/scw/testdata/test-all-usage-instance-server-create-usage.golden b/cmd/scw/testdata/test-all-usage-instance-server-create-usage.golden index d181ba8e69..888dcee6d1 100644 --- a/cmd/scw/testdata/test-all-usage-instance-server-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-instance-server-create-usage.golden @@ -39,9 +39,7 @@ ARGS: [boot-type=local] The boot type to use, if empty the local boot will be used. Will be overwritten to bootscript if bootscript-id is set. (local | bootscript | rescue) [project-id] Project ID to use. If none is passed the default project ID will be used [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config - -DEPRECATED ARGS: - [organization-id] Please use project-id instead + [organization-id] Organization ID to use. If none is passed the default organization ID will be used FLAGS: -h, --help help for create diff --git a/internal/core/arg_specs.go b/internal/core/arg_specs.go index 6d8c558209..635fa6cdd5 100644 --- a/internal/core/arg_specs.go +++ b/internal/core/arg_specs.go @@ -184,9 +184,6 @@ func ProjectArgSpec() *ArgSpec { } } -// TODO: Remove me and: -// - use OrganizationIDDeprecatedArgSpec in the generator -// - stop using renameOrganizationIDArgSpec and renameProjectIDArgSpec for these use-cases func OrganizationArgSpec() *ArgSpec { return &ArgSpec{ Name: "organization", @@ -202,12 +199,3 @@ func OrganizationIDArgSpec() *ArgSpec { ValidateFunc: ValidateOrganizationID(), } } - -func OrganizationIDDeprecatedArgSpec() *ArgSpec { - return &ArgSpec{ - Name: "organization-id", - Short: "Please use project-id instead", - ValidateFunc: ValidateOrganizationID(), - Deprecated: true, - } -} diff --git a/internal/namespaces/instance/v1/custom_server_create.go b/internal/namespaces/instance/v1/custom_server_create.go index fd919566f4..e9a7e2ad64 100644 --- a/internal/namespaces/instance/v1/custom_server_create.go +++ b/internal/namespaces/instance/v1/custom_server_create.go @@ -132,7 +132,7 @@ func serverCreateCommand() *core.Command { }, core.ProjectIDArgSpec(), core.ZoneArgSpec(), - core.OrganizationIDDeprecatedArgSpec(), + core.OrganizationIDArgSpec(), }, Run: instanceServerCreateRun, WaitFunc: instanceWaitServerCreateRun(),