Skip to content

Commit

Permalink
feat: remove deprecation warning on organization (#1640)
Browse files Browse the repository at this point in the history
  • Loading branch information
remyleone authored Jan 7, 2021
1 parent 1041d1c commit 3f6c6fd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 0 additions & 12 deletions internal/core/arg_specs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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,
}
}
2 changes: 1 addition & 1 deletion internal/namespaces/instance/v1/custom_server_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func serverCreateCommand() *core.Command {
},
core.ProjectIDArgSpec(),
core.ZoneArgSpec(),
core.OrganizationIDDeprecatedArgSpec(),
core.OrganizationIDArgSpec(),
},
Run: instanceServerCreateRun,
WaitFunc: instanceWaitServerCreateRun(),
Expand Down

0 comments on commit 3f6c6fd

Please sign in to comment.