diff --git a/internal/cmd/alpha/module/enable.go b/internal/cmd/alpha/module/add.go similarity index 83% rename from internal/cmd/alpha/module/enable.go rename to internal/cmd/alpha/module/add.go index 2434b79e2..148935342 100644 --- a/internal/cmd/alpha/module/enable.go +++ b/internal/cmd/alpha/module/add.go @@ -9,7 +9,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" ) -type enableConfig struct { +type addConfig struct { *cmdcommon.KymaConfig module string @@ -18,19 +18,19 @@ type enableConfig struct { defaultCR bool } -func newEnableCMD(kymaConfig *cmdcommon.KymaConfig) *cobra.Command { - cfg := enableConfig{ +func newAddCMD(kymaConfig *cmdcommon.KymaConfig) *cobra.Command { + cfg := addConfig{ KymaConfig: kymaConfig, } cmd := &cobra.Command{ - Use: "enable ", - Short: "Enable module.", - Long: "Use this command to enable module.", + Use: "add ", + Short: "Add module.", + Long: "Use this command to add module.", Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { cfg.module = args[0] - clierror.Check(runEnable(&cfg)) + clierror.Check(runAdd(&cfg)) }, } @@ -43,7 +43,7 @@ func newEnableCMD(kymaConfig *cmdcommon.KymaConfig) *cobra.Command { return cmd } -func runEnable(cfg *enableConfig) clierror.Error { +func runAdd(cfg *addConfig) clierror.Error { client, clierr := cfg.GetKubeClientWithClierr() if clierr != nil { return clierr diff --git a/internal/cmd/alpha/module/disable.go b/internal/cmd/alpha/module/delete.go similarity index 64% rename from internal/cmd/alpha/module/disable.go rename to internal/cmd/alpha/module/delete.go index e067c2111..a41b7d553 100644 --- a/internal/cmd/alpha/module/disable.go +++ b/internal/cmd/alpha/module/delete.go @@ -7,32 +7,32 @@ import ( "github.com/spf13/cobra" ) -type disableConfig struct { +type deleteConfig struct { *cmdcommon.KymaConfig module string } -func newDisableCMD(kymaConfig *cmdcommon.KymaConfig) *cobra.Command { - cfg := disableConfig{ +func newDeleteCMD(kymaConfig *cmdcommon.KymaConfig) *cobra.Command { + cfg := deleteConfig{ KymaConfig: kymaConfig, } cmd := &cobra.Command{ - Use: "disable ", - Short: "Disable module", - Long: "Use this command to disable module", + Use: "delete ", + Short: "Delete module", + Long: "Use this command to delete module", Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { cfg.module = args[0] - clierror.Check(runDisable(&cfg)) + clierror.Check(runDelete(&cfg)) }, } return cmd } -func runDisable(cfg *disableConfig) clierror.Error { +func runDelete(cfg *deleteConfig) clierror.Error { client, clierr := cfg.GetKubeClientWithClierr() if clierr != nil { return clierr diff --git a/internal/cmd/alpha/module/module.go b/internal/cmd/alpha/module/module.go index 8afd74007..d2bd07f8b 100644 --- a/internal/cmd/alpha/module/module.go +++ b/internal/cmd/alpha/module/module.go @@ -14,8 +14,8 @@ func NewModuleCMD(kymaConfig *cmdcommon.KymaConfig) *cobra.Command { } cmd.AddCommand(newListCMD(kymaConfig)) - cmd.AddCommand(newEnableCMD(kymaConfig)) - cmd.AddCommand(newDisableCMD(kymaConfig)) + cmd.AddCommand(newAddCMD(kymaConfig)) + cmd.AddCommand(newDeleteCMD(kymaConfig)) return cmd }