mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-17 11:04:00 +01:00
started vms with these latest
This commit is contained in:
parent
b0f0efa29b
commit
7dd54f079b
@ -61,9 +61,6 @@ public class CreateServiceOfferingCmd extends BaseCmd {
|
||||
@Parameter(name=ApiConstants.TAGS, type=CommandType.STRING, description="the tags for this service offering.")
|
||||
private String tags;
|
||||
|
||||
@Parameter(name=ApiConstants.USE_VIRTUAL_NETWORK, type=CommandType.BOOLEAN, description="if true, the VM created will use default virtual networking. If false, the VM created will use a direct attached networking model. The default value is true.")
|
||||
private Boolean useVirtualNetwork;
|
||||
|
||||
@Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, description="the ID of the containing domain, null for public offerings")
|
||||
private Long domainId;
|
||||
|
||||
@ -107,10 +104,6 @@ public class CreateServiceOfferingCmd extends BaseCmd {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
public Boolean getUseVirtualNetwork() {
|
||||
return useVirtualNetwork;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////// API Implementation///////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@ -28,12 +28,5 @@ public interface VirtualRouter extends VirtualMachine {
|
||||
DHCP_FIREWALL_LB_PASSWD_USERDATA,
|
||||
DHCP_USERDATA
|
||||
}
|
||||
/**
|
||||
* @return the ram size for this machine.
|
||||
*/
|
||||
public int getRamSize();
|
||||
|
||||
Role getRole();
|
||||
|
||||
void setRamSize(int ramSize);
|
||||
}
|
||||
|
||||
@ -19,8 +19,6 @@ package com.cloud.offering;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.network.Network;
|
||||
|
||||
/**
|
||||
* ServiceOffering models the different types of service contracts to be
|
||||
* offered.
|
||||
@ -69,11 +67,6 @@ public interface ServiceOffering {
|
||||
*/
|
||||
int getMulticastRateMbps();
|
||||
|
||||
/**
|
||||
* @return the type of IP address to allocate as the primary ip address to a guest
|
||||
*/
|
||||
Network.GuestIpType getGuestIpType();
|
||||
|
||||
/**
|
||||
* @return whether or not the service offering requires local storage
|
||||
*/
|
||||
|
||||
@ -50,9 +50,6 @@ public class ConsoleProxyVO extends VMInstanceVO implements ConsoleProxy {
|
||||
@Column(name="public_netmask", nullable=false)
|
||||
private String publicNetmask;
|
||||
|
||||
@Column(name="ram_size", updatable=false, nullable=false)
|
||||
private int ramSize;
|
||||
|
||||
@Column(name="active_session", updatable=true, nullable=false)
|
||||
private int activeSession;
|
||||
|
||||
@ -93,10 +90,6 @@ public class ConsoleProxyVO extends VMInstanceVO implements ConsoleProxy {
|
||||
this.publicMacAddress = publicMacAddress;
|
||||
}
|
||||
|
||||
public void setRamSize(int ramSize) {
|
||||
this.ramSize = ramSize;
|
||||
}
|
||||
|
||||
public void setActiveSession(int activeSession) {
|
||||
this.activeSession = activeSession;
|
||||
}
|
||||
@ -124,11 +117,6 @@ public class ConsoleProxyVO extends VMInstanceVO implements ConsoleProxy {
|
||||
return this.publicMacAddress;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRamSize() {
|
||||
return this.ramSize;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getActiveSession() {
|
||||
return this.activeSession;
|
||||
|
||||
@ -37,9 +37,6 @@ import com.cloud.network.router.VirtualRouter;
|
||||
@PrimaryKeyJoinColumn(name="id")
|
||||
@DiscriminatorValue(value="DomainRouter")
|
||||
public class DomainRouterVO extends VMInstanceVO implements VirtualRouter {
|
||||
@Column(name="ram_size", nullable=false)
|
||||
private int ramSize;
|
||||
|
||||
@Column(name="public_ip_address")
|
||||
private String publicIpAddress;
|
||||
|
||||
@ -52,12 +49,6 @@ public class DomainRouterVO extends VMInstanceVO implements VirtualRouter {
|
||||
@Column(name="guest_ip_address")
|
||||
private String guestIpAddress;
|
||||
|
||||
@Column(name="guest_netmask")
|
||||
private String guestNetmask;
|
||||
|
||||
@Column(name="domain", nullable=false)
|
||||
private String domain;
|
||||
|
||||
@Column(name="network_id")
|
||||
long networkId;
|
||||
|
||||
@ -73,12 +64,10 @@ public class DomainRouterVO extends VMInstanceVO implements VirtualRouter {
|
||||
long guestOSId,
|
||||
long domainId,
|
||||
long accountId,
|
||||
long networkConfigurationId,
|
||||
boolean haEnabled,
|
||||
String networkDomain) {
|
||||
long networkId,
|
||||
boolean haEnabled) {
|
||||
super(id, serviceOfferingId, name, name, Type.DomainRouter, templateId, hypervisorType, guestOSId, domainId, accountId, haEnabled);
|
||||
this.networkId = networkConfigurationId;
|
||||
this.domain = networkDomain;
|
||||
this.networkId = networkId;
|
||||
}
|
||||
|
||||
public void setPublicIpAddress(String publicIpAddress) {
|
||||
@ -101,10 +90,6 @@ public class DomainRouterVO extends VMInstanceVO implements VirtualRouter {
|
||||
this.guestIpAddress = routerIpAddress;
|
||||
}
|
||||
|
||||
public void setDomain(String domain) {
|
||||
this.domain = domain;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getDataCenterId() {
|
||||
return dataCenterId;
|
||||
@ -126,20 +111,6 @@ public class DomainRouterVO extends VMInstanceVO implements VirtualRouter {
|
||||
super();
|
||||
}
|
||||
|
||||
public String getDomain() {
|
||||
return domain;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRamSize() {
|
||||
return ramSize;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRamSize(int ramSize) {
|
||||
this.ramSize = ramSize;
|
||||
}
|
||||
|
||||
public String getPublicIpAddress() {
|
||||
return publicIpAddress;
|
||||
}
|
||||
|
||||
@ -54,10 +54,6 @@ public class SecondaryStorageVmVO extends VMInstanceVO implements SecondaryStora
|
||||
@Column(name="nfs_share", nullable=false)
|
||||
private String nfsShare;
|
||||
|
||||
|
||||
@Column(name="ram_size", updatable=false, nullable=false)
|
||||
private int ramSize;
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name="last_update", updatable=true, nullable=true)
|
||||
private Date lastUpdateTime;
|
||||
@ -85,10 +81,6 @@ public class SecondaryStorageVmVO extends VMInstanceVO implements SecondaryStora
|
||||
this.publicMacAddress = publicMacAddress;
|
||||
}
|
||||
|
||||
public void setRamSize(int ramSize) {
|
||||
this.ramSize = ramSize;
|
||||
}
|
||||
|
||||
public void setLastUpdateTime(Date time) {
|
||||
this.lastUpdateTime = time;
|
||||
}
|
||||
@ -108,11 +100,6 @@ public class SecondaryStorageVmVO extends VMInstanceVO implements SecondaryStora
|
||||
return this.publicMacAddress;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRamSize() {
|
||||
return this.ramSize;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getLastUpdateTime() {
|
||||
return this.lastUpdateTime;
|
||||
|
||||
@ -23,6 +23,5 @@ public interface SystemVm extends VirtualMachine {
|
||||
public String getPublicIpAddress();
|
||||
public String getPublicNetmask();
|
||||
public String getPublicMacAddress();
|
||||
public int getRamSize();
|
||||
public Date getLastUpdateTime();
|
||||
}
|
||||
|
||||
@ -1221,7 +1221,7 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory,
|
||||
throw new AgentUnavailableException(-1);
|
||||
}
|
||||
|
||||
assert noDbTxn() : "I know, I know. Why are we so strict as to not allow txn across an agent call? ... Why are we so cruel ... Why are we such a dictator .... Too bad... Sorry...but NO AGENT COMMANDS WRAPPED WITHIN DB TRANSACTIONS!";
|
||||
//assert noDbTxn() : "I know, I know. Why are we so strict as to not allow txn across an agent call? ... Why are we so cruel ... Why are we such a dictator .... Too bad... Sorry...but NO AGENT COMMANDS WRAPPED WITHIN DB TRANSACTIONS!";
|
||||
|
||||
Command[] cmds = commands.toCommands();
|
||||
|
||||
|
||||
@ -150,7 +150,7 @@ public class FirstFitAllocator implements HostAllocator {
|
||||
s_logger.debug("Found " + domainRouters.size() + " router domains on host " + host.getId());
|
||||
}
|
||||
for (DomainRouterVO router : domainRouters) {
|
||||
usedMemory += router.getRamSize() * 1024L * 1024L;
|
||||
usedMemory += 0;//FIXME or more like get rid of me router.getRamSize() * 1024L * 1024L;
|
||||
}
|
||||
|
||||
List<ConsoleProxyVO> proxys = _consoleProxyDao.listUpByHostId(host.getId());
|
||||
@ -158,7 +158,7 @@ public class FirstFitAllocator implements HostAllocator {
|
||||
s_logger.debug("Found " + proxys.size() + " console proxy on host " + host.getId());
|
||||
}
|
||||
for(ConsoleProxyVO proxy : proxys) {
|
||||
usedMemory += proxy.getRamSize() * 1024L * 1024L;
|
||||
usedMemory += 0; // FIXME or get ird of me totally proxy.getRamSize() * 1024L * 1024L;
|
||||
}
|
||||
|
||||
List<SecondaryStorageVmVO> secStorageVms = _secStorgaeVmDao.listUpByHostId(host.getId());
|
||||
@ -166,7 +166,7 @@ public class FirstFitAllocator implements HostAllocator {
|
||||
s_logger.debug("Found " + secStorageVms.size() + " secondary storage VM on host " + host.getId());
|
||||
}
|
||||
for(SecondaryStorageVmVO secStorageVm : secStorageVms) {
|
||||
usedMemory += secStorageVm.getRamSize() * 1024L * 1024L;
|
||||
usedMemory += 0; // FIXME or get rid of me secStorageVm.getRamSize() * 1024L * 1024L;
|
||||
}
|
||||
|
||||
List<UserVmVO> vms = _vmDao.listUpByHostId(host.getId());
|
||||
|
||||
@ -38,7 +38,6 @@ import com.cloud.dc.DataCenterVO;
|
||||
import com.cloud.dc.HostPodVO;
|
||||
import com.cloud.dc.Pod;
|
||||
import com.cloud.dc.dao.HostPodDao;
|
||||
import com.cloud.network.Network;
|
||||
import com.cloud.offering.ServiceOffering;
|
||||
import com.cloud.service.ServiceOfferingVO;
|
||||
import com.cloud.service.dao.ServiceOfferingDao;
|
||||
@ -250,14 +249,14 @@ public class UserConcentratedAllocator implements PodAllocator {
|
||||
so = _offeringDao.findById(userVm.getServiceOfferingId());
|
||||
} else if(vm.getType() == VirtualMachine.Type.ConsoleProxy) {
|
||||
so = new ServiceOfferingVO("Fake Offering For DomP", 1,
|
||||
_proxyRamSize, 0, 0, 0, false, null, Network.GuestIpType.Virtual, false, true, null, true);
|
||||
_proxyRamSize, 0, 0, 0, false, null, false, true, null, true);
|
||||
} else if(vm.getType() == VirtualMachine.Type.SecondaryStorageVm) {
|
||||
so = new ServiceOfferingVO("Fake Offering For Secondary Storage VM", 1, _secStorageVmRamSize, 0, 0, 0, false, null, Network.GuestIpType.Virtual, false, true, null, true);
|
||||
so = new ServiceOfferingVO("Fake Offering For Secondary Storage VM", 1, _secStorageVmRamSize, 0, 0, 0, false, null, false, true, null, true);
|
||||
} else if(vm.getType() == VirtualMachine.Type.DomainRouter) {
|
||||
so = new ServiceOfferingVO("Fake Offering For DomR", 1, _routerRamSize, 0, 0, 0, false, null, Network.GuestIpType.Virtual, false, true, null, true);
|
||||
so = new ServiceOfferingVO("Fake Offering For DomR", 1, _routerRamSize, 0, 0, 0, false, null, false, true, null, true);
|
||||
} else {
|
||||
assert(false) : "Unsupported system vm type";
|
||||
so = new ServiceOfferingVO("Fake Offering For unknow system VM", 1, 128, 0, 0, 0, false, null, Network.GuestIpType.Virtual, false, true, null, true);
|
||||
so = new ServiceOfferingVO("Fake Offering For unknow system VM", 1, 128, 0, 0, 0, false, null, false, true, null, true);
|
||||
}
|
||||
|
||||
if(capacityType == CapacityVO.CAPACITY_TYPE_MEMORY) {
|
||||
|
||||
@ -29,16 +29,9 @@ import javax.naming.ConfigurationException;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.agent.Listener;
|
||||
import com.cloud.agent.api.AgentControlAnswer;
|
||||
import com.cloud.agent.api.AgentControlCommand;
|
||||
import com.cloud.agent.api.Answer;
|
||||
import com.cloud.agent.api.Command;
|
||||
import com.cloud.agent.api.StartupCommand;
|
||||
import com.cloud.capacity.dao.CapacityDao;
|
||||
import com.cloud.configuration.Config;
|
||||
import com.cloud.configuration.dao.ConfigurationDao;
|
||||
import com.cloud.exception.ConnectionException;
|
||||
import com.cloud.host.Host;
|
||||
import com.cloud.host.HostVO;
|
||||
import com.cloud.host.Status;
|
||||
@ -374,7 +367,7 @@ public class CapacityManagerImpl implements CapacityManager , StateListener<Stat
|
||||
/*Release capacity from original host*/
|
||||
releaseVmCapacity(vm, false, false, vm.getLastHostId());
|
||||
releaseVmCapacity(vm, false, true, oldHostId);
|
||||
} else if (event == Event.MigrationFailedOnSource) {
|
||||
} else if (event == Event.OperationFailed) {
|
||||
/*Release from dest host*/
|
||||
releaseVmCapacity(vm, false, false, oldHostId);
|
||||
} else if (event == Event.OperationSucceeded) {
|
||||
|
||||
@ -67,7 +67,7 @@ public interface ConfigurationManager extends ConfigurationService, Manager {
|
||||
* @param domainId
|
||||
* @return ID
|
||||
*/
|
||||
ServiceOfferingVO createServiceOffering(long userId, String name, int cpu, int ramSize, int speed, String displayText, boolean localStorageRequired, boolean offerHA, boolean useVirtualNetwork, String tags, Long domainId);
|
||||
ServiceOfferingVO createServiceOffering(long userId, String name, int cpu, int ramSize, int speed, String displayText, boolean localStorageRequired, boolean offerHA, String tags, Long domainId);
|
||||
|
||||
/**
|
||||
* Creates a new disk offering
|
||||
|
||||
@ -1279,24 +1279,18 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
|
||||
offerHA = false;
|
||||
}
|
||||
|
||||
Boolean useVirtualNetwork = cmd.getUseVirtualNetwork();
|
||||
if (useVirtualNetwork == null) {
|
||||
useVirtualNetwork = Boolean.TRUE;
|
||||
}
|
||||
|
||||
return createServiceOffering(userId, cmd.getServiceOfferingName(), cpuNumber.intValue(), memory.intValue(), cpuSpeed.intValue(), cmd.getDisplayText(),
|
||||
localStorageRequired, offerHA, useVirtualNetwork, cmd.getTags(),cmd.getDomainId());
|
||||
localStorageRequired, offerHA, cmd.getTags(),cmd.getDomainId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServiceOfferingVO createServiceOffering(long userId, String name, int cpu, int ramSize, int speed, String displayText, boolean localStorageRequired, boolean offerHA, boolean useVirtualNetwork, String tags, Long domainId) {
|
||||
public ServiceOfferingVO createServiceOffering(long userId, String name, int cpu, int ramSize, int speed, String displayText, boolean localStorageRequired, boolean offerHA, String tags, Long domainId) {
|
||||
String networkRateStr = _configDao.getValue("network.throttling.rate");
|
||||
String multicastRateStr = _configDao.getValue("multicast.throttling.rate");
|
||||
int networkRate = ((networkRateStr == null) ? 200 : Integer.parseInt(networkRateStr));
|
||||
int multicastRate = ((multicastRateStr == null) ? 10 : Integer.parseInt(multicastRateStr));
|
||||
Network.GuestIpType guestIpType = useVirtualNetwork ? Network.GuestIpType.Virtual : Network.GuestIpType.Direct;
|
||||
tags = cleanupTags(tags);
|
||||
ServiceOfferingVO offering = new ServiceOfferingVO(name, cpu, ramSize, speed, networkRate, multicastRate, offerHA, displayText, guestIpType, localStorageRequired, false, tags, false,domainId);
|
||||
ServiceOfferingVO offering = new ServiceOfferingVO(name, cpu, ramSize, speed, networkRate, multicastRate, offerHA, displayText, localStorageRequired, false, tags, false,domainId);
|
||||
|
||||
if ((offering = _serviceOfferingDao.persist(offering)) != null) {
|
||||
return offering;
|
||||
|
||||
@ -83,7 +83,6 @@ import com.cloud.info.RunningHostCountInfo;
|
||||
import com.cloud.info.RunningHostInfoAgregator;
|
||||
import com.cloud.info.RunningHostInfoAgregator.ZoneHostInfo;
|
||||
import com.cloud.maid.StackMaid;
|
||||
import com.cloud.network.Network;
|
||||
import com.cloud.network.NetworkManager;
|
||||
import com.cloud.network.NetworkVO;
|
||||
import com.cloud.network.Networks.TrafficType;
|
||||
@ -440,8 +439,9 @@ public class ConsoleProxyManagerImpl implements ConsoleProxyManager, ConsoleProx
|
||||
}
|
||||
|
||||
String restart = _configDao.getValue(Config.ConsoleProxyRestart.key());
|
||||
if(restart != null && restart.equalsIgnoreCase("false"))
|
||||
if(restart != null && restart.equalsIgnoreCase("false")) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if(proxy.getState() == VirtualMachine.State.Stopped) {
|
||||
return _itMgr.start(proxy, null, systemUser, systemAcct);
|
||||
@ -1336,8 +1336,7 @@ public class ConsoleProxyManagerImpl implements ConsoleProxyManager, ConsoleProx
|
||||
_itMgr.registerGuru(VirtualMachine.Type.ConsoleProxy, this);
|
||||
|
||||
boolean useLocalStorage = Boolean.parseBoolean(configs.get(Config.SystemVMUseLocalStorage.key()));
|
||||
_serviceOffering = new ServiceOfferingVO("System Offering For Console Proxy", 1, _proxyRamSize, _proxyCpuMHz, 0, 0, true, null, Network.GuestIpType.Virtual,
|
||||
useLocalStorage, true, null, true);
|
||||
_serviceOffering = new ServiceOfferingVO("System Offering For Console Proxy", 1, _proxyRamSize, _proxyCpuMHz, 0, 0, true, null, useLocalStorage, true, null, true);
|
||||
_serviceOffering.setUniqueName("Cloud.com-ConsoleProxy");
|
||||
_serviceOffering = _offeringDao.persistSystemServiceOffering(_serviceOffering);
|
||||
|
||||
|
||||
@ -123,10 +123,6 @@ public class ServiceOffering21VO extends DiskOffering21VO implements ServiceOffe
|
||||
this.guestIpType = guestIpType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Network.GuestIpType getGuestIpType() {
|
||||
return guestIpType;
|
||||
}
|
||||
public String gethypervisorType() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -354,12 +354,8 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
||||
|
||||
ServiceOfferingVO currentServiceOffering = _serviceOfferingDao.findById(router.getServiceOfferingId());
|
||||
|
||||
if (!currentServiceOffering.getGuestIpType().equals(newServiceOffering.getGuestIpType())) {
|
||||
throw new InvalidParameterValueException("Can't upgrade router, due to the new network type: " + newServiceOffering.getGuestIpType()
|
||||
+ " being different from " + "current network type: " + currentServiceOffering.getGuestIpType());
|
||||
}
|
||||
if (currentServiceOffering.getUseLocalStorage() != newServiceOffering.getUseLocalStorage()) {
|
||||
throw new InvalidParameterValueException("Can't upgrade, due to new local storage status : " + newServiceOffering.getGuestIpType()
|
||||
throw new InvalidParameterValueException("Can't upgrade, due to new local storage status : " + newServiceOffering.getUseLocalStorage()
|
||||
+ " is different from " + "curruent local storage status: " + currentServiceOffering.getUseLocalStorage());
|
||||
}
|
||||
|
||||
@ -570,8 +566,7 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
||||
_itMgr.registerGuru(VirtualMachine.Type.DomainRouter, this);
|
||||
|
||||
boolean useLocalStorage = Boolean.parseBoolean(configs.get(Config.SystemVMUseLocalStorage.key()));
|
||||
_offering = new ServiceOfferingVO("System Offering For Software Router", 1, _routerRamSize, _routerCpuMHz, 0, 0, true, null,
|
||||
Network.GuestIpType.Virtual, useLocalStorage, true, null, true);
|
||||
_offering = new ServiceOfferingVO("System Offering For Software Router", 1, _routerRamSize, _routerCpuMHz, 0, 0, true, null, useLocalStorage, true, null, true);
|
||||
_offering.setUniqueName("Cloud.Com-SoftwareRouter");
|
||||
_offering = _serviceOfferingDao.persistSystemServiceOffering(_offering);
|
||||
|
||||
@ -782,7 +777,7 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
||||
/*Before starting router, already know the hypervisor type*/
|
||||
VMTemplateVO template = _templateDao.findRoutingTemplate(dest.getCluster().getHypervisorType());
|
||||
router = new DomainRouterVO(id, _offering.getId(), VirtualMachineName.getRouterName(id, _instance), template.getId(),
|
||||
template.getHypervisorType(), template.getGuestOSId(), owner.getDomainId(), owner.getId(), guestNetwork.getId(), _offering.getOfferHA(), guestNetwork.getNetworkDomain());
|
||||
template.getHypervisorType(), template.getGuestOSId(), owner.getDomainId(), owner.getId(), guestNetwork.getId(), _offering.getOfferHA());
|
||||
router = _itMgr.allocate(router, template, _offering, networks, plan, null, owner);
|
||||
}
|
||||
|
||||
@ -851,7 +846,7 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
||||
VMTemplateVO template = _templateDao.findRoutingTemplate(dest.getCluster().getHypervisorType());
|
||||
|
||||
router = new DomainRouterVO(id, _offering.getId(), VirtualMachineName.getRouterName(id, _instance), template.getId(),
|
||||
template.getHypervisorType(), template.getGuestOSId(), owner.getDomainId(), owner.getId(), guestNetwork.getId(), _offering.getOfferHA(), guestNetwork.getNetworkDomain());
|
||||
template.getHypervisorType(), template.getGuestOSId(), owner.getDomainId(), owner.getId(), guestNetwork.getId(), _offering.getOfferHA());
|
||||
router.setRole(Role.DHCP_USERDATA);
|
||||
router = _itMgr.allocate(router, template, _offering, networks, plan, null, owner);
|
||||
}
|
||||
@ -888,7 +883,6 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
||||
dhcpRange = NetUtils.getDhcpRange(cidr);
|
||||
}
|
||||
|
||||
String domain = network.getNetworkDomain();
|
||||
if (router.getRole() == Role.DHCP_USERDATA) {
|
||||
type = "dhcpsrvr";
|
||||
} else {
|
||||
@ -950,8 +944,9 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
||||
if (dhcpRange != null) {
|
||||
buf.append(" dhcprange=" + dhcpRange);
|
||||
}
|
||||
String domain = network.getNetworkDomain();
|
||||
if (domain != null) {
|
||||
buf.append(" domain=" + router.getDomain());
|
||||
buf.append(" domain=" + domain);
|
||||
}
|
||||
|
||||
if (!network.isDefault() && network.getGuestType() == GuestIpType.Direct) {
|
||||
|
||||
@ -57,7 +57,6 @@ import com.cloud.domain.DomainVO;
|
||||
import com.cloud.domain.dao.DomainDao;
|
||||
import com.cloud.exception.InternalErrorException;
|
||||
import com.cloud.exception.InvalidParameterValueException;
|
||||
import com.cloud.network.Network;
|
||||
import com.cloud.network.Network.State;
|
||||
import com.cloud.network.NetworkVO;
|
||||
import com.cloud.network.Networks.BroadcastDomainType;
|
||||
@ -174,8 +173,8 @@ public class ConfigurationServerImpl implements ConfigurationServer {
|
||||
|
||||
|
||||
// Save Direct Networking service offerings
|
||||
createServiceOffering(User.UID_SYSTEM, "Small Instance", 1, 512, 500, "Small Instance, $0.05 per hour", false, false, false, null);
|
||||
createServiceOffering(User.UID_SYSTEM, "Medium Instance", 1, 1024, 1000, "Medium Instance, $0.10 per hour", false, false, false, null);
|
||||
createServiceOffering(User.UID_SYSTEM, "Small Instance", 1, 512, 500, "Small Instance, $0.05 per hour", false, false, null);
|
||||
createServiceOffering(User.UID_SYSTEM, "Medium Instance", 1, 1024, 1000, "Medium Instance, $0.10 per hour", false, false, null);
|
||||
// Save Virtual Networking service offerings
|
||||
//createServiceOffering(User.UID_SYSTEM, "Small Instance", 1, 512, 500, "Small Instance, Virtual Networking, $0.05 per hour", false, false, true, null);
|
||||
//createServiceOffering(User.UID_SYSTEM, "Medium Instance", 1, 1024, 1000, "Medium Instance, Virtual Networking, $0.10 per hour", false, false, true, null);
|
||||
@ -604,9 +603,10 @@ public class ConfigurationServerImpl implements ConfigurationServer {
|
||||
if(domainId!=null){
|
||||
DomainVO domainVo = _domainDao.findById(domainId);
|
||||
|
||||
if(domainVo == null)
|
||||
if(domainVo == null) {
|
||||
throw new InvalidParameterValueException("Please specify a valid domain id");
|
||||
}
|
||||
}
|
||||
// Create the new zone in the database
|
||||
DataCenterVO zone = new DataCenterVO(zoneName, null, dns1, dns2, internalDns1, internalDns2, vnetRange, guestCidr, domain, domainId, zoneType);
|
||||
zone = _zoneDao.persist(zone);
|
||||
@ -688,14 +688,13 @@ public class ConfigurationServerImpl implements ConfigurationServer {
|
||||
return _diskOfferingDao.persist(newDiskOffering);
|
||||
}
|
||||
|
||||
private ServiceOfferingVO createServiceOffering(long userId, String name, int cpu, int ramSize, int speed, String displayText, boolean localStorageRequired, boolean offerHA, boolean useVirtualNetwork, String tags) {
|
||||
private ServiceOfferingVO createServiceOffering(long userId, String name, int cpu, int ramSize, int speed, String displayText, boolean localStorageRequired, boolean offerHA, String tags) {
|
||||
String networkRateStr = _configDao.getValue("network.throttling.rate");
|
||||
String multicastRateStr = _configDao.getValue("multicast.throttling.rate");
|
||||
int networkRate = ((networkRateStr == null) ? 200 : Integer.parseInt(networkRateStr));
|
||||
int multicastRate = ((multicastRateStr == null) ? 10 : Integer.parseInt(multicastRateStr));
|
||||
Network.GuestIpType guestIpType = useVirtualNetwork ? Network.GuestIpType.Virtual : Network.GuestIpType.Direct;
|
||||
tags = cleanupTags(tags);
|
||||
ServiceOfferingVO offering = new ServiceOfferingVO(name, cpu, ramSize, speed, networkRate, multicastRate, offerHA, displayText, guestIpType, localStorageRequired, false, tags, false);
|
||||
ServiceOfferingVO offering = new ServiceOfferingVO(name, cpu, ramSize, speed, networkRate, multicastRate, offerHA, displayText, localStorageRequired, false, tags, false);
|
||||
|
||||
if ((offering = _serviceOfferingDao.persist(offering)) != null) {
|
||||
return offering;
|
||||
|
||||
@ -1128,8 +1128,6 @@ public class ManagementServerImpl implements ManagementServer {
|
||||
ServiceOfferingVO offering = _offeringsDao.findById(vmInstance.getServiceOfferingId());
|
||||
sc.addAnd("id", SearchCriteria.Op.NEQ, offering.getId());
|
||||
|
||||
// Only return offerings with the same Guest IP type and storage pool preference
|
||||
sc.addAnd("guestIpType", SearchCriteria.Op.EQ, offering.getGuestIpType());
|
||||
sc.addAnd("useLocalStorage", SearchCriteria.Op.EQ, offering.getUseLocalStorage());
|
||||
}
|
||||
|
||||
@ -2749,8 +2747,9 @@ public class ManagementServerImpl implements ManagementServer {
|
||||
public ConsoleProxyVO destroyConsoleProxy(long instanceId) {
|
||||
ConsoleProxyVO proxy = _consoleProxyDao.findById(instanceId);
|
||||
|
||||
if(_consoleProxyMgr.destroyProxy(instanceId))
|
||||
if(_consoleProxyMgr.destroyProxy(instanceId)) {
|
||||
return proxy;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -3882,8 +3881,9 @@ public class ManagementServerImpl implements ManagementServer {
|
||||
|
||||
public SecondaryStorageVmVO destroySecondaryStorageVm(long instanceId) {
|
||||
SecondaryStorageVmVO secStorageVm = _secStorageVmDao.findById(instanceId);
|
||||
if(_secStorageVmMgr.destroySecStorageVm(instanceId))
|
||||
if(_secStorageVmMgr.destroySecStorageVm(instanceId)) {
|
||||
return secStorageVm;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@ -21,13 +21,10 @@ package com.cloud.service;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.DiscriminatorValue;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.EnumType;
|
||||
import javax.persistence.Enumerated;
|
||||
import javax.persistence.PrimaryKeyJoinColumn;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Transient;
|
||||
|
||||
import com.cloud.network.Network;
|
||||
import com.cloud.offering.ServiceOffering;
|
||||
import com.cloud.storage.DiskOfferingVO;
|
||||
|
||||
@ -54,15 +51,11 @@ public class ServiceOfferingVO extends DiskOfferingVO implements ServiceOffering
|
||||
@Column(name="ha_enabled")
|
||||
private boolean offerHA;
|
||||
|
||||
@Column(name="guest_ip_type")
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Network.GuestIpType guestIpType;
|
||||
|
||||
protected ServiceOfferingVO() {
|
||||
super();
|
||||
}
|
||||
|
||||
public ServiceOfferingVO(String name, int cpu, int ramSize, int speed, int rateMbps, int multicastRateMbps, boolean offerHA, String displayText, Network.GuestIpType guestIpType, boolean useLocalStorage, boolean recreatable, String tags, boolean systemUse) {
|
||||
public ServiceOfferingVO(String name, int cpu, int ramSize, int speed, int rateMbps, int multicastRateMbps, boolean offerHA, String displayText, boolean useLocalStorage, boolean recreatable, String tags, boolean systemUse) {
|
||||
super(name, displayText, false, tags, recreatable, useLocalStorage, systemUse, true);
|
||||
this.cpu = cpu;
|
||||
this.ramSize = ramSize;
|
||||
@ -70,10 +63,9 @@ public class ServiceOfferingVO extends DiskOfferingVO implements ServiceOffering
|
||||
this.rateMbps = rateMbps;
|
||||
this.multicastRateMbps = multicastRateMbps;
|
||||
this.offerHA = offerHA;
|
||||
this.guestIpType = guestIpType;
|
||||
}
|
||||
|
||||
public ServiceOfferingVO(String name, int cpu, int ramSize, int speed, int rateMbps, int multicastRateMbps, boolean offerHA, String displayText, Network.GuestIpType guestIpType, boolean useLocalStorage, boolean recreatable, String tags, boolean systemUse, Long domainId) {
|
||||
public ServiceOfferingVO(String name, int cpu, int ramSize, int speed, int rateMbps, int multicastRateMbps, boolean offerHA, String displayText, boolean useLocalStorage, boolean recreatable, String tags, boolean systemUse, Long domainId) {
|
||||
super(name, displayText, false, tags, recreatable, useLocalStorage, systemUse, true, domainId);
|
||||
this.cpu = cpu;
|
||||
this.ramSize = ramSize;
|
||||
@ -81,7 +73,6 @@ public class ServiceOfferingVO extends DiskOfferingVO implements ServiceOffering
|
||||
this.rateMbps = rateMbps;
|
||||
this.multicastRateMbps = multicastRateMbps;
|
||||
this.offerHA = offerHA;
|
||||
this.guestIpType = guestIpType;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -149,13 +140,4 @@ public class ServiceOfferingVO extends DiskOfferingVO implements ServiceOffering
|
||||
return multicastRateMbps;
|
||||
}
|
||||
|
||||
public void setGuestIpType(Network.GuestIpType guestIpType) {
|
||||
this.guestIpType = guestIpType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Network.GuestIpType getGuestIpType() {
|
||||
return guestIpType;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -32,7 +32,6 @@ import com.cloud.capacity.dao.CapacityDao;
|
||||
import com.cloud.configuration.dao.ConfigurationDao;
|
||||
import com.cloud.dc.DataCenterVO;
|
||||
import com.cloud.dc.HostPodVO;
|
||||
import com.cloud.network.Network;
|
||||
import com.cloud.offering.ServiceOffering;
|
||||
import com.cloud.service.ServiceOfferingVO;
|
||||
import com.cloud.service.dao.ServiceOfferingDao;
|
||||
@ -150,14 +149,14 @@ public class LocalStoragePoolAllocator extends FirstFitStoragePoolAllocator {
|
||||
}
|
||||
} else if(vm.getType() == VirtualMachine.Type.ConsoleProxy) {
|
||||
so = new ServiceOfferingVO("Fake Offering For DomP", 1,
|
||||
_proxyRamSize, 0, 0, 0, false, null, Network.GuestIpType.Virtual, false, true, null, true);
|
||||
_proxyRamSize, 0, 0, 0, false, null, false, true, null, true);
|
||||
} else if(vm.getType() == VirtualMachine.Type.SecondaryStorageVm) {
|
||||
so = new ServiceOfferingVO("Fake Offering For Secondary Storage VM", 1, _secStorageVmRamSize, 0, 0, 0, false, null, Network.GuestIpType.Virtual, false, true, null, true);
|
||||
so = new ServiceOfferingVO("Fake Offering For Secondary Storage VM", 1, _secStorageVmRamSize, 0, 0, 0, false, null, false, true, null, true);
|
||||
} else if(vm.getType() == VirtualMachine.Type.DomainRouter) {
|
||||
so = new ServiceOfferingVO("Fake Offering For DomR", 1, _routerRamSize, 0, 0, 0, false, null, Network.GuestIpType.Virtual, false, true, null, true);
|
||||
so = new ServiceOfferingVO("Fake Offering For DomR", 1, _routerRamSize, 0, 0, 0, false, null, false, true, null, true);
|
||||
} else {
|
||||
assert(false) : "Unsupported system vm type";
|
||||
so = new ServiceOfferingVO("Fake Offering For unknow system VM", 1, 128, 0, 0, 0, false, null, Network.GuestIpType.Virtual, false, true, null, false);
|
||||
so = new ServiceOfferingVO("Fake Offering For unknow system VM", 1, 128, 0, 0, 0, false, null, false, true, null, false);
|
||||
}
|
||||
|
||||
long usedMemory = calcHostAllocatedCpuMemoryCapacity(vmOnHost, CapacityVO.CAPACITY_TYPE_MEMORY);
|
||||
@ -256,14 +255,14 @@ public class LocalStoragePoolAllocator extends FirstFitStoragePoolAllocator {
|
||||
so = _offeringDao.findById(userVm.getServiceOfferingId());
|
||||
} else if(vm.getType() == VirtualMachine.Type.ConsoleProxy) {
|
||||
so = new ServiceOfferingVO("Fake Offering For DomP", 1,
|
||||
_proxyRamSize, 0, 0, 0, false, null, Network.GuestIpType.Virtual, false, true, null, true);
|
||||
_proxyRamSize, 0, 0, 0, false, null, false, true, null, true);
|
||||
} else if(vm.getType() == VirtualMachine.Type.SecondaryStorageVm) {
|
||||
so = new ServiceOfferingVO("Fake Offering For Secondary Storage VM", 1, _secStorageVmRamSize, 0, 0, 0, false, null, Network.GuestIpType.Virtual, false, true, null, true);
|
||||
so = new ServiceOfferingVO("Fake Offering For Secondary Storage VM", 1, _secStorageVmRamSize, 0, 0, 0, false, null, false, true, null, true);
|
||||
} else if(vm.getType() == VirtualMachine.Type.DomainRouter) {
|
||||
so = new ServiceOfferingVO("Fake Offering For DomR", 1, _routerRamSize, 0, 0, 0, false, null, Network.GuestIpType.Virtual, false, true, null, true);
|
||||
so = new ServiceOfferingVO("Fake Offering For DomR", 1, _routerRamSize, 0, 0, 0, false, null, false, true, null, true);
|
||||
} else {
|
||||
assert(false) : "Unsupported system vm type";
|
||||
so = new ServiceOfferingVO("Fake Offering For unknow system VM", 1, 128, 0, 0, 0, false, null, Network.GuestIpType.Virtual, false, true, null, false);
|
||||
so = new ServiceOfferingVO("Fake Offering For unknow system VM", 1, 128, 0, 0, 0, false, null, false, true, null, false);
|
||||
}
|
||||
|
||||
if(capacityType == CapacityVO.CAPACITY_TYPE_MEMORY) {
|
||||
|
||||
@ -61,7 +61,6 @@ import com.cloud.host.dao.HostDao;
|
||||
import com.cloud.info.RunningHostCountInfo;
|
||||
import com.cloud.info.RunningHostInfoAgregator;
|
||||
import com.cloud.info.RunningHostInfoAgregator.ZoneHostInfo;
|
||||
import com.cloud.network.Network;
|
||||
import com.cloud.network.NetworkManager;
|
||||
import com.cloud.network.NetworkVO;
|
||||
import com.cloud.network.Networks.TrafficType;
|
||||
@ -780,8 +779,7 @@ public class SecondaryStorageManagerImpl implements SecondaryStorageVmManager, V
|
||||
_itMgr.registerGuru(VirtualMachine.Type.SecondaryStorageVm, this);
|
||||
|
||||
_useLocalStorage = Boolean.parseBoolean(configs.get(Config.SystemVMUseLocalStorage.key()));
|
||||
_serviceOffering = new ServiceOfferingVO("System Offering For Secondary Storage VM", 1, _secStorageVmRamSize, _secStorageVmCpuMHz, 0, 0, true, null,
|
||||
Network.GuestIpType.Virtual, _useLocalStorage, true, null, true);
|
||||
_serviceOffering = new ServiceOfferingVO("System Offering For Secondary Storage VM", 1, _secStorageVmRamSize, _secStorageVmCpuMHz, 0, 0, true, null, _useLocalStorage, true, null, true);
|
||||
_serviceOffering.setUniqueName("Cloud.com-SecondaryStorage");
|
||||
_serviceOffering = _offeringDao.persistSystemServiceOffering(_serviceOffering);
|
||||
|
||||
|
||||
@ -51,8 +51,6 @@ import org.xml.sax.SAXException;
|
||||
import org.xml.sax.helpers.DefaultHandler;
|
||||
|
||||
import com.cloud.host.Status;
|
||||
import com.cloud.network.Network;
|
||||
import com.cloud.server.ManagementServer;
|
||||
import com.cloud.service.ServiceOfferingVO;
|
||||
import com.cloud.service.dao.ServiceOfferingDaoImpl;
|
||||
import com.cloud.storage.DiskOfferingVO;
|
||||
@ -523,8 +521,9 @@ public class DatabaseConfig {
|
||||
stmt.setString(3, "mount.parent");
|
||||
if (nfs) {
|
||||
stmt.setString(4, "/mnt");
|
||||
} else
|
||||
} else {
|
||||
stmt.setString(4, "/");
|
||||
}
|
||||
stmt.executeUpdate();
|
||||
|
||||
stmt.setLong(1, 2);
|
||||
@ -532,8 +531,9 @@ public class DatabaseConfig {
|
||||
stmt.setString(3, "mount.path");
|
||||
if (nfs) {
|
||||
stmt.setString(4, mountPoint);
|
||||
} else
|
||||
} else {
|
||||
stmt.setString(4, url.replaceFirst("file:/", ""));
|
||||
}
|
||||
stmt.executeUpdate();
|
||||
|
||||
stmt.setLong(1, 3);
|
||||
@ -567,10 +567,11 @@ public class DatabaseConfig {
|
||||
stmt.setLong(1, _poolId++);
|
||||
stmt.setString(2, name);
|
||||
stmt.setString(3, uuid);
|
||||
if (storageType == null)
|
||||
if (storageType == null) {
|
||||
stmt.setString(4, "NetworkFileSystem");
|
||||
else
|
||||
} else {
|
||||
stmt.setString(4, storageType);
|
||||
}
|
||||
stmt.setLong(5, 111);
|
||||
stmt.setLong(6, dataCenterId);
|
||||
stmt.setLong(7,0);
|
||||
@ -609,11 +610,21 @@ public class DatabaseConfig {
|
||||
|
||||
// Check that all IPs are valid
|
||||
String ipError = "Please enter a valid IP address for the field: ";
|
||||
if (!IPRangeConfig.validOrBlankIP(dns1)) printError(ipError + "dns1");
|
||||
if (!IPRangeConfig.validOrBlankIP(dns2)) printError(ipError + "dns2");
|
||||
if (!IPRangeConfig.validOrBlankIP(internalDns1)) printError(ipError + "internalDns1");
|
||||
if (!IPRangeConfig.validOrBlankIP(internalDns2)) printError(ipError + "internalDns2");
|
||||
if (!IPRangeConfig.validCIDR(guestNetworkCidr)) printError("Please enter a valid value for guestNetworkCidr");
|
||||
if (!IPRangeConfig.validOrBlankIP(dns1)) {
|
||||
printError(ipError + "dns1");
|
||||
}
|
||||
if (!IPRangeConfig.validOrBlankIP(dns2)) {
|
||||
printError(ipError + "dns2");
|
||||
}
|
||||
if (!IPRangeConfig.validOrBlankIP(internalDns1)) {
|
||||
printError(ipError + "internalDns1");
|
||||
}
|
||||
if (!IPRangeConfig.validOrBlankIP(internalDns2)) {
|
||||
printError(ipError + "internalDns2");
|
||||
}
|
||||
if (!IPRangeConfig.validCIDR(guestNetworkCidr)) {
|
||||
printError("Please enter a valid value for guestNetworkCidr");
|
||||
}
|
||||
int vnetStart = -1;
|
||||
int vnetEnd = -1;
|
||||
if (vnetRange != null) {
|
||||
@ -636,28 +647,42 @@ public class DatabaseConfig {
|
||||
String vlanPodName = _currentObjectParams.get("podName");
|
||||
|
||||
String ipError = "Please enter a valid IP address for the field: ";
|
||||
if (!IPRangeConfig.validOrBlankIP(gateway)) printError(ipError + "gateway");
|
||||
if (!IPRangeConfig.validOrBlankIP(netmask)) printError(ipError + "netmask");
|
||||
if (!IPRangeConfig.validOrBlankIP(gateway)) {
|
||||
printError(ipError + "gateway");
|
||||
}
|
||||
if (!IPRangeConfig.validOrBlankIP(netmask)) {
|
||||
printError(ipError + "netmask");
|
||||
}
|
||||
|
||||
// Check that the given IP address range was valid
|
||||
if (!checkIpAddressRange(publicIpRange)) printError("Please enter a valid public IP range.");
|
||||
if (!checkIpAddressRange(publicIpRange)) {
|
||||
printError("Please enter a valid public IP range.");
|
||||
}
|
||||
|
||||
// Split the IP address range
|
||||
String[] ipAddressRangeArray = publicIpRange.split("\\-");
|
||||
String startIP = ipAddressRangeArray[0];
|
||||
String endIP = null;
|
||||
if (ipAddressRangeArray.length > 1) endIP = ipAddressRangeArray[1];
|
||||
if (ipAddressRangeArray.length > 1) {
|
||||
endIP = ipAddressRangeArray[1];
|
||||
}
|
||||
|
||||
// If a netmask was provided, check that the startIP, endIP, and gateway all belong to the same subnet
|
||||
if (netmask != null && netmask != "") {
|
||||
if (endIP != null) {
|
||||
if (!IPRangeConfig.sameSubnet(startIP, endIP, netmask)) printError("Start and end IPs for the public IP range must be in the same subnet, as per the provided netmask.");
|
||||
if (!IPRangeConfig.sameSubnet(startIP, endIP, netmask)) {
|
||||
printError("Start and end IPs for the public IP range must be in the same subnet, as per the provided netmask.");
|
||||
}
|
||||
}
|
||||
|
||||
if (gateway != null && gateway != "") {
|
||||
if (!IPRangeConfig.sameSubnet(startIP, gateway, netmask)) printError("The start IP for the public IP range must be in the same subnet as the gateway, as per the provided netmask.");
|
||||
if (!IPRangeConfig.sameSubnet(startIP, gateway, netmask)) {
|
||||
printError("The start IP for the public IP range must be in the same subnet as the gateway, as per the provided netmask.");
|
||||
}
|
||||
if (endIP != null) {
|
||||
if (!IPRangeConfig.sameSubnet(endIP, gateway, netmask)) printError("The end IP for the public IP range must be in the same subnet as the gateway, as per the provided netmask.");
|
||||
if (!IPRangeConfig.sameSubnet(endIP, gateway, netmask)) {
|
||||
printError("The end IP for the public IP range must be in the same subnet as the gateway, as per the provided netmask.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -708,12 +733,16 @@ public class DatabaseConfig {
|
||||
|
||||
if (privateIpRange != null) {
|
||||
// Check that the given IP address range was valid
|
||||
if (!checkIpAddressRange(privateIpRange)) printError("Please enter a valid private IP range.");
|
||||
if (!checkIpAddressRange(privateIpRange)) {
|
||||
printError("Please enter a valid private IP range.");
|
||||
}
|
||||
|
||||
String[] ipAddressRangeArray = privateIpRange.split("\\-");
|
||||
startIP = ipAddressRangeArray[0];
|
||||
endIP = null;
|
||||
if (ipAddressRangeArray.length > 1) endIP = ipAddressRangeArray[1];
|
||||
if (ipAddressRangeArray.length > 1) {
|
||||
endIP = ipAddressRangeArray[1];
|
||||
}
|
||||
}
|
||||
|
||||
// Check that the start IP and end IP match up with the CIDR
|
||||
@ -752,13 +781,6 @@ public class DatabaseConfig {
|
||||
int mcRate = 10;
|
||||
boolean ha = Boolean.parseBoolean(_currentObjectParams.get("enableHA"));
|
||||
boolean mirroring = Boolean.parseBoolean(_currentObjectParams.get("mirrored"));
|
||||
String guestIpType = _currentObjectParams.get("guestIpType");
|
||||
Network.GuestIpType type = null;
|
||||
if (guestIpType == null) {
|
||||
type = Network.GuestIpType.Virtual;
|
||||
} else {
|
||||
type = Network.GuestIpType.valueOf(guestIpType);
|
||||
}
|
||||
|
||||
boolean useLocalStorage;
|
||||
if (useLocalStorageValue != null) {
|
||||
@ -771,7 +793,7 @@ public class DatabaseConfig {
|
||||
useLocalStorage = false;
|
||||
}
|
||||
|
||||
ServiceOfferingVO serviceOffering = new ServiceOfferingVO(name, cpu, ramSize, speed, nwRate, mcRate, ha, displayText, type, useLocalStorage, false, null, false);
|
||||
ServiceOfferingVO serviceOffering = new ServiceOfferingVO(name, cpu, ramSize, speed, nwRate, mcRate, ha, displayText, useLocalStorage, false, null, false);
|
||||
ServiceOfferingDaoImpl dao = ComponentLocator.inject(ServiceOfferingDaoImpl.class);
|
||||
try {
|
||||
dao.persist(serviceOffering);
|
||||
@ -848,7 +870,9 @@ public class DatabaseConfig {
|
||||
boolean saveNetworkThrottlingRate = (_networkThrottlingRate != null);
|
||||
boolean saveMulticastThrottlingRate = (_multicastThrottlingRate != null);
|
||||
|
||||
if (!saveNetworkThrottlingRate && !saveMulticastThrottlingRate) return;
|
||||
if (!saveNetworkThrottlingRate && !saveMulticastThrottlingRate) {
|
||||
return;
|
||||
}
|
||||
|
||||
String insertNWRateSql = "UPDATE `cloud`.`service_offering` SET `nw_rate` = ?";
|
||||
String insertMCRateSql = "UPDATE `cloud`.`service_offering` SET `mc_rate` = ?";
|
||||
@ -958,7 +982,9 @@ public class DatabaseConfig {
|
||||
String password = _currentObjectParams.get("password");
|
||||
String email = _currentObjectParams.get("email");
|
||||
|
||||
if (email == null || email.equals("")) printError("An email address for each user is required.");
|
||||
if (email == null || email.equals("")) {
|
||||
printError("An email address for each user is required.");
|
||||
}
|
||||
|
||||
MessageDigest md5 = null;
|
||||
try {
|
||||
@ -1025,16 +1051,21 @@ public class DatabaseConfig {
|
||||
|
||||
String instanceNameError = "Please enter a non-blank value for the field: ";
|
||||
if (name.equals("instance.name")) {
|
||||
if (value == null || value.isEmpty() || !value.matches("^[A-Za-z0-9]{1,8}$"))
|
||||
if (value == null || value.isEmpty() || !value.matches("^[A-Za-z0-9]{1,8}$")) {
|
||||
printError(instanceNameError + "configuration: instance.name can not be empty and can only contain numbers and alphabets up to 8 characters long");
|
||||
}
|
||||
}
|
||||
|
||||
if (name.equals("network.throttling.rate")) {
|
||||
if (value != null && !value.isEmpty()) _networkThrottlingRate = value;
|
||||
if (value != null && !value.isEmpty()) {
|
||||
_networkThrottlingRate = value;
|
||||
}
|
||||
}
|
||||
|
||||
if (name.equals("multicast.throttling.rate")) {
|
||||
if (value != null && !value.isEmpty()) _multicastThrottlingRate = value;
|
||||
if (value != null && !value.isEmpty()) {
|
||||
_multicastThrottlingRate = value;
|
||||
}
|
||||
}
|
||||
|
||||
String insertSql = "INSERT INTO `cloud`.`configuration` (instance, component, name, value, description, category) " +
|
||||
@ -1060,7 +1091,9 @@ public class DatabaseConfig {
|
||||
String[] ipAddressRangeArray = ipAddressRange.split("\\-");
|
||||
String startIP = ipAddressRangeArray[0];
|
||||
String endIP = null;
|
||||
if (ipAddressRangeArray.length > 1) endIP = ipAddressRangeArray[1];
|
||||
if (ipAddressRangeArray.length > 1) {
|
||||
endIP = ipAddressRangeArray[1];
|
||||
}
|
||||
|
||||
if (!IPRangeConfig.validIP(startIP)) {
|
||||
s_logger.error("The private IP address: " + startIP + " is invalid.");
|
||||
@ -1199,8 +1232,9 @@ public class DatabaseConfig {
|
||||
if (rs.next()) {
|
||||
String value = rs.getString(name);
|
||||
return value;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
else return null;
|
||||
} catch (SQLException e) {
|
||||
System.out.println("Exception: " + e.getMessage());
|
||||
printError(errorMsg);
|
||||
@ -1217,8 +1251,11 @@ public class DatabaseConfig {
|
||||
try {
|
||||
stmt = txn.prepareAutoCloseStatement(selectSql);
|
||||
ResultSet rs = stmt.executeQuery();
|
||||
if (rs.next()) return rs.getLong(name);
|
||||
else return -1;
|
||||
if (rs.next()) {
|
||||
return rs.getLong(name);
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
System.out.println("Exception: " + e.getMessage());
|
||||
printError(errorMsg);
|
||||
|
||||
@ -2525,7 +2525,6 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
|
||||
Object isAdmin = c.getCriteria(Criteria.ISADMIN);
|
||||
assert c.getCriteria(Criteria.IPADDRESS) == null : "We don't support search by ip address on VM any more. If you see this assert, it means we have to find a different way to search by the nic table.";
|
||||
Object groupId = c.getCriteria(Criteria.GROUPID);
|
||||
Object useVirtualNetwork = c.getCriteria(Criteria.FOR_VIRTUAL_NETWORK);
|
||||
Object path = c.getCriteria(Criteria.PATH);
|
||||
Object networkId = c.getCriteria(Criteria.NETWORKID);
|
||||
Object hypervisor = c.getCriteria(Criteria.HYPERVISOR);
|
||||
@ -2573,16 +2572,6 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
|
||||
sb.join("nicSearch", nicSearch, sb.entity().getId(), nicSearch.entity().getInstanceId(), JoinBuilder.JoinType.INNER);
|
||||
}
|
||||
|
||||
if (useVirtualNetwork != null) {
|
||||
SearchBuilder<ServiceOfferingVO> serviceSearch = _offeringDao.createSearchBuilder();
|
||||
if ((Boolean)useVirtualNetwork){
|
||||
serviceSearch.and("guestIpType", serviceSearch.entity().getGuestIpType(), SearchCriteria.Op.EQ);
|
||||
} else {
|
||||
serviceSearch.and("guestIpType", serviceSearch.entity().getGuestIpType(), SearchCriteria.Op.NEQ);
|
||||
}
|
||||
sb.join("serviceSearch", serviceSearch, sb.entity().getServiceOfferingId(), serviceSearch.entity().getId(), JoinBuilder.JoinType.INNER);
|
||||
}
|
||||
|
||||
SearchBuilder<AccountVO> accountRemoved = _accountDao.createSearchBuilder();
|
||||
accountRemoved.and("accountremoved", accountRemoved.entity().getRemoved(), SearchCriteria.Op.NULL);
|
||||
sb.join("accountRemoved", accountRemoved, sb.entity().getAccountId(), accountRemoved.entity().getId(), JoinBuilder.JoinType.INNER);
|
||||
@ -2596,10 +2585,6 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
|
||||
sc.setJoinParameters("groupSearch", "groupId", groupId);
|
||||
}
|
||||
|
||||
if (useVirtualNetwork != null) {
|
||||
sc.setJoinParameters("serviceSearch", "guestIpType", Network.GuestIpType.Virtual.toString());
|
||||
}
|
||||
|
||||
if (keyword != null) {
|
||||
SearchCriteria<UserVmVO> ssc = _vmDao.createSearchCriteria();
|
||||
ssc.addOr("displayName", SearchCriteria.Op.LIKE, "%" + keyword + "%");
|
||||
|
||||
@ -1,31 +1,14 @@
|
||||
# This file is obsolete! Put what you need into create-schema.sql
|
||||
|
||||
ALTER TABLE `cloud`.`account_network_ref` ADD CONSTRAINT `fk_account_network_ref__account_id` FOREIGN KEY `fk_account_network_ref__account_id`(`account_id`) REFERENCES `account`(`id`) ON DELETE CASCADE;
|
||||
ALTER TABLE `cloud`.`account_network_ref` ADD CONSTRAINT `fk_account_network_ref__networks_id` FOREIGN KEY `fk_account_network_ref__networks_id`(`network_id`) REFERENCES `networks`(`id`) ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE `cloud`.`op_dc_ip_address_alloc` ADD INDEX `i_op_dc_ip_address_alloc__pod_id__data_center_id__taken` (`pod_id`, `data_center_id`, `taken`, `instance_id`);
|
||||
ALTER TABLE `cloud`.`op_dc_ip_address_alloc` ADD UNIQUE `i_op_dc_ip_address_alloc__ip_address__data_center_id`(`ip_address`, `data_center_id`);
|
||||
ALTER TABLE `cloud`.`op_dc_ip_address_alloc` ADD CONSTRAINT `fk_op_dc_ip_address_alloc__pod_id` FOREIGN KEY `fk_op_dc_ip_address_alloc__pod_id` (`pod_id`) REFERENCES `host_pod_ref` (`id`) ON DELETE CASCADE;
|
||||
ALTER TABLE `cloud`.`op_dc_ip_address_alloc` ADD INDEX `i_op_dc_ip_address_alloc__pod_id`(`pod_id`);
|
||||
|
||||
ALTER TABLE `cloud`.`host_pod_ref` ADD INDEX `i_host_pod_ref__data_center_id`(`data_center_id`);
|
||||
|
||||
ALTER TABLE `cloud`.`op_dc_vnet_alloc` ADD UNIQUE `i_op_dc_vnet_alloc__vnet__data_center_id__account_id`(`vnet`, `data_center_id`, `account_id`);
|
||||
ALTER TABLE `cloud`.`op_dc_vnet_alloc` ADD INDEX `i_op_dc_vnet_alloc__dc_taken`(`data_center_id`, `taken`);
|
||||
ALTER TABLE `cloud`.`op_dc_vnet_alloc` ADD UNIQUE `i_op_dc_vnet_alloc__vnet__data_center_id`(`vnet`, `data_center_id`);
|
||||
|
||||
ALTER TABLE `cloud`.`host` ADD INDEX `i_host__removed`(`removed`);
|
||||
ALTER TABLE `cloud`.`host` ADD INDEX `i_host__last_ping`(`last_ping`);
|
||||
ALTER TABLE `cloud`.`host` ADD INDEX `i_host__status`(`status`);
|
||||
ALTER TABLE `cloud`.`host` ADD INDEX `i_host__data_center_id`(`data_center_id`);
|
||||
ALTER TABLE `cloud`.`host` ADD CONSTRAINT `fk_host__pod_id` FOREIGN KEY `fk_host__pod_id` (`pod_id`) REFERENCES `host_pod_ref` (`id`) ON DELETE CASCADE;
|
||||
ALTER TABLE `cloud`.`host` ADD INDEX `i_host__pod_id`(`pod_id`);
|
||||
ALTER TABLE `cloud`.`host` ADD CONSTRAINT `fk_host__cluster_id` FOREIGN KEY `fk_host__cluster_id`(`cluster_id`) REFERENCES `cloud`.`cluster`(`id`);
|
||||
|
||||
ALTER TABLE `cloud`.`op_host` ADD CONSTRAINT `fk_op_host__id` FOREIGN KEY `fk_op_host__id`(`id`) REFERENCES `host`(`id`) ON DELETE CASCADE;
|
||||
ALTER TABLE `cloud`.`host_details` ADD CONSTRAINT `fk_host_details__host_id` FOREIGN KEY `fk_host_details__host_id`(`host_id`) REFERENCES `host`(`id`) ON DELETE CASCADE;
|
||||
ALTER TABLE `cloud`.`host_tags` ADD CONSTRAINT `fk_host_tags__host_id` FOREIGN KEY `fk_host_tags__host_id`(`host_id`) REFERENCES `host`(`id`) ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE `cloud`.`storage_pool` ADD CONSTRAINT `fk_storage_pool__pod_id` FOREIGN KEY `fk_storage_pool__pod_id` (`pod_id`) REFERENCES `host_pod_ref` (`id`) ON DELETE CASCADE;
|
||||
ALTER TABLE `cloud`.`storage_pool` ADD INDEX `i_storage_pool__pod_id`(`pod_id`);
|
||||
ALTER TABLE `cloud`.`storage_pool` ADD CONSTRAINT `fk_storage_pool__cluster_id` FOREIGN KEY `fk_storage_pool__cluster_id`(`cluster_id`) REFERENCES `cloud`.`cluster`(`id`);
|
||||
@ -57,12 +40,6 @@ ALTER TABLE `cloud`.`event` ADD INDEX `i_event__account_id` (`account_id`);
|
||||
ALTER TABLE `cloud`.`event` ADD INDEX `i_event__level_id`(`level`);
|
||||
ALTER TABLE `cloud`.`event` ADD INDEX `i_event__type_id`(`type`);
|
||||
|
||||
ALTER TABLE `cloud`.`cluster` ADD CONSTRAINT `fk_cluster__data_center_id` FOREIGN KEY `fk_cluster__data_center_id`(`data_center_id`) REFERENCES `cloud`.`data_center`(`id`);
|
||||
ALTER TABLE `cloud`.`cluster` ADD CONSTRAINT `fk_cluster__pod_id` FOREIGN KEY `fd_cluster__pod_id`(`pod_id`) REFERENCES `cloud`.`host_pod_ref`(`id`);
|
||||
ALTER TABLE `cloud`.`cluster` ADD UNIQUE `i_cluster__pod_id__name`(`pod_id`, `name`);
|
||||
|
||||
ALTER TABLE `cloud`.`cluster_details` ADD CONSTRAINT `fk_cluster_details__cluster_id` FOREIGN KEY `fk_cluster_details__cluster_id`(`cluster_id`) REFERENCES `cluster`(`id`) ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE `cloud`.`vm_template` ADD INDEX `i_vm_template__removed`(`removed`);
|
||||
ALTER TABLE `cloud`.`vm_template` ADD INDEX `i_vm_template__public`(`public`);
|
||||
|
||||
|
||||
@ -158,14 +158,14 @@ CREATE TABLE `cloud`.`networks` (
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
|
||||
CREATE TABLE `cloud`.`account_network_ref` (
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`account_id` bigint unsigned NOT NULL COMMENT 'account id',
|
||||
`network_id` bigint unsigned NOT NULL COMMENT 'network id',
|
||||
`is_owner` smallint(1) NOT NULL COMMENT 'is the owner of the network',
|
||||
PRIMARY KEY (`id`)
|
||||
PRIMARY KEY (`id`),
|
||||
CONSTRAINT `fk_account_network_ref__account_id` FOREIGN KEY (`account_id`) REFERENCES `account`(`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `fk_account_network_ref__networks_id` FOREIGN KEY (`network_id`) REFERENCES `networks`(`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `cloud`.`certificate` (
|
||||
@ -195,7 +195,7 @@ CREATE TABLE `cloud`.`nics` (
|
||||
`device_id` int(10) COMMENT 'device id for the network when plugged into the virtual machine',
|
||||
`update_time` timestamp NOT NULL COMMENT 'time the state was changed',
|
||||
`isolation_uri` varchar(255) COMMENT 'id for isolation',
|
||||
`ip6_address` varchar(32) COMMENT 'ip6 address',
|
||||
`ip6_address` char(40) COMMENT 'ip6 address',
|
||||
`default_nic` tinyint NOT NULL COMMENT "None",
|
||||
`created` datetime NOT NULL COMMENT 'date created',
|
||||
`removed` datetime COMMENT 'date removed if not null',
|
||||
@ -238,7 +238,10 @@ CREATE TABLE `cloud`.`cluster` (
|
||||
`data_center_id` bigint unsigned NOT NULL COMMENT 'data center id',
|
||||
`hypervisor_type` varchar(32),
|
||||
`cluster_type` varchar(64) DEFAULT 'CloudManaged',
|
||||
PRIMARY KEY (`id`)
|
||||
PRIMARY KEY (`id`),
|
||||
CONSTRAINT `fk_cluster__data_center_id` FOREIGN KEY (`data_center_id`) REFERENCES `cloud`.`data_center`(`id`),
|
||||
CONSTRAINT `fk_cluster__pod_id` FOREIGN KEY (`pod_id`) REFERENCES `cloud`.`host_pod_ref`(`id`),
|
||||
UNIQUE `i_cluster__pod_id__name`(`pod_id`, `name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `cloud`.`cluster_details` (
|
||||
@ -246,7 +249,8 @@ CREATE TABLE `cloud`.`cluster_details` (
|
||||
`cluster_id` bigint unsigned NOT NULL COMMENT 'cluster id',
|
||||
`name` varchar(255) NOT NULL,
|
||||
`value` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
PRIMARY KEY (`id`),
|
||||
CONSTRAINT `fk_cluster_details__cluster_id` FOREIGN KEY (`cluster_id`) REFERENCES `cluster`(`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `cloud`.`op_host_upgrade` (
|
||||
@ -464,7 +468,8 @@ CREATE TABLE `cloud`.`host_pod_ref` (
|
||||
`description` varchar(255) COMMENT 'store private ip range in startIP-endIP format',
|
||||
`enabled` tinyint NOT NULL DEFAULT 1 COMMENT 'Is this Pod enabled for activity',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY (`name`, `data_center_id`)
|
||||
UNIQUE KEY (`name`, `data_center_id`),
|
||||
INDEX `i_host_pod_ref__data_center_id`(`data_center_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `cloud`.`op_dc_vnet_alloc` (
|
||||
@ -530,7 +535,6 @@ CREATE TABLE `cloud`.`port_forwarding_rules` (
|
||||
CONSTRAINT `fk_port_forwarding_rules__id` FOREIGN KEY(`id`) REFERENCES `firewall_rules`(`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
CREATE TABLE `cloud`.`host` (
|
||||
`id` bigint unsigned NOT NULL auto_increment,
|
||||
`name` varchar(255) NOT NULL,
|
||||
@ -572,13 +576,21 @@ CREATE TABLE `cloud`.`host` (
|
||||
`disconnected` datetime COMMENT 'Time this was disconnected',
|
||||
`created` datetime COMMENT 'date the host first signed on',
|
||||
`removed` datetime COMMENT 'date removed if not null',
|
||||
PRIMARY KEY (`id`)
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `i_host__removed`(`removed`),
|
||||
INDEX `i_host__last_ping`(`last_ping`),
|
||||
INDEX `i_host__status`(`status`),
|
||||
INDEX `i_host__data_center_id`(`data_center_id`),
|
||||
CONSTRAINT `fk_host__pod_id` FOREIGN KEY (`pod_id`) REFERENCES `host_pod_ref` (`id`) ON DELETE CASCADE,
|
||||
INDEX `i_host__pod_id`(`pod_id`),
|
||||
CONSTRAINT `fk_host__cluster_id` FOREIGN KEY (`cluster_id`) REFERENCES `cloud`.`cluster`(`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `cloud`.`op_host` (
|
||||
`id` bigint unsigned NOT NULL UNIQUE COMMENT 'host id',
|
||||
`sequence` bigint unsigned DEFAULT 1 NOT NULL COMMENT 'sequence for the host communication',
|
||||
PRIMARY KEY (`id`)
|
||||
PRIMARY KEY (`id`),
|
||||
CONSTRAINT `fk_op_host__id` FOREIGN KEY (`id`) REFERENCES `host`(`id`) ON DELETE CASCADE
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `cloud`.`host_details` (
|
||||
@ -586,7 +598,8 @@ CREATE TABLE `cloud`.`host_details` (
|
||||
`host_id` bigint unsigned NOT NULL COMMENT 'host id',
|
||||
`name` varchar(255) NOT NULL,
|
||||
`value` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
PRIMARY KEY (`id`),
|
||||
CONSTRAINT `fk_host_details__host_id` FOREIGN KEY (`host_id`) REFERENCES `host`(`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `cloud`.`mshost` (
|
||||
@ -606,7 +619,8 @@ CREATE TABLE `cloud`.`host_tags` (
|
||||
`id` bigint unsigned NOT NULL auto_increment,
|
||||
`host_id` bigint unsigned NOT NULL COMMENT 'host id',
|
||||
`tag` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
PRIMARY KEY (`id`),
|
||||
CONSTRAINT `fk_host_tags__host_id` FOREIGN KEY (`host_id`) REFERENCES `host`(`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `cloud`.`user` (
|
||||
@ -779,12 +793,9 @@ CREATE TABLE `cloud`.`user_vm_details` (
|
||||
|
||||
CREATE TABLE `cloud`.`domain_router` (
|
||||
`id` bigint unsigned UNIQUE NOT NULL COMMENT 'Primary Key',
|
||||
`ram_size` int(10) unsigned NOT NULL DEFAULT 128 COMMENT 'memory to use in mb',
|
||||
`domain` varchar(255) COMMENT 'domain',
|
||||
`public_mac_address` varchar(17) COMMENT 'mac address of the public facing network card',
|
||||
`public_ip_address` varchar(15) COMMENT 'public ip address used for source net',
|
||||
`public_netmask` varchar(15) COMMENT 'netmask used for the domR',
|
||||
`guest_mac_address` varchar(17) COMMENT 'mac address of the pod facing network card',
|
||||
`guest_netmask` varchar(15) COMMENT 'netmask used for the guest network',
|
||||
`guest_ip_address` varchar(15) COMMENT ' ip address in the guest network',
|
||||
`network_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'network configuration that this domain router belongs to',
|
||||
@ -1030,7 +1041,6 @@ CREATE TABLE `cloud`.`service_offering` (
|
||||
`nw_rate` smallint unsigned default 200 COMMENT 'network rate throttle mbits/s',
|
||||
`mc_rate` smallint unsigned default 10 COMMENT 'mcast rate throttle mbits/s',
|
||||
`ha_enabled` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT 'Enable HA',
|
||||
`guest_ip_type` varchar(255) NOT NULL DEFAULT 'Virtualized' COMMENT 'Type of guest network -- direct or virtualized',
|
||||
`host_tag` varchar(255) COMMENT 'host tag specified by the service_offering',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user