mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
Fix vmware plugin compilation error due to eclipse refactoring.
This commit is contained in:
parent
539824797c
commit
09ba55103e
@ -119,9 +119,9 @@ public class VmwareServerDiscoverer extends DiscovererBase implements
|
||||
public VmwareServerDiscoverer() {
|
||||
s_logger.info("VmwareServerDiscoverer is constructed");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Map<? extends ServerResource, Map<String, String>> find(long dcId, Long podId, Long clusterId, URI url,
|
||||
public Map<? extends ServerResource, Map<String, String>> find(long dcId, Long podId, Long clusterId, URI url,
|
||||
String username, String password, List<String> hostTags) throws DiscoveryException {
|
||||
|
||||
if(s_logger.isInfoEnabled())
|
||||
@ -312,7 +312,7 @@ public class VmwareServerDiscoverer extends DiscovererBase implements
|
||||
.decode(uriFromCluster.getPath()));
|
||||
|
||||
if (morCluster == null
|
||||
|| !morCluster.getProtocol().equalsIgnoreCase(
|
||||
|| !morCluster.getType().equalsIgnoreCase(
|
||||
"ClusterComputeResource")) {
|
||||
s_logger.warn("Cluster url does not point to a valid vSphere cluster, url: "
|
||||
+ clusterDetails.get("url"));
|
||||
@ -345,7 +345,7 @@ public class VmwareServerDiscoverer extends DiscovererBase implements
|
||||
details.put("url", hostMo.getHostName());
|
||||
details.put("username", username);
|
||||
details.put("password", password);
|
||||
String guid = morHost.getProtocol() + ":" + morHost.getValue()
|
||||
String guid = morHost.getType() + ":" + morHost.getValue()
|
||||
+ "@" + url.getHost();
|
||||
details.put("guid", guid);
|
||||
|
||||
@ -402,7 +402,7 @@ public class VmwareServerDiscoverer extends DiscovererBase implements
|
||||
for (ManagedObjectReference morHost : morHosts) {
|
||||
ManagedObjectReference morParent = (ManagedObjectReference) context
|
||||
.getVimClient().getDynamicProperty(morHost, "parent");
|
||||
if (morParent.getProtocol().equalsIgnoreCase(
|
||||
if (morParent.getType().equalsIgnoreCase(
|
||||
"ClusterComputeResource"))
|
||||
return false;
|
||||
}
|
||||
@ -410,7 +410,7 @@ public class VmwareServerDiscoverer extends DiscovererBase implements
|
||||
for (ManagedObjectReference morHost : morHosts) {
|
||||
ManagedObjectReference morParent = (ManagedObjectReference) context
|
||||
.getVimClient().getDynamicProperty(morHost, "parent");
|
||||
if (!morParent.getProtocol().equalsIgnoreCase(
|
||||
if (!morParent.getType().equalsIgnoreCase(
|
||||
"ClusterComputeResource"))
|
||||
return false;
|
||||
|
||||
@ -637,7 +637,7 @@ public class VmwareServerDiscoverer extends DiscovererBase implements
|
||||
return VirtualSwitchType.NexusDistributedVirtualSwitch;
|
||||
else if(useDVS)
|
||||
return VirtualSwitchType.VMwareDistributedVirtualSwitch;
|
||||
else
|
||||
else
|
||||
return VirtualSwitchType.StandardVirtualSwitch;
|
||||
}
|
||||
|
||||
|
||||
@ -336,7 +336,7 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw
|
||||
if(mor != null) {
|
||||
List<ManagedObjectReference> returnedHostList = new ArrayList<ManagedObjectReference>();
|
||||
|
||||
if(mor.getProtocol().equals("ComputeResource")) {
|
||||
if(mor.getType().equals("ComputeResource")) {
|
||||
List<ManagedObjectReference> hosts = (List<ManagedObjectReference>)serviceContext.getVimClient().getDynamicProperty(mor, "host");
|
||||
assert(hosts != null && hosts.size() > 0);
|
||||
|
||||
@ -346,7 +346,7 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw
|
||||
prepareHost(hostMo, privateTrafficLabel);
|
||||
returnedHostList.add(hosts.get(0));
|
||||
return returnedHostList;
|
||||
} else if(mor.getProtocol().equals("ClusterComputeResource")) {
|
||||
} else if(mor.getType().equals("ClusterComputeResource")) {
|
||||
List<ManagedObjectReference> hosts = (List<ManagedObjectReference>)serviceContext.getVimClient().getDynamicProperty(mor, "host");
|
||||
assert(hosts != null);
|
||||
|
||||
@ -368,14 +368,14 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw
|
||||
returnedHostList.add(morHost);
|
||||
}
|
||||
return returnedHostList;
|
||||
} else if(mor.getProtocol().equals("HostSystem")) {
|
||||
} else if(mor.getType().equals("HostSystem")) {
|
||||
// For ESX host, we need to enable host firewall to allow VNC access
|
||||
HostMO hostMo = new HostMO(serviceContext, mor);
|
||||
prepareHost(hostMo, privateTrafficLabel);
|
||||
returnedHostList.add(mor);
|
||||
return returnedHostList;
|
||||
} else {
|
||||
s_logger.error("Unsupport host type " + mor.getProtocol() + ":" + mor.getValue() + " from inventory path: " + hostInventoryPath);
|
||||
s_logger.error("Unsupport host type " + mor.getType() + ":" + mor.getValue() + " from inventory path: " + hostInventoryPath);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1755,11 +1755,11 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
|
||||
args += " -6 " + cmd.getVmIp6Address();
|
||||
args += " -u " + cmd.getDuid();
|
||||
}
|
||||
|
||||
|
||||
if (!cmd.isDefault()) {
|
||||
args += " -N";
|
||||
}
|
||||
|
||||
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("Run command on domR " + cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP) + ", /root/edithosts.sh " + args);
|
||||
}
|
||||
@ -4470,7 +4470,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
|
||||
|
||||
ManagedObjectReference morParent = vmOwnerHost.getParentMor();
|
||||
HashMap<String, Integer> portInfo;
|
||||
if(morParent.getProtocol().equalsIgnoreCase("ClusterComputeResource")) {
|
||||
if(morParent.getType().equalsIgnoreCase("ClusterComputeResource")) {
|
||||
ClusterMO clusterMo = new ClusterMO(vmOwnerHost.getContext(), morParent);
|
||||
portInfo = clusterMo.getVmVncPortsOnCluster();
|
||||
} else {
|
||||
@ -5067,7 +5067,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
|
||||
|
||||
@Override
|
||||
public VmwareHypervisorHost getHyperHost(VmwareContext context, Command cmd) {
|
||||
if (_morHyperHost.getProtocol().equalsIgnoreCase("HostSystem")) {
|
||||
if (_morHyperHost.getType().equalsIgnoreCase("HostSystem")) {
|
||||
return new HostMO(context, _morHyperHost);
|
||||
}
|
||||
return new ClusterMO(context, _morHyperHost);
|
||||
|
||||
@ -221,7 +221,7 @@ public class VmwareSecondaryStorageResourceHandler implements SecondaryStorageRe
|
||||
morHyperHost.setType(hostTokens[0]);
|
||||
morHyperHost.setValue(hostTokens[1]);
|
||||
|
||||
if(morHyperHost.getProtocol().equalsIgnoreCase("HostSystem")) {
|
||||
if(morHyperHost.getType().equalsIgnoreCase("HostSystem")) {
|
||||
HostMO hostMo = new HostMO(context, morHyperHost);
|
||||
|
||||
try {
|
||||
@ -278,7 +278,7 @@ public class VmwareSecondaryStorageResourceHandler implements SecondaryStorageRe
|
||||
morHyperHost.setType(hostTokens[0]);
|
||||
morHyperHost.setValue(hostTokens[1]);
|
||||
|
||||
if(morHyperHost.getProtocol().equalsIgnoreCase("HostSystem")) {
|
||||
if(morHyperHost.getType().equalsIgnoreCase("HostSystem")) {
|
||||
HostMO hostMo = new HostMO(context, morHyperHost);
|
||||
try {
|
||||
VmwareHypervisorHostNetworkSummary netSummary = hostMo.getHyperHostNetworkSummary(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user