diff options
author | Martin Polden <mpolden@mpolden.no> | 2022-06-30 09:11:56 +0200 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2022-06-30 09:11:56 +0200 |
commit | 6aec45e781d9476b0288794bba543391b716d77b (patch) | |
tree | 117a2fa3d6467c5c815efb25ba34693b83b21b28 /client | |
parent | 63d415951811b71dc94dec840673160f76e1a0a0 (diff) |
Remove deprecated commands
Diffstat (limited to 'client')
-rw-r--r-- | client/go/cmd/api_key.go | 5 | ||||
-rw-r--r-- | client/go/cmd/api_key_test.go | 3 | ||||
-rw-r--r-- | client/go/cmd/cert.go | 9 | ||||
-rw-r--r-- | client/go/cmd/cert_test.go | 6 | ||||
-rw-r--r-- | client/go/cmd/root.go | 6 |
5 files changed, 5 insertions, 24 deletions
diff --git a/client/go/cmd/api_key.go b/client/go/cmd/api_key.go index 00630be7603..a7d405963b0 100644 --- a/client/go/cmd/api_key.go +++ b/client/go/cmd/api_key.go @@ -14,7 +14,7 @@ import ( "github.com/vespa-engine/vespa/client/go/vespa" ) -func newAPIKeyCmd(cli *CLI, deprecated bool) *cobra.Command { +func newAPIKeyCmd(cli *CLI) *cobra.Command { var overwriteKey bool cmd := &cobra.Command{ Use: "api-key", @@ -46,9 +46,6 @@ always be used. It's not possible to specify a tenant-specific key.`, return doApiKey(cli, overwriteKey, args) }, } - if deprecated { - cmd.Deprecated = "use 'vespa auth api-key' instead" - } cmd.Flags().BoolVarP(&overwriteKey, "force", "f", false, "Force overwrite of existing API key") cmd.MarkPersistentFlagRequired(applicationFlag) return cmd diff --git a/client/go/cmd/api_key_test.go b/client/go/cmd/api_key_test.go index 3e3a7fa0a31..9c14033f85b 100644 --- a/client/go/cmd/api_key_test.go +++ b/client/go/cmd/api_key_test.go @@ -13,9 +13,6 @@ func TestAPIKey(t *testing.T) { t.Run("auth api-key", func(t *testing.T) { testAPIKey(t, []string{"auth", "api-key"}) }) - t.Run("api-key (deprecated)", func(t *testing.T) { - testAPIKey(t, []string{"api-key"}) - }) } func testAPIKey(t *testing.T, subcommand []string) { diff --git a/client/go/cmd/cert.go b/client/go/cmd/cert.go index 581c76b8721..ac4d5085782 100644 --- a/client/go/cmd/cert.go +++ b/client/go/cmd/cert.go @@ -16,7 +16,7 @@ import ( "github.com/vespa-engine/vespa/client/go/vespa" ) -func newCertCmd(cli *CLI, deprecated bool) *cobra.Command { +func newCertCmd(cli *CLI) *cobra.Command { var ( noApplicationPackage bool overwriteCertificate bool @@ -57,12 +57,7 @@ $ vespa auth cert -a my-tenant.my-app.my-instance path/to/application/package`, }, } cmd.Flags().BoolVarP(&overwriteCertificate, "force", "f", false, "Force overwrite of existing certificate and private key") - if deprecated { - // TODO: Remove this after 2022-06-01 - cmd.Deprecated = "use 'vespa auth cert' instead" - } else { - cmd.Flags().BoolVarP(&noApplicationPackage, "no-add", "N", false, "Do not add certificate to the application package") - } + cmd.Flags().BoolVarP(&noApplicationPackage, "no-add", "N", false, "Do not add certificate to the application package") cmd.MarkPersistentFlagRequired(applicationFlag) return cmd } diff --git a/client/go/cmd/cert_test.go b/client/go/cmd/cert_test.go index ee0c21adaf5..fe983e0ad5a 100644 --- a/client/go/cmd/cert_test.go +++ b/client/go/cmd/cert_test.go @@ -20,9 +20,6 @@ func TestCert(t *testing.T) { t.Run("auth cert", func(t *testing.T) { testCert(t, []string{"auth", "cert"}) }) - t.Run("cert (deprecated)", func(t *testing.T) { - testCert(t, []string{"cert"}) - }) } func testCert(t *testing.T, subcommand []string) { @@ -53,9 +50,6 @@ func TestCertCompressedPackage(t *testing.T) { t.Run("auth cert", func(t *testing.T) { testCertCompressedPackage(t, []string{"auth", "cert"}) }) - t.Run("cert (deprecated)", func(t *testing.T) { - testCertCompressedPackage(t, []string{"cert"}) - }) } func testCertCompressedPackage(t *testing.T, subcommand []string) { diff --git a/client/go/cmd/root.go b/client/go/cmd/root.go index 0557248cedf..461c2ea5bf0 100644 --- a/client/go/cmd/root.go +++ b/client/go/cmd/root.go @@ -213,19 +213,17 @@ func (c *CLI) configureSpinner() { func (c *CLI) configureCommands() { rootCmd := c.cmd authCmd := newAuthCmd() - certCmd := newCertCmd(c, false) + certCmd := newCertCmd(c) configCmd := newConfigCmd() documentCmd := newDocumentCmd(c) prodCmd := newProdCmd() statusCmd := newStatusCmd(c) certCmd.AddCommand(newCertAddCmd(c)) // auth cert add authCmd.AddCommand(certCmd) // auth cert - authCmd.AddCommand(newAPIKeyCmd(c, false)) // auth api-key + authCmd.AddCommand(newAPIKeyCmd(c)) // auth api-key authCmd.AddCommand(newLoginCmd(c)) // auth login authCmd.AddCommand(newLogoutCmd(c)) // auth logout rootCmd.AddCommand(authCmd) // auth - rootCmd.AddCommand(newCertCmd(c, true)) // cert TODO: Remove this after 2022-06-01 - rootCmd.AddCommand(newAPIKeyCmd(c, true)) // api-key TODO: Remove this after 2022-06-01 rootCmd.AddCommand(newCloneCmd(c)) // clone configCmd.AddCommand(newConfigGetCmd(c)) // config get configCmd.AddCommand(newConfigSetCmd(c)) // config set |