From ea30075bb8f5173ee885fb63eab9af5f612ae3c8 Mon Sep 17 00:00:00 2001 From: David Lee Date: Tue, 30 Apr 2024 10:06:24 -0400 Subject: [PATCH] OCM-7811 | fix: hide attach and detach commands --- cmd/attach/cmd.go | 9 +++++---- cmd/attach/policy/cmd.go | 1 + cmd/detach/cmd.go | 9 +++++---- cmd/detach/policy/cmd.go | 1 + 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/cmd/attach/cmd.go b/cmd/attach/cmd.go index eec2b813a9..e5e8467c04 100644 --- a/cmd/attach/cmd.go +++ b/cmd/attach/cmd.go @@ -24,10 +24,11 @@ import ( func NewRosaAttachCommand() *cobra.Command { cmd := &cobra.Command{ - Use: "attach", - Short: "Attach AWS resource", - Long: "Attach AWS resource", - Args: cobra.NoArgs, + Use: "attach", + Short: "Attach AWS resource", + Long: "Attach AWS resource", + Hidden: true, + Args: cobra.NoArgs, } cmd.AddCommand(policy.NewAttachPolicyCommand()) return cmd diff --git a/cmd/attach/policy/cmd.go b/cmd/attach/policy/cmd.go index 0a3f1837b3..be5dc89231 100644 --- a/cmd/attach/policy/cmd.go +++ b/cmd/attach/policy/cmd.go @@ -54,6 +54,7 @@ func NewAttachPolicyCommand() *cobra.Command { Short: short, Long: long, Example: example, + Hidden: true, Args: cobra.NoArgs, Run: rosa.DefaultRunner(rosa.RuntimeWithOCMAndAWS(), AttachPolicyRunner(&options)), } diff --git a/cmd/detach/cmd.go b/cmd/detach/cmd.go index fe5e1cd889..1b9a6b191d 100644 --- a/cmd/detach/cmd.go +++ b/cmd/detach/cmd.go @@ -24,10 +24,11 @@ import ( func NewRosaDetachCommand() *cobra.Command { cmd := &cobra.Command{ - Use: "detach", - Short: "Detach AWS resource", - Long: "Detach AWS resource", - Args: cobra.NoArgs, + Use: "detach", + Short: "Detach AWS resource", + Long: "Detach AWS resource", + Hidden: true, + Args: cobra.NoArgs, } cmd.AddCommand(policy.NewDetachPolicyCommand()) return cmd diff --git a/cmd/detach/policy/cmd.go b/cmd/detach/policy/cmd.go index 79bd54ed1e..3d36ce442c 100644 --- a/cmd/detach/policy/cmd.go +++ b/cmd/detach/policy/cmd.go @@ -54,6 +54,7 @@ func NewDetachPolicyCommand() *cobra.Command { Short: short, Long: long, Example: example, + Hidden: true, Args: cobra.NoArgs, Run: rosa.DefaultRunner(rosa.RuntimeWithOCMAndAWS(), DetachPolicyRunner(&options)), }