From 7bd67cf9b9c0c85c92483b3dcec9975080e959cd Mon Sep 17 00:00:00 2001 From: Paul Lorenz Date: Mon, 14 Nov 2022 09:33:03 -0500 Subject: [PATCH] Remove the update command, which was non-functional --- CHANGELOG.md | 11 ++++++ ziti/cmd/ziti/cmd/cmd.go | 2 - ziti/cmd/ziti/cmd/update.go | 78 ------------------------------------- 3 files changed, 11 insertions(+), 80 deletions(-) delete mode 100644 ziti/cmd/ziti/cmd/update.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 75cf7d5ef..a5d3d31a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +# Release 0.27.0 + +## What's New + +* Ziti CLI + * The CLI has been cleaned up and unused, unusable and underused components have been removed + +## Ziti CLI + +* The update command has been removed. It was non-functional, so this should not affect anyone + # Release 0.26.11 ## What's New diff --git a/ziti/cmd/ziti/cmd/cmd.go b/ziti/cmd/ziti/cmd/cmd.go index c648b0460..0819fd6ba 100644 --- a/ziti/cmd/ziti/cmd/cmd.go +++ b/ziti/cmd/ziti/cmd/cmd.go @@ -123,7 +123,6 @@ func NewCmdRoot(in io.Reader, out, err io.Writer, cmd *cobra.Command) *cobra.Com initCommands := NewCmdInit(out, err) createCommands := NewCmdCreate(out, err) - updateCommands := NewCmdUpdate(out, err) executeCommands := NewCmdExecute(out, err) agentCommands := NewAgentCmd(p) psCommands := NewCmdPs(p) @@ -152,7 +151,6 @@ func NewCmdRoot(in io.Reader, out, err io.Writer, cmd *cobra.Command) *cobra.Com Commands: []*cobra.Command{ initCommands, createCommands, - updateCommands, }, }, { diff --git a/ziti/cmd/ziti/cmd/update.go b/ziti/cmd/ziti/cmd/update.go deleted file mode 100644 index 42a098568..000000000 --- a/ziti/cmd/ziti/cmd/update.go +++ /dev/null @@ -1,78 +0,0 @@ -/* - Copyright NetFoundry Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -package cmd - -import ( - "io" - - "github.com/spf13/cobra" - - cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers" - "github.com/openziti/ziti/ziti/cmd/ziti/cmd/templates" -) - -// Update contains the command line options -type UpdateOptions struct { - CommonOptions - - DisableImport bool - OutDir string -} - -var ( - updateResources = `Valid resource types include: - - * config - ` - - updateLong = templates.LongDesc(` - Updates an existing resource. - - ` + updateResources + ` -`) -) - -// NewCmdUpdate creates a command object for the "update" command -func NewCmdUpdate(out io.Writer, errOut io.Writer) *cobra.Command { - options := &UpdateOptions{ - CommonOptions: CommonOptions{ - Out: out, - Err: errOut, - }, - } - - cmd := &cobra.Command{ - Use: "update", - Short: "Updates an existing resource", - Long: updateLong, - Run: func(cmd *cobra.Command, args []string) { - options.Cmd = cmd - options.Args = args - err := options.Run() - cmdhelper.CheckErr(err) - }, - } - - // cmd.AddCommand(NewCmdUpdateConfig(f, out, errOut)) - - return cmd -} - -// Run implements this command -func (o *UpdateOptions) Run() error { - return o.Cmd.Help() -}