chore: rename CheckPaused to VerifyNotPaused

pull/15868/head
Tongyao Si 2023-03-06 14:35:43 +00:00 committed by Steven Powell
parent c7ee592a76
commit 06fb28c2c3
3 changed files with 4 additions and 4 deletions

View File

@ -35,7 +35,7 @@ var addonsDisableCmd = &cobra.Command{
if len(args) != 1 {
exit.Message(reason.Usage, "usage: minikube addons disable ADDON_NAME")
}
err := addons.CheckPaused(ClusterFlagValue(), false)
err := addons.VerifyNotPaused(ClusterFlagValue(), false)
if err != nil {
exit.Error(reason.InternalAddonDisablePaused, "disable failed", err)
}

View File

@ -48,7 +48,7 @@ var addonsEnableCmd = &cobra.Command{
exit.Message(reason.Usage, "You cannot enable addons on a cluster without Kubernetes, to enable Kubernetes on your cluster, run: minikube start --kubernetes-version=stable")
}
err = addons.CheckPaused(ClusterFlagValue(), true)
err = addons.VerifyNotPaused(ClusterFlagValue(), true)
if err != nil {
exit.Error(reason.InternalAddonEnablePaused, "enabled failed", err)
}

View File

@ -588,8 +588,8 @@ func UpdateConfigToDisable(cc *config.ClusterConfig) {
}
}
// CheckPaused checks whether the cluster is paused before enable/disable an addon.
func CheckPaused(profile string, enable bool) error {
// VerifyNotPaused verifies the cluster is not paused before enable/disable an addon.
func VerifyNotPaused(profile string, enable bool) error {
klog.Info("checking whether the cluster is paused")
cc, err := config.Load(profile)