mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-6278
Baremetal Advanced Networking support
This commit is contained in:
parent
90287cc60a
commit
e06fa18ed2
@ -21,7 +21,6 @@ package com.cloud.baremetal.networkservice;
|
||||
import com.cloud.baremetal.database.BaremetalPxeVO;
|
||||
import com.cloud.baremetal.manager.BaremetalVlanManager;
|
||||
import com.cloud.dc.DataCenter;
|
||||
import com.cloud.dc.DataCenterVO;
|
||||
import com.cloud.dc.Pod;
|
||||
import com.cloud.dc.dao.DataCenterDao;
|
||||
import com.cloud.deploy.DeployDestination;
|
||||
@ -140,9 +139,11 @@ public class BaremetalPxeElement extends AdapterBase implements NetworkElement {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if (dest.getDataCenter().getNetworkType() == DataCenter.NetworkType.Advanced){
|
||||
prepareVlan(network, dest);
|
||||
}
|
||||
*/
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -154,10 +155,16 @@ public class BaremetalPxeElement extends AdapterBase implements NetworkElement {
|
||||
@Override
|
||||
public boolean release(Network network, NicProfile nic, VirtualMachineProfile vm, ReservationContext context) throws ConcurrentOperationException,
|
||||
ResourceUnavailableException {
|
||||
if (vm.getType() != Type.User || vm.getHypervisorType() != HypervisorType.BareMetal) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
DataCenterVO dc = zoneDao.findById(vm.getVirtualMachine().getDataCenterId());
|
||||
if (dc.getNetworkType() == DataCenter.NetworkType.Advanced) {
|
||||
releaseVlan(network, vm);
|
||||
}
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -1761,6 +1761,7 @@ VirtualMachineGuru, Listener, Configurable, StateListener<State, VirtualMachine.
|
||||
templateName = RouterTemplateLxc.valueIn(dest.getDataCenter().getId());
|
||||
break;
|
||||
case BareMetal:
|
||||
/*
|
||||
String peerHvType = _configDao.getValue(Config.BaremetalPeerHypervisorType.key());
|
||||
if (peerHvType == null) {
|
||||
throw new CloudRuntimeException(String.format("To use baremetal in advanced networking, you must set %s to type of hypervisor(e.g XenServer)" +
|
||||
@ -1777,6 +1778,9 @@ VirtualMachineGuru, Listener, Configurable, StateListener<State, VirtualMachine.
|
||||
} else {
|
||||
throw new CloudRuntimeException(String.format("Baremetal only supports peer hypervisor(XenServer/KVM/VMWare) right now, you specified %s", peerHvType));
|
||||
}
|
||||
*/
|
||||
hType = HypervisorType.VMware;
|
||||
templateName = RouterTemplateVmware.valueIn(dest.getDataCenter().getId());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user