mirror of https://github.com/apache/cloudstack.git
Normalize name convention for vmware hypervisor
This commit is contained in:
parent
a267d1c261
commit
4696b16d10
|
|
@ -24,7 +24,7 @@ public class Hypervisor {
|
|||
Xen,
|
||||
XenServer,
|
||||
KVM,
|
||||
VmWare,
|
||||
VMware,
|
||||
VirtualBox,
|
||||
Parralels,
|
||||
Any; /*If you don't care about the hypervisor type*/
|
||||
|
|
@ -40,8 +40,8 @@ public class Hypervisor {
|
|||
return HypervisorType.XenServer;
|
||||
} else if (hypervisor.equalsIgnoreCase("KVM")) {
|
||||
return HypervisorType.KVM;
|
||||
} else if (hypervisor.equalsIgnoreCase("VmWare")) {
|
||||
return HypervisorType.VmWare;
|
||||
} else if (hypervisor.equalsIgnoreCase("VMware")) {
|
||||
return HypervisorType.VMware;
|
||||
} else if (hypervisor.equalsIgnoreCase("VirtualBox")) {
|
||||
return HypervisorType.VirtualBox;
|
||||
} else if (hypervisor.equalsIgnoreCase("Parralels")) {
|
||||
|
|
|
|||
|
|
@ -610,11 +610,9 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory,
|
|||
"Please specify a hypervisor");
|
||||
}
|
||||
|
||||
Hypervisor.HypervisorType hypervisorType = Hypervisor.HypervisorType
|
||||
.valueOf(cmd.getHypervisor());
|
||||
Hypervisor.HypervisorType hypervisorType = Hypervisor.HypervisorType.getType(cmd.getHypervisor());
|
||||
if (hypervisorType == null) {
|
||||
throw new InvalidParameterValueException(
|
||||
"Please specify a valid hypervisor name");
|
||||
throw new InvalidParameterValueException("Please specify a valid hypervisor name");
|
||||
}
|
||||
|
||||
Cluster.ClusterType clusterType = null;
|
||||
|
|
@ -2625,7 +2623,7 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory,
|
|||
// If this command is from a KVM agent, or from an agent that has a
|
||||
// null hypervisor type, don't do the CIDR check
|
||||
if (hypervisorType == null || hypervisorType == HypervisorType.KVM
|
||||
|| hypervisorType == HypervisorType.VmWare) {
|
||||
|| hypervisorType == HypervisorType.VMware) {
|
||||
doCidrCheck = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ public enum Config {
|
|||
CPUOverprovisioningFactor("Advanced", ManagementServer.class, String.class, "cpu.overprovisioning.factor", "1", "Used for CPU overprovisioning calculation; available CPU will be (actualCpuCapacity * cpu.overprovisioning.factor)", null),
|
||||
LinkLocalIpNums("Advanced", ManagementServer.class, Integer.class, "linkLocalIp.nums", "10", "The number of link local ip that needed by domR(in power of 2)", null),
|
||||
HypervisorDefaultType("Advanced", ManagementServer.class, String.class, "hypervisor.type", HypervisorType.KVM.toString(), "The type of hypervisor that this deployment will use.", "kvm,xenserver,vmware"),
|
||||
HypervisorList("Advanced", ManagementServer.class, String.class, "hypervisor.list", HypervisorType.KVM + "," + HypervisorType.XenServer + "," + HypervisorType.VmWare, "The list of hypervisors that this deployment will use.", "hypervisorList"),
|
||||
HypervisorList("Advanced", ManagementServer.class, String.class, "hypervisor.list", HypervisorType.KVM + "," + HypervisorType.XenServer + "," + HypervisorType.VMware, "The list of hypervisors that this deployment will use.", "hypervisorList"),
|
||||
ManagementHostIPAdr("Advanced", ManagementServer.class, String.class, "host", "localhost", "The ip address of management server", null),
|
||||
EventPurgeDelay("Advanced", ManagementServer.class, Integer.class, "event.purge.delay", "0", "Events older than specified number days will be purged", null),
|
||||
UseLocalStorage("Premium", ManagementServer.class, Boolean.class, "use.local.storage", "false", "Should we use the local storage if it's available?", null),
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ public class FirstFitPlanner extends PlannerBase implements DeploymentPlanner {
|
|||
s_logger.debug("try to allocate a host from dc:" + plan.getDataCenterId() + ", pod:" + plan.getPodId() + ",cluster:" + plan.getClusterId() +
|
||||
", requested cpu: " + cpu_requested + ", requested ram: " + ram_requested);
|
||||
if (vm.getLastHostId() != null) {
|
||||
|
||||
HostVO host = _hostDao.findById(vm.getLastHostId());
|
||||
|
||||
if (host != null && host.getStatus() == Status.Up) {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class VMwareGuru extends HypervisorGuruBase implements HypervisorGuru {
|
|||
|
||||
@Override
|
||||
public HypervisorType getHypervisorType() {
|
||||
return HypervisorType.VmWare;
|
||||
return HypervisorType.VMware;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ public class ControlNetworkGuru extends PodBasedNetworkGuru implements NetworkGu
|
|||
return null;
|
||||
}
|
||||
|
||||
if(vm.getHypervisorType() == HypervisorType.VmWare && vm.getType() != VirtualMachine.Type.DomainRouter) {
|
||||
if(vm.getHypervisorType() == HypervisorType.VMware && vm.getType() != VirtualMachine.Type.DomainRouter) {
|
||||
NicProfile nicProf = new NicProfile(Nic.ReservationStrategy.Create, null, null, null, null);
|
||||
String mac = _networkMgr.getNextAvailableMacAddressInNetwork(config.getId());
|
||||
nicProf.setMacAddress(mac);
|
||||
|
|
@ -117,7 +117,7 @@ public class ControlNetworkGuru extends PodBasedNetworkGuru implements NetworkGu
|
|||
InsufficientAddressCapacityException {
|
||||
assert nic.getTrafficType() == TrafficType.Control;
|
||||
|
||||
if (dest.getHost().getHypervisorType() == HypervisorType.VmWare && vm.getType() == VirtualMachine.Type.DomainRouter) {
|
||||
if (dest.getHost().getHypervisorType() == HypervisorType.VMware && vm.getType() == VirtualMachine.Type.DomainRouter) {
|
||||
super.reserve(nic, config, vm, dest, context);
|
||||
|
||||
String mac = _networkMgr.getNextAvailableMacAddressInNetwork(config.getId());
|
||||
|
|
@ -137,7 +137,7 @@ public class ControlNetworkGuru extends PodBasedNetworkGuru implements NetworkGu
|
|||
public boolean release(NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, String reservationId) {
|
||||
assert nic.getTrafficType() == TrafficType.Control;
|
||||
|
||||
if (vm.getHypervisorType() == HypervisorType.VmWare && vm.getType() == VirtualMachine.Type.DomainRouter) {
|
||||
if (vm.getHypervisorType() == HypervisorType.VMware && vm.getType() == VirtualMachine.Type.DomainRouter) {
|
||||
super.release(nic, vm, reservationId);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1049,7 +1049,7 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
|||
} else if (nic.getTrafficType() == TrafficType.Control) {
|
||||
|
||||
// DOMR control command is sent over management server in VMware
|
||||
if (dest.getHost().getHypervisorType() == HypervisorType.VmWare) {
|
||||
if (dest.getHost().getHypervisorType() == HypervisorType.VMware) {
|
||||
if(s_logger.isInfoEnabled()) {
|
||||
s_logger.info("Check if we need to add management server explicit route to DomR. pod cidr: " + dest.getPod().getCidrAddress() + "/" + dest.getPod().getCidrSize()
|
||||
+ ", pod gateway: " + dest.getPod().getGateway() + ", management host: " + _mgmt_host);
|
||||
|
|
|
|||
|
|
@ -2209,7 +2209,7 @@ public class StorageManagerImpl implements StorageManager, StorageService, Manag
|
|||
|
||||
private boolean sendToVmResidesOn(StoragePoolVO storagePool, Command cmd) {
|
||||
ClusterVO cluster = _clusterDao.findById(storagePool.getClusterId());
|
||||
if ((cluster.getHypervisorType() == HypervisorType.KVM || cluster.getHypervisorType() == HypervisorType.VmWare) &&
|
||||
if ((cluster.getHypervisorType() == HypervisorType.KVM || cluster.getHypervisorType() == HypervisorType.VMware) &&
|
||||
((cmd instanceof ManageSnapshotCommand) ||
|
||||
(cmd instanceof BackupSnapshotCommand))) {
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public class StoragePoolMonitor implements Listener {
|
|||
if (cmd instanceof StartupRoutingCommand) {
|
||||
StartupRoutingCommand scCmd = (StartupRoutingCommand)cmd;
|
||||
if (scCmd.getHypervisorType() == HypervisorType.XenServer || scCmd.getHypervisorType() == HypervisorType.KVM ||
|
||||
scCmd.getHypervisorType() == HypervisorType.VmWare) {
|
||||
scCmd.getHypervisorType() == HypervisorType.VMware) {
|
||||
List<StoragePoolVO> pools = _poolDao.listBy(host.getDataCenterId(), host.getPodId(), host.getClusterId());
|
||||
for (StoragePoolVO pool : pools) {
|
||||
Long hostId = host.getId();
|
||||
|
|
|
|||
|
|
@ -598,7 +598,7 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
|
|||
if(hostId == null) {
|
||||
hostId = vm.getLastHostId();
|
||||
HostVO host = _hostDao.findById(hostId);
|
||||
if(host != null && host.getHypervisorType() == HypervisorType.VmWare) {
|
||||
if(host != null && host.getHypervisorType() == HypervisorType.VMware) {
|
||||
sendCommand = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue