Fixed strings import issue (#5998)

* Fixed strings import issue in KubernetesClusterResourceModifierActionWorker

* Use isNoneEmpty
This commit is contained in:
Suresh Kumar Anaparti 2022-02-15 22:02:41 +05:30 committed by GitHub
parent b50542a11c
commit d4f40ecc6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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";