mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-07 05:46:37 +00:00
Change subcommand restic to repo
Signed-off-by: allenxu404 <qix2@vmware.com>
This commit is contained in:
1
changelogs/unreleased/5446-allenxu404
Normal file
1
changelogs/unreleased/5446-allenxu404
Normal file
@@ -0,0 +1 @@
|
||||
Change subcommand `velero restic repo` to `velero repo`
|
||||
@@ -33,7 +33,7 @@ func NewGetCommand(f client.Factory, use string) *cobra.Command {
|
||||
|
||||
c := &cobra.Command{
|
||||
Use: use,
|
||||
Short: "Get restic repositories",
|
||||
Short: "Get repositories",
|
||||
Run: func(c *cobra.Command, args []string) {
|
||||
err := output.ValidateFlags(c)
|
||||
cmd.CheckError(err)
|
||||
@@ -22,11 +22,11 @@ import (
|
||||
"github.com/vmware-tanzu/velero/pkg/client"
|
||||
)
|
||||
|
||||
func NewRepositoryCommand(f client.Factory) *cobra.Command {
|
||||
func NewCommand(f client.Factory) *cobra.Command {
|
||||
c := &cobra.Command{
|
||||
Use: "repo",
|
||||
Short: "Work with restic repositories",
|
||||
Long: "Work with restic repositories",
|
||||
Short: "Work with repositories",
|
||||
Long: "Work with repositories",
|
||||
}
|
||||
|
||||
c.AddCommand(
|
||||
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
Copyright 2018 the Velero contributors.
|
||||
|
||||
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
|
||||
|
||||
http://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 restic
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/vmware-tanzu/velero/pkg/client"
|
||||
"github.com/vmware-tanzu/velero/pkg/cmd/cli/restic/repo"
|
||||
)
|
||||
|
||||
func NewCommand(f client.Factory) *cobra.Command {
|
||||
c := &cobra.Command{
|
||||
Use: "restic",
|
||||
Short: "Work with restic",
|
||||
Long: "Work with restic",
|
||||
}
|
||||
|
||||
c.AddCommand(
|
||||
repo.NewRepositoryCommand(f),
|
||||
)
|
||||
|
||||
return c
|
||||
}
|
||||
@@ -39,7 +39,7 @@ import (
|
||||
"github.com/vmware-tanzu/velero/pkg/cmd/cli/get"
|
||||
"github.com/vmware-tanzu/velero/pkg/cmd/cli/install"
|
||||
"github.com/vmware-tanzu/velero/pkg/cmd/cli/plugin"
|
||||
"github.com/vmware-tanzu/velero/pkg/cmd/cli/restic"
|
||||
"github.com/vmware-tanzu/velero/pkg/cmd/cli/repo"
|
||||
"github.com/vmware-tanzu/velero/pkg/cmd/cli/restore"
|
||||
"github.com/vmware-tanzu/velero/pkg/cmd/cli/schedule"
|
||||
"github.com/vmware-tanzu/velero/pkg/cmd/cli/snapshotlocation"
|
||||
@@ -117,7 +117,7 @@ operations can also be performed as 'velero backup get' and 'velero schedule cre
|
||||
delete.NewCommand(f),
|
||||
cliclient.NewCommand(),
|
||||
completion.NewCommand(),
|
||||
restic.NewCommand(f),
|
||||
repo.NewCommand(f),
|
||||
bug.NewCommand(),
|
||||
backuplocation.NewCommand(f),
|
||||
snapshotlocation.NewCommand(f),
|
||||
|
||||
Reference in New Issue
Block a user