From d4f40ecc6a2b7c8852f3c8de9f63c8e93050d95d Mon Sep 17 00:00:00 2001 From: Suresh Kumar Anaparti Date: Tue, 15 Feb 2022 22:02:41 +0530 Subject: [PATCH] Fixed strings import issue (#5998) * Fixed strings import issue in KubernetesClusterResourceModifierActionWorker * Use isNoneEmpty --- .../KubernetesClusterResourceModifierActionWorker.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterResourceModifierActionWorker.java b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterResourceModifierActionWorker.java index e1f2a76604a..dd5adf6e0bf 100644 --- a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterResourceModifierActionWorker.java +++ b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterResourceModifierActionWorker.java @@ -76,7 +76,6 @@ import com.cloud.vm.UserVmManager; import com.cloud.vm.VirtualMachine; import com.cloud.vm.VmDetailConstants; import com.cloud.vm.dao.VMInstanceDao; -import com.google.common.base.Strings; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.command.user.firewall.CreateFirewallRuleCmd; @@ -188,7 +187,7 @@ public class KubernetesClusterResourceModifierActionWorker extends KubernetesClu registryUrl = detail.getValue(); } } - if (!Strings.isNullOrEmpty(registryUsername) && !Strings.isNullOrEmpty(registryPassword) && !Strings.isNullOrEmpty(registryUrl)) { + if (StringUtils.isNoneEmpty(registryUsername, registryPassword, registryUrl)) { // Update runcmd in the cloud-init configuration to run a script that updates the containerd config with provided registry details String runCmd = "- bash -x /opt/bin/setup-containerd";