NAAS : adding support for service capabilities to be specified as part of network offering

This commit is contained in:
Murali Reddy 2011-11-08 13:01:44 -08:00
parent eac54e3ad4
commit db991dd8f6
16 changed files with 199 additions and 15 deletions

View File

@ -274,6 +274,7 @@ public class ApiConstants {
public static final String FIREWALL_SERVICE = "firewallservice";
public static final String GATEWAY_SERVICE = "gatewayservice";
public static final String SERVICE_PROVIDER_LIST = "serviceproviderlist";
public static final String SERVICE_CAPABILITY_LIST = "servicecapabilitylist";
public static final String PROVIDER = "provider";
public static final String NETWORK_SPEED = "networkspeed";
public static final String BROADCAST_DOMAIN_RANGE = "broadcastdomainrange";

View File

@ -33,6 +33,8 @@ import com.cloud.api.Implementation;
import com.cloud.api.Parameter;
import com.cloud.api.ServerApiException;
import com.cloud.api.response.NetworkOfferingResponse;
import com.cloud.network.Network.Capability;
import com.cloud.network.Network.Service;
import com.cloud.offering.NetworkOffering;
import com.cloud.offering.NetworkOffering.Availability;
import com.cloud.user.Account;
@ -112,6 +114,9 @@ public class CreateNetworkOfferingCmd extends BaseCmd {
@Parameter(name = ApiConstants.SERVICE_PROVIDER_LIST, type = CommandType.MAP, description = "provider to service mapping. If not specified, the provider for the service will be mapped to the default provider on the physical network")
private Map serviceProviderList;
@Parameter(name = ApiConstants.SERVICE_CAPABILITY_LIST, type = CommandType.MAP, description = "desired service capabilities as part of network offering")
private Map serviceCapabilistList;
/////////////////////////////////////////////////////
/////////////////// Accessors ///////////////////////
/////////////////////////////////////////////////////
@ -232,6 +237,17 @@ public class CreateNetworkOfferingCmd extends BaseCmd {
return serviceProviderMap;
}
public Map<Capability, String> getServiceCapabilities(Service service) {
Map<Capability, String> serviceCapabilityMap = null;
if (serviceCapabilistList != null && !serviceCapabilistList.isEmpty()) {
if (serviceCapabilistList.containsKey(service.getName())) {
serviceCapabilityMap = (HashMap<Capability, String>) serviceCapabilistList.get(service.getName());
}
}
return serviceCapabilityMap;
}
/////////////////////////////////////////////////////
/////////////// API Implementation///////////////////
/////////////////////////////////////////////////////

View File

@ -33,6 +33,8 @@ import com.cloud.api.Implementation;
import com.cloud.api.Parameter;
import com.cloud.api.ServerApiException;
import com.cloud.api.response.NetworkOfferingResponse;
import com.cloud.network.Network.Capability;
import com.cloud.network.Network.Service;
import com.cloud.offering.NetworkOffering;
import com.cloud.user.Account;
@ -92,7 +94,10 @@ public class UpdateNetworkOfferingCmd extends BaseCmd {
@Parameter(name = ApiConstants.SERVICE_PROVIDER_LIST, type = CommandType.MAP, description = "provider to service mapping. If not specified, the provider for the service will be mapped to the default provider on the physical network")
private Map serviceProviderList;
@Parameter(name = ApiConstants.SERVICE_CAPABILITY_LIST, type = CommandType.MAP, description = "desired service capabilities as part of network offering")
private Map serviceCapabilistList;
@Parameter(name=ApiConstants.STATE, type=CommandType.STRING, description="update state for the network offering")
private String state;
@ -184,6 +189,18 @@ public class UpdateNetworkOfferingCmd extends BaseCmd {
return serviceProviderMap;
}
public Map<Capability, String> getServiceCapabilities(Service service) {
Map<Capability, String> serviceCapabilityMap = null;
if (serviceCapabilistList != null && !serviceCapabilistList.isEmpty()) {
if (serviceCapabilistList.containsKey(service.getName())) {
serviceCapabilityMap = (HashMap<Capability, String>) serviceCapabilistList.get(service.getName());
}
}
return serviceCapabilityMap;
}
public String getState() {
return state;
}

View File

@ -68,7 +68,13 @@ public class NetworkOfferingResponse extends BaseResponse{
@SerializedName("service") @Param(description="the list of supported services", responseObject = ServiceResponse.class)
private List<ServiceResponse> services;
@SerializedName(ApiConstants.IS_SHARED) @Param(description="true if load balncer service offered is shared by multiple networks", responseObject = ServiceResponse.class)
private Boolean isLbShared;
@SerializedName(ApiConstants.IS_SHARED) @Param(description="true if soruce NAT service offered is shared by multiple networks", responseObject = ServiceResponse.class)
private Boolean isSourceNatShared;
public void setId(Long id) {
this.id = id;
}
@ -128,4 +134,12 @@ public class NetworkOfferingResponse extends BaseResponse{
public void setGuestIpType(String type) {
this.guestIpType = type;
}
public void setIsLBShared(boolean isLbSared) {
this.isLbShared = isLbSared;
}
public void setIsSourceNatShared(boolean isSourceNatShared) {
this.isSourceNatShared = isSourceNatShared;
}
}

View File

@ -52,7 +52,7 @@ public interface Network extends ControlledEntity {
public static final Service Dns = new Service("Dns", Capability.AllowDnsSuffixModification);
public static final Service Gateway = new Service("Gateway");
public static final Service Firewall = new Service("Firewall", Capability.SupportedProtocols, Capability.MultipleIps, Capability.SupportedSourceNatTypes, Capability.TrafficStatistics);
public static final Service Lb = new Service("Lb", Capability.SupportedLBAlgorithms, Capability.SupportedProtocols, Capability.TrafficStatistics, Capability.LoadBalancingSupportedIps);
public static final Service Lb = new Service("Lb", Capability.SupportedLBAlgorithms, Capability.SupportedLBIsolation, Capability.SupportedProtocols, Capability.TrafficStatistics, Capability.LoadBalancingSupportedIps);
public static final Service UserData = new Service("UserData");
public static final Service SourceNat = new Service("SourceNat");
public static final Service StaticNat = new Service("StaticNat");
@ -156,6 +156,7 @@ public interface Network extends ControlledEntity {
public static final Capability SupportedProtocols = new Capability("SupportedProtocols");
public static final Capability SupportedLBAlgorithms = new Capability("SupportedLbAlgorithms");
public static final Capability SupportedLBIsolation = new Capability("SupportedLBIsolation");
public static final Capability MultipleIps = new Capability("MultipleIps");
public static final Capability SupportedSourceNatTypes = new Capability("SupportedSourceNatTypes");
public static final Capability SupportedVpnTypes = new Capability("SupportedVpnTypes");

View File

@ -96,4 +96,8 @@ public interface NetworkOffering {
GuestType getGuestType();
Long getServiceOfferingId();
boolean getDedicatedLB();
boolean getSharedSourceNat();
}

View File

@ -2113,6 +2113,8 @@ public class ApiResponseHelper implements ResponseGenerator {
response.setSpecifyVlan(offering.getSpecifyVlan());
response.setAvailability(offering.getAvailability().toString());
response.setNetworkRate(ApiDBUtils.getNetworkRate(offering.getId()));
response.setIsLBShared(!offering.getDedicatedLB());
response.setIsSourceNatShared(offering.getSharedSourceNat());
if (offering.getGuestType() != null) {
response.setGuestIpType(offering.getGuestType().toString());
}

View File

@ -33,6 +33,7 @@ import com.cloud.exception.InsufficientCapacityException;
import com.cloud.exception.InvalidParameterValueException;
import com.cloud.exception.PermissionDeniedException;
import com.cloud.network.Network;
import com.cloud.network.Network.Capability;
import com.cloud.network.Network.Provider;
import com.cloud.network.Network.Service;
import com.cloud.network.Networks.TrafficType;
@ -186,8 +187,9 @@ public interface ConfigurationManager extends ConfigurationService, Manager {
* @return network offering object
*/
NetworkOfferingVO createNetworkOffering(long userId, String name, String displayText, TrafficType trafficType, String tags, Integer maxConnections, boolean specifyVlan, Availability availability, Integer networkRate, Map<Service, Set<Provider>> serviceProviderMap, boolean isDefault, Network.GuestType type, boolean systemOnly, Long serviceOfferingId);
NetworkOfferingVO createNetworkOffering(long userId, String name, String displayText, TrafficType trafficType, String tags, Integer maxConnections, boolean specifyVlan, Availability availability, Integer networkRate, Map<Service, Set<Provider>> serviceProviderMap, boolean isDefault, Network.GuestType type, boolean systemOnly, Long serviceOfferingId,
Map<Capability, String> lbServiceCapabilityMap, Map<Capability, String> fwServiceCapabilityMap);
Vlan createVlanAndPublicIpRange(Long userId, Long zoneId, Long podId, String startIP, String endIP, String vlanGateway, String vlanNetmask, boolean forVirtualNetwork, String vlanId, Account account, Long networkId, Long physicalNetworkId) throws InsufficientCapacityException, ConcurrentOperationException, InvalidParameterValueException;
void createDefaultNetworks(long zoneId, boolean isSecurityGroupEnabled, long physicalNetworkId) throws ConcurrentOperationException;

View File

@ -96,6 +96,7 @@ import com.cloud.exception.ResourceUnavailableException;
import com.cloud.host.dao.HostDetailsDao;
import com.cloud.hypervisor.Hypervisor.HypervisorType;
import com.cloud.network.Network;
import com.cloud.network.Network.Capability;
import com.cloud.network.Network.GuestType;
import com.cloud.network.Network.Provider;
import com.cloud.network.Network.Service;
@ -2968,19 +2969,73 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
}
}
return createNetworkOffering(userId, name, displayText, trafficType, tags, maxConnections, specifyVlan, availability, networkRate, serviceProviderMap, false, guestType, false, serviceOfferingId);
// verify the LB service capabilities specified in the network offering
Map<Capability, String> lbServiceCapabilityMap = cmd.getServiceCapabilities(Service.Lb);
if (!cmd.getLbService() && lbServiceCapabilityMap != null && !lbServiceCapabilityMap.isEmpty()) {
throw new InvalidParameterValueException("Capabilities for LB service can be specifed only when LB service is enabled for network offering.");
}
validateLoadBalancerServiceCapabilities(lbServiceCapabilityMap);
// verify the Firewall service capabilities specified in the network offering
Map<Capability, String> fwServiceCapabilityMap = cmd.getServiceCapabilities(Service.Firewall);
if (!cmd.getFirewallService() && fwServiceCapabilityMap != null && !fwServiceCapabilityMap.isEmpty()) {
throw new InvalidParameterValueException("Capabilities for Firewall service can be specifed only when Firewall service is enabled for network offering.");
}
validateFirewallServiceCapablities(fwServiceCapabilityMap);
return createNetworkOffering(userId, name, displayText, trafficType, tags, maxConnections, specifyVlan, availability, networkRate, serviceProviderMap, false,
guestType, false, serviceOfferingId, lbServiceCapabilityMap, fwServiceCapabilityMap);
}
void validateLoadBalancerServiceCapabilities(Map<Capability, String> lbServiceCapabilityMap) {
if ((lbServiceCapabilityMap != null) && (lbServiceCapabilityMap.keySet().size() > 1 || !lbServiceCapabilityMap.containsKey(Capability.SupportedLBIsolation.getName()))) {
throw new InvalidParameterValueException("Only Load balancer isolation capability can be sepcified for LB service");
} else {
String isolationCapability = lbServiceCapabilityMap.get(Capability.SupportedLBIsolation.getName());
boolean dedicatedLb = isolationCapability.contains("dedicated");
boolean sharedLB = isolationCapability.contains("shared");
if ((dedicatedLb && sharedLB) || (!dedicatedLb && !sharedLB)){
throw new InvalidParameterValueException("Either dedicated or shared isolation can be specified for " + Capability.SupportedLBIsolation.getName());
}
}
}
void validateFirewallServiceCapablities(Map<Capability, String> fwServiceCapabilityMap) {
if ((fwServiceCapabilityMap != null) && (fwServiceCapabilityMap.keySet().size() > 1) || !fwServiceCapabilityMap.containsKey(Capability.SupportedSourceNatTypes.getName())) {
throw new InvalidParameterValueException("Only Supported Source NAT type capability can be sepcified for firewall service");
} else {
String sourceNatType = fwServiceCapabilityMap.get(Capability.SupportedSourceNatTypes.getName());
boolean perAccount = sourceNatType.contains("peraccount");
boolean perZone = sourceNatType.contains("perzone");
if ((perAccount && perZone) || (!perAccount && !perZone)) {
throw new InvalidParameterValueException("Either perAccount or perZone source NAT type can be specified for " + Capability.SupportedSourceNatTypes.getName());
}
}
}
@Override
@DB
public NetworkOfferingVO createNetworkOffering(long userId, String name, String displayText, TrafficType trafficType, String tags, Integer maxConnections, boolean specifyVlan,
Availability availability, Integer networkRate, Map<Service, Set<Provider>> serviceProviderMap, boolean isDefault, Network.GuestType type, boolean systemOnly, Long serviceOfferingId) {
Availability availability, Integer networkRate, Map<Service, Set<Provider>> serviceProviderMap, boolean isDefault, Network.GuestType type,
boolean systemOnly, Long serviceOfferingId, Map<Capability, String> lbServiceCapabilityMap, Map<Capability, String> fwServiceCapabilityMap) {
String multicastRateStr = _configDao.getValue("multicast.throttling.rate");
int multicastRate = ((multicastRateStr == null) ? 10 : Integer.parseInt(multicastRateStr));
tags = cleanupTags(tags);
NetworkOfferingVO offering = new NetworkOfferingVO(name, displayText, trafficType, systemOnly, specifyVlan, networkRate, multicastRate, maxConnections, isDefault, availability, tags, type);
boolean dedicatedLb = true;
if ((lbServiceCapabilityMap != null) && (!lbServiceCapabilityMap.isEmpty())) {
String isolationCapability = lbServiceCapabilityMap.get(Capability.SupportedLBIsolation);
dedicatedLb = isolationCapability.contains("dedicated");
}
boolean sharedSourceNat = false;
if ((fwServiceCapabilityMap != null) && (!fwServiceCapabilityMap.isEmpty())) {
String sourceNatType = fwServiceCapabilityMap.get(Capability.SupportedSourceNatTypes.getName());
sharedSourceNat = sourceNatType.contains("perzone");
}
NetworkOfferingVO offering = new NetworkOfferingVO(name, displayText, trafficType, systemOnly, specifyVlan, networkRate, multicastRate, maxConnections, isDefault, availability, tags, type, dedicatedLb, sharedSourceNat);
if (serviceOfferingId != null) {
offering.setServiceOfferingId(serviceOfferingId);
@ -3318,6 +3373,35 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
}
}
// verify and update the LB service capabilities specified in the network offering
Map<Capability, String> lbServiceCapabilityMap = cmd.getServiceCapabilities(Service.Lb);
boolean dedicatedLb = true;
if (!cmd.getLbService() && lbServiceCapabilityMap != null && !lbServiceCapabilityMap.isEmpty()) {
throw new InvalidParameterValueException("Capabilities for LB service can be specifed only when LB service is enabled for network offering.");
}
validateLoadBalancerServiceCapabilities(lbServiceCapabilityMap);
if ((lbServiceCapabilityMap != null) && (!lbServiceCapabilityMap.isEmpty())) {
String isolationCapability = lbServiceCapabilityMap.get(Capability.SupportedLBIsolation);
dedicatedLb = isolationCapability.contains("dedicated");
}
offering.setDedicatedLb(dedicatedLb);
// verify the Firewall service capabilities specified in the network offering
Map<Capability, String> fwServiceCapabilityMap = cmd.getServiceCapabilities(Service.Firewall);
boolean sharedSourceNat = false;
if (!cmd.getFirewallService() && fwServiceCapabilityMap != null && !fwServiceCapabilityMap.isEmpty()) {
throw new InvalidParameterValueException("Capabilities for Firewall service can be specifed only when Firewall service is enabled for network offering.");
}
validateFirewallServiceCapablities(fwServiceCapabilityMap);
if ((fwServiceCapabilityMap != null) && (!fwServiceCapabilityMap.isEmpty())) {
String sourceNatType = fwServiceCapabilityMap.get(Capability.SupportedSourceNatTypes.getName());
sharedSourceNat = sourceNatType.contains("perzone");
}
offering.setSharedSourceNat(sharedSourceNat);
if (svcPrv != null && !svcPrv.isEmpty()) {
if (networksExist) {
throw new InvalidParameterValueException("Unable to reset service providers as there are existing networks using this network offering");

View File

@ -898,22 +898,22 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
NetworkOfferingVO offering = null;
if (_networkOfferingDao.findByUniqueName(NetworkOffering.DefaultSharedNetworkOfferingWithSGService) == null) {
offering = _configMgr.createNetworkOffering(Account.ACCOUNT_ID_SYSTEM, NetworkOffering.DefaultSharedNetworkOfferingWithSGService, "Offering for Shared Security group enabled networks", TrafficType.Guest, null, null, false, Availability.Optional, null, defaultSharedNetworkOfferingProviders, true, Network.GuestType.Shared, false, null);
offering = _configMgr.createNetworkOffering(Account.ACCOUNT_ID_SYSTEM, NetworkOffering.DefaultSharedNetworkOfferingWithSGService, "Offering for Shared Security group enabled networks", TrafficType.Guest, null, null, false, Availability.Optional, null, defaultSharedNetworkOfferingProviders, true, Network.GuestType.Shared, false, null, null, null);
_networkOfferingDao.update(offering.getId(), offering);
}
if (_networkOfferingDao.findByUniqueName(NetworkOffering.DefaultSharedNetworkOffering) == null) {
offering = _configMgr.createNetworkOffering(Account.ACCOUNT_ID_SYSTEM, NetworkOffering.DefaultSharedNetworkOffering, "Offering for Shared networks", TrafficType.Guest, null, null, true, Availability.Optional, null, defaultSharedNetworkOfferingProviders, true, Network.GuestType.Shared, false, null);
offering = _configMgr.createNetworkOffering(Account.ACCOUNT_ID_SYSTEM, NetworkOffering.DefaultSharedNetworkOffering, "Offering for Shared networks", TrafficType.Guest, null, null, true, Availability.Optional, null, defaultSharedNetworkOfferingProviders, true, Network.GuestType.Shared, false, null, null, null);
_networkOfferingDao.update(offering.getId(), offering);
}
if (_networkOfferingDao.findByUniqueName(NetworkOffering.DefaultIsolatedNetworkOfferingWithSourceNatService) == null) {
offering = _configMgr.createNetworkOffering(Account.ACCOUNT_ID_SYSTEM,NetworkOffering.DefaultIsolatedNetworkOfferingWithSourceNatService, "Offering for Isolated networks with Source Nat service enabled", TrafficType.Guest, null, null, false, Availability.Required, null, defaultIsolatedSourceNatEnabledNetworkOfferingProviders, true, Network.GuestType.Isolated, false, null);
offering = _configMgr.createNetworkOffering(Account.ACCOUNT_ID_SYSTEM,NetworkOffering.DefaultIsolatedNetworkOfferingWithSourceNatService, "Offering for Isolated networks with Source Nat service enabled", TrafficType.Guest, null, null, false, Availability.Required, null, defaultIsolatedSourceNatEnabledNetworkOfferingProviders, true, Network.GuestType.Isolated, false, null, null, null);
_networkOfferingDao.update(offering.getId(), offering);
}
if (_networkOfferingDao.findByUniqueName(NetworkOffering.DefaultIsolatedNetworkOffering) == null) {
offering = _configMgr.createNetworkOffering(Account.ACCOUNT_ID_SYSTEM, NetworkOffering.DefaultIsolatedNetworkOffering, "Offering for Isolated networks with no Source Nat service", TrafficType.Guest, null, null, true, Availability.Optional, null, defaultIsolatedNetworkOfferingProviders, true, Network.GuestType.Isolated, false, null);
offering = _configMgr.createNetworkOffering(Account.ACCOUNT_ID_SYSTEM, NetworkOffering.DefaultIsolatedNetworkOffering, "Offering for Isolated networks with no Source Nat service", TrafficType.Guest, null, null, true, Availability.Optional, null, defaultIsolatedNetworkOfferingProviders, true, Network.GuestType.Isolated, false, null, null, null);
_networkOfferingDao.update(offering.getId(), offering);
}

View File

@ -89,6 +89,7 @@ public class ElasticLoadBalancerElement extends AdapterBase implements LoadBalan
Map<Capability, String> lbCapabilities = new HashMap<Capability, String>();
lbCapabilities.put(Capability.SupportedLBAlgorithms, "roundrobin,leastconn,source");
lbCapabilities.put(Capability.SupportedLBIsolation, "shared");
lbCapabilities.put(Capability.SupportedProtocols, "tcp, udp");
capabilities.put(Service.Lb, lbCapabilities);

View File

@ -135,7 +135,10 @@ public class F5ExternalLoadBalancerElement extends AdapterBase implements LoadBa
// Specifies that the RoundRobin and Leastconn algorithms are supported for load balancing rules
lbCapabilities.put(Capability.SupportedLBAlgorithms, "roundrobin,leastconn");
// specifies that F5 BIG IP network element can provide shared mode only
lbCapabilities.put(Capability.SupportedLBIsolation, "shared");
// Specifies that load balancing rules can be made for either TCP or UDP traffic
lbCapabilities.put(Capability.SupportedProtocols, "tcp,udp");

View File

@ -135,7 +135,10 @@ public class NetscalerExternalLoadBalancerElement extends AdapterBase implements
// Specifies that the RoundRobin and Leastconn algorithms are supported for load balancing rules
lbCapabilities.put(Capability.SupportedLBAlgorithms, "roundrobin,leastconn");
// specifies that Netscaler network element can provided both shared and isolation modes
lbCapabilities.put(Capability.SupportedLBIsolation, "dedicated, shared");
// Specifies that load balancing rules can be made for either TCP or UDP traffic
lbCapabilities.put(Capability.SupportedProtocols, "tcp,udp");

View File

@ -277,6 +277,7 @@ public class VirtualRouterElement extends AdapterBase implements VirtualRouterEl
//Set capabilities for LB service
Map<Capability, String> lbCapabilities = new HashMap<Capability, String>();
lbCapabilities.put(Capability.SupportedLBAlgorithms, "roundrobin,leastconn,source");
lbCapabilities.put(Capability.SupportedLBIsolation, "dedicated");
lbCapabilities.put(Capability.SupportedProtocols, "tcp, udp");
capabilities.put(Service.Lb, lbCapabilities);

View File

@ -97,6 +97,12 @@ public class NetworkOfferingVO implements NetworkOffering {
@Enumerated(value=EnumType.STRING)
Network.GuestType guestType;
@Column(name="dedicated_lb_service")
boolean dedicatedLB;
@Column(name="shared_source_nat_service")
boolean sharedSourceNat;
@Override
public String getDisplayText() {
return displayText;
@ -213,7 +219,26 @@ public class NetworkOfferingVO implements NetworkOffering {
return serviceOfferingId;
}
public NetworkOfferingVO(String name, String displayText, TrafficType trafficType, boolean systemOnly, boolean specifyVlan, Integer rateMbps, Integer multicastRateMbps, Integer concurrentConnections, boolean isDefault, Availability availability, String tags, Network.GuestType guestType) {
@Override
public boolean getDedicatedLB() {
return dedicatedLB;
}
public void setDedicatedLb(boolean dedicatedLB) {
this.dedicatedLB = dedicatedLB;
}
@Override
public boolean getSharedSourceNat() {
return sharedSourceNat;
}
public void setSharedSourceNat(boolean sharedSourceNat) {
this.sharedSourceNat = sharedSourceNat;
}
public NetworkOfferingVO(String name, String displayText, TrafficType trafficType, boolean systemOnly, boolean specifyVlan, Integer rateMbps, Integer multicastRateMbps, Integer concurrentConnections,
boolean isDefault, Availability availability, String tags, Network.GuestType guestType) {
this.name = name;
this.displayText = displayText;
this.rateMbps = rateMbps;
@ -227,6 +252,15 @@ public class NetworkOfferingVO implements NetworkOffering {
this.uniqueName = name;
this.tags = tags;
this.guestType = guestType;
this.dedicatedLB = true;
this.sharedSourceNat =false;
}
public NetworkOfferingVO(String name, String displayText, TrafficType trafficType, boolean systemOnly, boolean specifyVlan, Integer rateMbps, Integer multicastRateMbps, Integer concurrentConnections,
boolean isDefault, Availability availability, String tags, Network.GuestType guestType, boolean dedicatedLb, boolean sharedSourceNat) {
this(name, displayText, trafficType, systemOnly, specifyVlan, rateMbps, multicastRateMbps, concurrentConnections, isDefault, availability, tags, guestType);
this.dedicatedLB = dedicatedLb;
this.sharedSourceNat = sharedSourceNat;
}
public NetworkOfferingVO() {

View File

@ -254,6 +254,7 @@ CREATE TABLE `cloud`.`network_offerings` (
`removed` datetime DEFAULT NULL COMMENT 'time the entry was removed',
`default` int(1) unsigned NOT NULL DEFAULT 0 COMMENT '1 if network offering is default',
`availability` varchar(255) NOT NULL COMMENT 'availability of the network',
`dedicated_lb_service` int(1) unsigned NOT NULL DEFAULT 1 COMMENT 'true if the network offering provides a dedicated load balancer for each network',
`shared_source_nat_service` int(1) unsigned NOT NULL DEFAULT 0 COMMENT 'true if the network offering provides the shared source nat service',
`state` char(32) COMMENT 'state of the network offering; has Disabled value by default',
`guest_type` char(32) COMMENT 'type of guest network; can be shared or isolated',