Skip to content

Commit

Permalink
Merge branch 'master' into browse-show-tree
Browse files Browse the repository at this point in the history
  • Loading branch information
shlokc9 authored Aug 2, 2024
2 parents df910e2 + 2cf1758 commit 36b01b0
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion cmd/rootCmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,20 @@ var (
},
}

browseSnapshotCmd = &cobra.Command{

Check failure on line 131 in cmd/rootCmd.go

View workflow job for this annotation

GitHub Actions / Build

browseSnapshotCmd redeclared in this block

Check failure on line 131 in cmd/rootCmd.go

View workflow job for this annotation

GitHub Actions / Lint

browseSnapshotCmd redeclared in this block

Check failure on line 131 in cmd/rootCmd.go

View workflow job for this annotation

GitHub Actions / Lint

browseSnapshotCmd redeclared in this block
Use: "snapshot [Snapshot name]",
Short: "Browse the contents of a CSI VolumeSnapshot via file browser",
Long: "Browse the contents of a CSI provisioned VolumeSnapshot by cloning the volume and mounting it with a file browser.",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
return CsiSnapshotBrowse(context.Background(), args[0],
namespace,
csiCheckRunAsUser,
browseLocalPort,

Check failure on line 140 in cmd/rootCmd.go

View workflow job for this annotation

GitHub Actions / Build

not enough arguments in call to CsiSnapshotBrowse

Check failure on line 140 in cmd/rootCmd.go

View workflow job for this annotation

GitHub Actions / Lint

not enough arguments in call to CsiSnapshotBrowse

Check failure on line 140 in cmd/rootCmd.go

View workflow job for this annotation

GitHub Actions / Lint

not enough arguments in call to CsiSnapshotBrowse
)
},
}

blockMountRunAsUser int64
blockMountCleanup bool
blockMountCleanupOnly bool
Expand Down Expand Up @@ -196,7 +210,7 @@ func init() {
rootCmd.AddCommand(browseCmd)
browseCmd.Flags().StringVarP(&csiCheckVolumeSnapshotClass, "volumesnapshotclass", "v", "", "The name of a VolumeSnapshotClass. (Required)")
_ = browseCmd.MarkFlagRequired("volumesnapshotclass")
browseCmd.PersistentFlags().StringVarP(&namespace, "namespace", "n", fio.DefaultNS, "Namespace of the resources provided in command.")
browseCmd.PersistentFlags().StringVarP(&namespace, "namespace", "n", fio.DefaultNS, "The namespace of the resource to browse.")
browseCmd.PersistentFlags().Int64VarP(&csiCheckRunAsUser, "runAsUser", "u", 0, "Runs the inspector pod as a user (int)")
browseCmd.PersistentFlags().IntVarP(&browseLocalPort, "localport", "l", 8080, "The local port to expose the inspector")
browseCmd.PersistentFlags().BoolVarP(&showTree, "show-tree", "t", false, "Prints the contents of given PVC or VolumeSnapshot")
Expand Down

0 comments on commit 36b01b0

Please sign in to comment.