mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
bug 12305: drop max_connections from the network offering as this information is being set on network element level now
status 12305: resolved fixed
This commit is contained in:
parent
77ee3cedd5
commit
3a94a41baf
@ -212,7 +212,6 @@ public class ApiConstants {
|
||||
public static final String PAGE_SIZE = "pagesize";
|
||||
public static final String COUNT = "count";
|
||||
public static final String TRAFFIC_TYPE = "traffictype";
|
||||
public static final String MAX_CONNECTIONS = "maxconnections";
|
||||
public static final String NETWORK_OFFERING_ID = "networkofferingid";
|
||||
public static final String NETWORK_IDS = "networkids";
|
||||
public static final String NETWORK_ID = "networkid";
|
||||
|
||||
@ -59,9 +59,6 @@ public class CreateNetworkOfferingCmd extends BaseCmd {
|
||||
@Parameter(name=ApiConstants.TRAFFIC_TYPE, type=CommandType.STRING, required=true, description="the traffic type for the network offering. Supported type in current release is GUEST only")
|
||||
private String traffictype;
|
||||
|
||||
@Parameter(name=ApiConstants.MAX_CONNECTIONS, type=CommandType.INTEGER, description="maximum number of concurrent connections supported by the network offering")
|
||||
private Integer maxConnections;
|
||||
|
||||
@Parameter(name=ApiConstants.TAGS, type=CommandType.STRING, description="the tags for the network offering.", length=4096)
|
||||
private String tags;
|
||||
|
||||
@ -109,10 +106,6 @@ public class CreateNetworkOfferingCmd extends BaseCmd {
|
||||
public String getTraffictype() {
|
||||
return traffictype;
|
||||
}
|
||||
|
||||
public Integer getMaxconnections() {
|
||||
return maxConnections;
|
||||
}
|
||||
|
||||
public Boolean getSpecifyVlan() {
|
||||
return specifyVlan == null ? false : specifyVlan;
|
||||
@ -130,10 +123,6 @@ public class CreateNetworkOfferingCmd extends BaseCmd {
|
||||
return _name;
|
||||
}
|
||||
|
||||
public Integer getMaxConnections() {
|
||||
return maxConnections;
|
||||
}
|
||||
|
||||
public Long getServiceOfferingId() {
|
||||
return serviceOfferingId;
|
||||
}
|
||||
|
||||
@ -43,9 +43,6 @@ public class NetworkOfferingResponse extends BaseResponse{
|
||||
@SerializedName(ApiConstants.CREATED) @Param(description="the date this network offering was created")
|
||||
private Date created;
|
||||
|
||||
@SerializedName(ApiConstants.MAX_CONNECTIONS) @Param(description="the max number of concurrent connection the network offering supports")
|
||||
private Integer maxConnections;
|
||||
|
||||
@SerializedName(ApiConstants.TRAFFIC_TYPE) @Param(description="the traffic type for the network offering, supported types are Public, Management, Control, Guest, Vlan or Storage.")
|
||||
private String trafficType;
|
||||
|
||||
@ -93,10 +90,6 @@ public class NetworkOfferingResponse extends BaseResponse{
|
||||
this.created = created;
|
||||
}
|
||||
|
||||
public void setMaxconnections(Integer maxConnections) {
|
||||
this.maxConnections = maxConnections;
|
||||
}
|
||||
|
||||
public void setTrafficType(String trafficType) {
|
||||
this.trafficType = trafficType;
|
||||
}
|
||||
@ -105,10 +98,6 @@ public class NetworkOfferingResponse extends BaseResponse{
|
||||
this.isDefault = isDefault;
|
||||
}
|
||||
|
||||
public void setMaxConnections(Integer maxConnections) {
|
||||
this.maxConnections = maxConnections;
|
||||
}
|
||||
|
||||
public void setSpecifyVlan(Boolean specifyVlan) {
|
||||
this.specifyVlan = specifyVlan;
|
||||
}
|
||||
|
||||
@ -68,11 +68,6 @@ public interface NetworkOffering {
|
||||
*/
|
||||
Integer getMulticastRateMbps();
|
||||
|
||||
/**
|
||||
* @return concurrent connections to be supported.
|
||||
*/
|
||||
Integer getConcurrentConnections();
|
||||
|
||||
TrafficType getTrafficType();
|
||||
|
||||
boolean getSpecifyVlan();
|
||||
|
||||
@ -2568,7 +2568,6 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||
response.setDisplayText(offering.getDisplayText());
|
||||
response.setTags(offering.getTags());
|
||||
response.setTrafficType(offering.getTrafficType().toString());
|
||||
response.setMaxconnections(offering.getConcurrentConnections());
|
||||
response.setIsDefault(offering.isDefault());
|
||||
response.setSpecifyVlan(offering.getSpecifyVlan());
|
||||
response.setAvailability(offering.getAvailability().toString());
|
||||
|
||||
@ -175,20 +175,18 @@ public interface ConfigurationManager extends ConfigurationService, Manager {
|
||||
* @param displayText
|
||||
* @param trafficType
|
||||
* @param tags
|
||||
* @param maxConnections
|
||||
* @param networkRate TODO
|
||||
* @param serviceProviderMap TODO
|
||||
* @param isDefault TODO
|
||||
* @param type TODO
|
||||
* @param systemOnly TODO
|
||||
* @param serviceOfferingId
|
||||
* @param id
|
||||
* @param specifyVlan;
|
||||
* @param serviceOfferingId
|
||||
* @return network offering object
|
||||
* @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,
|
||||
Map<Service, Map<Capability, String>> serviceCapabilityMap);
|
||||
NetworkOfferingVO createNetworkOffering(long userId, String name, String displayText, TrafficType trafficType, String tags, boolean specifyVlan, Availability availability, Integer networkRate, Map<Service, Set<Provider>> serviceProviderMap, boolean isDefault, Network.GuestType type, boolean systemOnly, Long serviceOfferingId, Map<Service, Map<Capability, String>> serviceCapabilityMap);
|
||||
|
||||
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;
|
||||
|
||||
|
||||
@ -2973,8 +2973,6 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
|
||||
throw new InvalidParameterValueException("Invalid value for Availability. Supported types: " + Availability.Required + ", " + Availability.Optional);
|
||||
}
|
||||
|
||||
Integer maxConnections = cmd.getMaxconnections();
|
||||
|
||||
Long serviceOfferingId = cmd.getServiceOfferingId();
|
||||
|
||||
if (serviceOfferingId != null) {
|
||||
@ -3078,8 +3076,8 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
|
||||
serviceCapabilityMap.put(Service.Lb, lbServiceCapabilityMap);
|
||||
serviceCapabilityMap.put(Service.SourceNat, sourceNatServiceCapabilityMap);
|
||||
|
||||
return createNetworkOffering(userId, name, displayText, trafficType, tags, maxConnections, specifyVlan, availability, networkRate, serviceProviderMap, false,
|
||||
guestType, false, serviceOfferingId, serviceCapabilityMap);
|
||||
return createNetworkOffering(userId, name, displayText, trafficType, tags, specifyVlan, availability, networkRate, serviceProviderMap, false, guestType,
|
||||
false, serviceOfferingId, serviceCapabilityMap);
|
||||
}
|
||||
|
||||
void validateLoadBalancerServiceCapabilities(Map<Capability, String> lbServiceCapabilityMap) {
|
||||
@ -3125,9 +3123,9 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
|
||||
|
||||
@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, Map<Service, Map<Capability, String>> serviceCapabilityMap) {
|
||||
public NetworkOfferingVO createNetworkOffering(long userId, String name, String displayText, TrafficType trafficType, String tags, boolean specifyVlan, Availability availability,
|
||||
Integer networkRate, Map<Service, Set<Provider>> serviceProviderMap, boolean isDefault, Network.GuestType type, boolean systemOnly,
|
||||
Long serviceOfferingId, Map<Service, Map<Capability, String>> serviceCapabilityMap) {
|
||||
|
||||
String multicastRateStr = _configDao.getValue("multicast.throttling.rate");
|
||||
int multicastRate = ((multicastRateStr == null) ? 10 : Integer.parseInt(multicastRateStr));
|
||||
@ -3178,7 +3176,7 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
|
||||
}
|
||||
}
|
||||
|
||||
NetworkOfferingVO offering = new NetworkOfferingVO(name, displayText, trafficType, systemOnly, specifyVlan, networkRate, multicastRate, maxConnections, isDefault, availability, tags, type, dedicatedLb, sharedSourceNat, redundantRouter);
|
||||
NetworkOfferingVO offering = new NetworkOfferingVO(name, displayText, trafficType, systemOnly, specifyVlan, networkRate, multicastRate, isDefault, availability, tags, type, dedicatedLb, sharedSourceNat, redundantRouter);
|
||||
|
||||
if (serviceOfferingId != null) {
|
||||
offering.setServiceOfferingId(serviceOfferingId);
|
||||
|
||||
@ -901,25 +901,25 @@ 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, true, Availability.Optional, null, defaultSharedNetworkOfferingProviders, true, Network.GuestType.Shared, false, null, null);
|
||||
offering = _configMgr.createNetworkOffering(Account.ACCOUNT_ID_SYSTEM, NetworkOffering.DefaultSharedNetworkOfferingWithSGService, "Offering for Shared Security group enabled networks", TrafficType.Guest, null, true, Availability.Optional, null, defaultSharedNetworkOfferingProviders, true, Network.GuestType.Shared, false, null, null);
|
||||
offering.setState(NetworkOffering.State.Enabled);
|
||||
_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, null);
|
||||
offering = _configMgr.createNetworkOffering(Account.ACCOUNT_ID_SYSTEM, NetworkOffering.DefaultSharedNetworkOffering, "Offering for Shared networks", TrafficType.Guest, null, true, Availability.Optional, null, defaultSharedNetworkOfferingProviders, true, Network.GuestType.Shared, false, null, null);
|
||||
offering.setState(NetworkOffering.State.Enabled);
|
||||
_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, null);
|
||||
offering = _configMgr.createNetworkOffering(Account.ACCOUNT_ID_SYSTEM,NetworkOffering.DefaultIsolatedNetworkOfferingWithSourceNatService, "Offering for Isolated networks with Source Nat service enabled", TrafficType.Guest, null, false, Availability.Required, null, defaultIsolatedSourceNatEnabledNetworkOfferingProviders, true, Network.GuestType.Isolated, false, null, null);
|
||||
offering.setState(NetworkOffering.State.Enabled);
|
||||
_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, null);
|
||||
offering = _configMgr.createNetworkOffering(Account.ACCOUNT_ID_SYSTEM, NetworkOffering.DefaultIsolatedNetworkOffering, "Offering for Isolated networks with no Source Nat service", TrafficType.Guest, null, true, Availability.Optional, null, defaultIsolatedNetworkOfferingProviders, true, Network.GuestType.Isolated, false, null, null);
|
||||
offering.setState(NetworkOffering.State.Enabled);
|
||||
_networkOfferingDao.update(offering.getId(), offering);
|
||||
}
|
||||
|
||||
@ -59,9 +59,6 @@ public class NetworkOfferingVO implements NetworkOffering, Identity {
|
||||
@Column(name="mc_rate")
|
||||
Integer multicastRateMbps;
|
||||
|
||||
@Column(name="concurrent_connections")
|
||||
Integer concurrentConnections;
|
||||
|
||||
@Column(name="traffic_type")
|
||||
@Enumerated(value=EnumType.STRING)
|
||||
TrafficType trafficType;
|
||||
@ -158,11 +155,6 @@ public class NetworkOfferingVO implements NetworkOffering, Identity {
|
||||
return removed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getConcurrentConnections() {
|
||||
return concurrentConnections;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTags() {
|
||||
return tags;
|
||||
@ -259,13 +251,12 @@ public class NetworkOfferingVO implements NetworkOffering, Identity {
|
||||
this.redundantRouter = redundantRouter;
|
||||
}
|
||||
|
||||
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) {
|
||||
public NetworkOfferingVO(String name, String displayText, TrafficType trafficType, boolean systemOnly, boolean specifyVlan, Integer rateMbps, Integer multicastRateMbps, boolean isDefault,
|
||||
Availability availability, String tags, Network.GuestType guestType) {
|
||||
this.name = name;
|
||||
this.displayText = displayText;
|
||||
this.rateMbps = rateMbps;
|
||||
this.multicastRateMbps = multicastRateMbps;
|
||||
this.concurrentConnections = concurrentConnections;
|
||||
this.trafficType = trafficType;
|
||||
this.systemOnly = systemOnly;
|
||||
this.specifyVlan = specifyVlan;
|
||||
@ -280,9 +271,9 @@ public class NetworkOfferingVO implements NetworkOffering, Identity {
|
||||
this.redundantRouter= 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, boolean redundantRouter) {
|
||||
this(name, displayText, trafficType, systemOnly, specifyVlan, rateMbps, multicastRateMbps, concurrentConnections, isDefault, availability, tags, guestType);
|
||||
public NetworkOfferingVO(String name, String displayText, TrafficType trafficType, boolean systemOnly, boolean specifyVlan, Integer rateMbps, Integer multicastRateMbps, boolean isDefault,
|
||||
Availability availability, String tags, Network.GuestType guestType, boolean dedicatedLb, boolean sharedSourceNat, boolean redundantRouter) {
|
||||
this(name, displayText, trafficType, systemOnly, specifyVlan, rateMbps, multicastRateMbps, isDefault, availability, tags, guestType);
|
||||
this.dedicatedLB = dedicatedLb;
|
||||
this.sharedSourceNat = sharedSourceNat;
|
||||
this.redundantRouter = redundantRouter;
|
||||
@ -297,7 +288,7 @@ public class NetworkOfferingVO implements NetworkOffering, Identity {
|
||||
* @param trafficType
|
||||
*/
|
||||
public NetworkOfferingVO(String name, TrafficType trafficType) {
|
||||
this(name, "System Offering for " + name, trafficType, true, false, 0, 0, null, true, Availability.Required, null, null);
|
||||
this(name, "System Offering for " + name, trafficType, true, false, 0, 0, true, Availability.Required, null, null);
|
||||
this.state = State.Enabled;
|
||||
}
|
||||
|
||||
|
||||
@ -850,8 +850,8 @@ public class ConfigurationServerImpl implements ConfigurationServer {
|
||||
NetworkOffering.DefaultSharedNetworkOfferingWithSGService,
|
||||
"Offering for Shared Security group enabled networks",
|
||||
TrafficType.Guest,
|
||||
false, true, null, null, null, true,
|
||||
Availability.Optional, null, Network.GuestType.Shared);
|
||||
false, true, null, null, true, Availability.Optional,
|
||||
null, Network.GuestType.Shared);
|
||||
|
||||
deafultSharedSGNetworkOffering.setState(NetworkOffering.State.Enabled);
|
||||
deafultSharedSGNetworkOffering = _networkOfferingDao.persistDefaultNetworkOffering(deafultSharedSGNetworkOffering);
|
||||
@ -867,8 +867,8 @@ public class ConfigurationServerImpl implements ConfigurationServer {
|
||||
NetworkOffering.DefaultSharedNetworkOffering,
|
||||
"Offering for Shared networks",
|
||||
TrafficType.Guest,
|
||||
false, true, null, null, null, true,
|
||||
Availability.Optional, null, Network.GuestType.Shared);
|
||||
false, true, null, null, true, Availability.Optional,
|
||||
null, Network.GuestType.Shared);
|
||||
|
||||
defaultSharedNetworkOffering.setState(NetworkOffering.State.Enabled);
|
||||
defaultSharedNetworkOffering = _networkOfferingDao.persistDefaultNetworkOffering(defaultSharedNetworkOffering);
|
||||
@ -884,8 +884,8 @@ public class ConfigurationServerImpl implements ConfigurationServer {
|
||||
NetworkOffering.DefaultIsolatedNetworkOfferingWithSourceNatService,
|
||||
"Offering for Isolated networks with Source Nat service enabled",
|
||||
TrafficType.Guest,
|
||||
false, false, null, null, null, true,
|
||||
Availability.Required, null, Network.GuestType.Isolated);
|
||||
false, false, null, null, true, Availability.Required,
|
||||
null, Network.GuestType.Isolated);
|
||||
|
||||
defaultIsolatedSourceNatEnabledNetworkOffering.setState(NetworkOffering.State.Enabled);
|
||||
defaultIsolatedSourceNatEnabledNetworkOffering = _networkOfferingDao.persistDefaultNetworkOffering(defaultIsolatedSourceNatEnabledNetworkOffering);
|
||||
@ -902,8 +902,8 @@ public class ConfigurationServerImpl implements ConfigurationServer {
|
||||
NetworkOffering.DefaultIsolatedNetworkOffering,
|
||||
"Offering for Isolated networks with no Source Nat service",
|
||||
TrafficType.Guest,
|
||||
false, true, null, null, null, true,
|
||||
Availability.Optional, null, Network.GuestType.Isolated);
|
||||
false, true, null, null, true, Availability.Optional,
|
||||
null, Network.GuestType.Isolated);
|
||||
|
||||
defaultIsolatedEnabledNetworkOffering.setState(NetworkOffering.State.Enabled);
|
||||
defaultIsolatedEnabledNetworkOffering = _networkOfferingDao.persistDefaultNetworkOffering(defaultIsolatedEnabledNetworkOffering);
|
||||
|
||||
@ -253,7 +253,6 @@ CREATE TABLE `cloud`.`network_offerings` (
|
||||
`display_text` varchar(255) NOT NULL COMMENT 'text to display to users',
|
||||
`nw_rate` smallint unsigned COMMENT 'network rate throttle mbits/s',
|
||||
`mc_rate` smallint unsigned COMMENT 'mcast rate throttle mbits/s',
|
||||
`concurrent_connections` int(10) unsigned COMMENT 'concurrent connections supported on this network',
|
||||
`traffic_type` varchar(32) NOT NULL COMMENT 'traffic type carried on this network',
|
||||
`tags` varchar(4096) COMMENT 'tags supported by this offering',
|
||||
`system_only` int(1) unsigned NOT NULL DEFAULT 0 COMMENT 'Is this network offering for system use only',
|
||||
|
||||
@ -308,4 +308,4 @@ ALTER TABLE `cloud`.`network_offerings` ADD COLUMN `sort_key` int(32) NOT NULL d
|
||||
|
||||
ALTER TABLE `cloud`.`network_offerings` MODIFY `name` varchar(64) COMMENT 'name of the network offering';
|
||||
ALTER TABLE `cloud`.`network_offerings` MODIFY `unique_name` varchar(64) COMMENT 'unique name of the network offering';
|
||||
|
||||
ALTER TABLE `cloud`.`network_offerings` DROP `concurrent_connections`;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user