diff --git a/api/src/com/cloud/api/ApiConstants.java b/api/src/com/cloud/api/ApiConstants.java index 24019b70ffb..df01e6d660d 100755 --- a/api/src/com/cloud/api/ApiConstants.java +++ b/api/src/com/cloud/api/ApiConstants.java @@ -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"; diff --git a/api/src/com/cloud/api/commands/CreateNetworkOfferingCmd.java b/api/src/com/cloud/api/commands/CreateNetworkOfferingCmd.java index 20df3a6a5a2..821d91dd7ec 100644 --- a/api/src/com/cloud/api/commands/CreateNetworkOfferingCmd.java +++ b/api/src/com/cloud/api/commands/CreateNetworkOfferingCmd.java @@ -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; } diff --git a/api/src/com/cloud/api/response/NetworkOfferingResponse.java b/api/src/com/cloud/api/response/NetworkOfferingResponse.java index 1e4407a4a7f..763fbd0137d 100644 --- a/api/src/com/cloud/api/response/NetworkOfferingResponse.java +++ b/api/src/com/cloud/api/response/NetworkOfferingResponse.java @@ -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; } diff --git a/api/src/com/cloud/offering/NetworkOffering.java b/api/src/com/cloud/offering/NetworkOffering.java index 9fe8ed2bc0f..93a27c06333 100644 --- a/api/src/com/cloud/offering/NetworkOffering.java +++ b/api/src/com/cloud/offering/NetworkOffering.java @@ -68,11 +68,6 @@ public interface NetworkOffering { */ Integer getMulticastRateMbps(); - /** - * @return concurrent connections to be supported. - */ - Integer getConcurrentConnections(); - TrafficType getTrafficType(); boolean getSpecifyVlan(); diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java index 2351be5b324..a3e2abe3e05 100755 --- a/server/src/com/cloud/api/ApiResponseHelper.java +++ b/server/src/com/cloud/api/ApiResponseHelper.java @@ -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()); diff --git a/server/src/com/cloud/configuration/ConfigurationManager.java b/server/src/com/cloud/configuration/ConfigurationManager.java index 62ac600a93f..20cf085902c 100644 --- a/server/src/com/cloud/configuration/ConfigurationManager.java +++ b/server/src/com/cloud/configuration/ConfigurationManager.java @@ -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> serviceProviderMap, boolean isDefault, Network.GuestType type, boolean systemOnly, Long serviceOfferingId, - Map> serviceCapabilityMap); + NetworkOfferingVO createNetworkOffering(long userId, String name, String displayText, TrafficType trafficType, String tags, boolean specifyVlan, Availability availability, Integer networkRate, Map> serviceProviderMap, boolean isDefault, Network.GuestType type, boolean systemOnly, Long serviceOfferingId, Map> 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; diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java index 79b39d55759..b9a64a895b1 100755 --- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java +++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java @@ -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 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> serviceProviderMap, boolean isDefault, Network.GuestType type, - boolean systemOnly, Long serviceOfferingId, Map> serviceCapabilityMap) { + public NetworkOfferingVO createNetworkOffering(long userId, String name, String displayText, TrafficType trafficType, String tags, boolean specifyVlan, Availability availability, + Integer networkRate, Map> serviceProviderMap, boolean isDefault, Network.GuestType type, boolean systemOnly, + Long serviceOfferingId, Map> 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); diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java index b70e838484c..38567b3166b 100755 --- a/server/src/com/cloud/network/NetworkManagerImpl.java +++ b/server/src/com/cloud/network/NetworkManagerImpl.java @@ -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); } diff --git a/server/src/com/cloud/offerings/NetworkOfferingVO.java b/server/src/com/cloud/offerings/NetworkOfferingVO.java index d2c649f0340..0a7a14fc7ec 100755 --- a/server/src/com/cloud/offerings/NetworkOfferingVO.java +++ b/server/src/com/cloud/offerings/NetworkOfferingVO.java @@ -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; } diff --git a/server/src/com/cloud/server/ConfigurationServerImpl.java b/server/src/com/cloud/server/ConfigurationServerImpl.java index 0dbf43b4dc4..666f3c2081d 100644 --- a/server/src/com/cloud/server/ConfigurationServerImpl.java +++ b/server/src/com/cloud/server/ConfigurationServerImpl.java @@ -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); diff --git a/setup/db/create-schema.sql b/setup/db/create-schema.sql index 147c0ac1dc5..c45b70d1c46 100755 --- a/setup/db/create-schema.sql +++ b/setup/db/create-schema.sql @@ -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', diff --git a/setup/db/db/schema-2214to30.sql b/setup/db/db/schema-2214to30.sql index c05b6ec250c..b62c61d280e 100755 --- a/setup/db/db/schema-2214to30.sql +++ b/setup/db/db/schema-2214to30.sql @@ -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`;