diff --git a/cmd/kosli/attachPolicy.go b/cmd/kosli/attachPolicy.go index b87c47423..9541d0265 100644 --- a/cmd/kosli/attachPolicy.go +++ b/cmd/kosli/attachPolicy.go @@ -21,7 +21,7 @@ type attachPolicyOptions struct { const attachPolicyShortDesc = `Attach a policy to one or more Kosli environments. ` const attachPolicyExample = ` -# attach previously created policy to multiple environment: +# attach a previously created policy to multiple environment: kosli attach-policy yourPolicyName \ --environment yourFirstEnvironmentName \ --environment yourSecondEnvironmentName \ @@ -36,7 +36,6 @@ func newAttachPolicyCmd(out io.Writer) *cobra.Command { Short: attachPolicyShortDesc, Long: attachPolicyShortDesc, Example: attachPolicyExample, - Hidden: true, Args: cobra.ExactArgs(1), PreRunE: func(cmd *cobra.Command, args []string) error { err := RequireGlobalFlags(global, []string{"Org", "ApiToken"}) diff --git a/cmd/kosli/createPolicy.go b/cmd/kosli/createPolicy.go index 84bb84f6e..f40e91cb3 100644 --- a/cmd/kosli/createPolicy.go +++ b/cmd/kosli/createPolicy.go @@ -11,6 +11,8 @@ import ( const createPolicyShortDesc = `Create or update a Kosli policy.` +const createPolicyLongDesc = `Updating policy content creates a new version of the policy.` + const createPolicyExample = ` # create a Kosli policy: kosli create policy yourPolicyName \ @@ -44,9 +46,8 @@ func newCreatePolicyCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "policy POLICY-NAME POLICY-FILE-PATH", Short: createPolicyShortDesc, - Long: createPolicyShortDesc, + Long: createPolicyLongDesc, Example: createPolicyExample, - Hidden: true, Args: cobra.ExactArgs(2), PreRunE: func(cmd *cobra.Command, args []string) error { err := RequireGlobalFlags(global, []string{"Org", "ApiToken"}) diff --git a/cmd/kosli/detachPolicy.go b/cmd/kosli/detachPolicy.go index 3c4cc50cb..16cc7d698 100644 --- a/cmd/kosli/detachPolicy.go +++ b/cmd/kosli/detachPolicy.go @@ -16,6 +16,8 @@ type detachPolicyOptions struct { const detachPolicyShortDesc = `Detach a policy from one or more Kosli environments. ` +const detachPolicyLongDesc = `If the environment has no more policies attached to it, then its snapshots' status will become "unknown".` + const detachPolicyExample = ` # detach policy from multiple environment: kosli detach-policy yourPolicyName \ @@ -32,7 +34,6 @@ func newDetachPolicyCmd(out io.Writer) *cobra.Command { Short: detachPolicyShortDesc, Long: detachPolicyShortDesc, Example: detachPolicyExample, - Hidden: true, Args: cobra.ExactArgs(1), PreRunE: func(cmd *cobra.Command, args []string) error { err := RequireGlobalFlags(global, []string{"Org", "ApiToken"}) diff --git a/cmd/kosli/getPolicy.go b/cmd/kosli/getPolicy.go index d3cc3df71..3d3f145fb 100644 --- a/cmd/kosli/getPolicy.go +++ b/cmd/kosli/getPolicy.go @@ -21,11 +21,10 @@ type getPolicyOptions struct { func newGetPolicyCmd(out io.Writer) *cobra.Command { o := new(getPolicyOptions) cmd := &cobra.Command{ - Use: "policy POLICY-NAME", - Short: getPolicyDesc, - Long: getPolicyDesc, - Args: cobra.ExactArgs(1), - Hidden: true, + Use: "policy POLICY-NAME", + Short: getPolicyDesc, + Long: getPolicyDesc, + Args: cobra.ExactArgs(1), PreRunE: func(cmd *cobra.Command, args []string) error { err := RequireGlobalFlags(global, []string{"Org", "ApiToken"}) if err != nil { diff --git a/cmd/kosli/listPolicies.go b/cmd/kosli/listPolicies.go index 78e450ef0..c4f093b40 100644 --- a/cmd/kosli/listPolicies.go +++ b/cmd/kosli/listPolicies.go @@ -20,11 +20,10 @@ type policiesLsOptions struct { func newListPoliciesCmd(out io.Writer) *cobra.Command { o := new(policiesLsOptions) cmd := &cobra.Command{ - Use: "policies", - Short: listPoliciesDesc, - Long: listPoliciesDesc, - Args: cobra.NoArgs, - Hidden: true, + Use: "policies", + Short: listPoliciesDesc, + Long: listPoliciesDesc, + Args: cobra.NoArgs, PreRunE: func(cmd *cobra.Command, args []string) error { err := RequireGlobalFlags(global, []string{"Org", "ApiToken"}) if err != nil {