Skip to content

Commit 8b0ae96

Browse files
author
Daan Hoogland
committed
move config item and further cleanup
1 parent 0d76004 commit 8b0ae96

File tree

10 files changed

+133
-133
lines changed

10 files changed

+133
-133
lines changed

api/src/main/java/com/cloud/network/lb/LoadBalancingRulesService.java

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,23 @@
4141
public interface LoadBalancingRulesService {
4242
/**
4343
* Create a load balancer rule from the given ipAddress/port to the given private port
44+
* @param xId an existing UUID for this rule (for instance a device generated one)
45+
* @param name
46+
* @param description
47+
* @param srcPortStart
48+
* @param srcPortEnd
49+
* @param defPortStart
50+
* @param defPortEnd
51+
* @param ipAddrId
52+
* @param protocol
53+
* @param algorithm
54+
* @param networkId
55+
* @param lbOwnerId
4456
* @param openFirewall
45-
* TODO
46-
* @param forDisplay TODO
47-
* @param cmd
48-
* the command specifying the ip address, public port, protocol, private port, and algorithm
49-
*
57+
* @param lbProtocol
58+
* @param forDisplay
5059
* @return the newly created LoadBalancerVO if successful, null otherwise
60+
* @throws NetworkRuleConflictException
5161
* @throws InsufficientAddressCapacityException
5262
*/
5363
LoadBalancer createPublicLoadBalancerRule(String xId, String name, String description, int srcPortStart, int srcPortEnd, int defPortStart, int defPortEnd,

engine/api/src/main/java/org/apache/cloudstack/engine/orchestration/service/NetworkOrchestrationService.java

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -76,44 +76,52 @@ public interface NetworkOrchestrationService {
7676
*/
7777
Long RVRHandoverTime = 10000L;
7878

79-
ConfigKey<String> MinVRVersion = new ConfigKey<String>(String.class, MinVRVersionCK, "Advanced", "4.10.0",
79+
ConfigKey<String> MinVRVersion = new ConfigKey<>(String.class, MinVRVersionCK, "Advanced", "4.10.0",
8080
"What version should the Virtual Routers report", true, ConfigKey.Scope.Zone, null);
8181

82-
ConfigKey<Integer> NetworkLockTimeout = new ConfigKey<Integer>(Integer.class, NetworkLockTimeoutCK, "Network", "600",
83-
"Lock wait timeout (seconds) while implementing network", true, Scope.Global, null);
82+
ConfigKey<Integer> NetworkLockTimeout = new ConfigKey<>(Integer.class, NetworkLockTimeoutCK, "Network", "600",
83+
"Lock wait timeout (seconds) while implementing network", true, Scope.Global, null);
8484

85-
ConfigKey<String> DeniedRoutes = new ConfigKey<String>(String.class, "denied.routes", "Network", "",
85+
ConfigKey<String> DeniedRoutes = new ConfigKey<>(String.class, "denied.routes", "Network", "",
8686
"Routes that are denied, can not be used for Static Routes creation for the VPC Private Gateway", true, ConfigKey.Scope.Zone, null);
8787

88-
ConfigKey<String> GuestDomainSuffix = new ConfigKey<String>(String.class, GuestDomainSuffixCK, "Network", "cloud.internal",
89-
"Default domain name for vms inside virtualized networks fronted by router", true, ConfigKey.Scope.Zone, null);
88+
ConfigKey<String> GuestDomainSuffix = new ConfigKey<>(String.class, GuestDomainSuffixCK, "Network", "cloud.internal",
89+
"Default domain name for vms inside virtualized networks fronted by router", true, ConfigKey.Scope.Zone, null);
9090

91-
ConfigKey<Integer> NetworkThrottlingRate = new ConfigKey<Integer>("Network", Integer.class, NetworkThrottlingRateCK, "200",
92-
"Default data transfer rate in megabits per second allowed in network.", true, ConfigKey.Scope.Zone);
91+
ConfigKey<Integer> NetworkThrottlingRate = new ConfigKey<>("Network", Integer.class, NetworkThrottlingRateCK, "200",
92+
"Default data transfer rate in megabits per second allowed in network.", true, ConfigKey.Scope.Zone);
9393

94-
ConfigKey<Boolean> PromiscuousMode = new ConfigKey<Boolean>("Advanced", Boolean.class, "network.promiscuous.mode", "false",
94+
ConfigKey<Boolean> PromiscuousMode = new ConfigKey<>("Advanced", Boolean.class, "network.promiscuous.mode", "false",
9595
"Whether to allow or deny promiscuous mode on nics for applicable network elements such as for vswitch/dvswitch portgroups.", true);
9696

97-
ConfigKey<Boolean> MacAddressChanges = new ConfigKey<Boolean>("Advanced", Boolean.class, "network.mac.address.changes", "true",
97+
ConfigKey<Boolean> MacAddressChanges = new ConfigKey<>("Advanced", Boolean.class, "network.mac.address.changes", "true",
9898
"Whether to allow or deny mac address changes on nics for applicable network elements such as for vswitch/dvswitch porgroups.", true);
9999

100-
ConfigKey<Boolean> ForgedTransmits = new ConfigKey<Boolean>("Advanced", Boolean.class, "network.forged.transmits", "true",
100+
ConfigKey<Boolean> ForgedTransmits = new ConfigKey<>("Advanced", Boolean.class, "network.forged.transmits", "true",
101101
"Whether to allow or deny forged transmits on nics for applicable network elements such as for vswitch/dvswitch portgroups.", true);
102102

103-
ConfigKey<Boolean> MacLearning = new ConfigKey<Boolean>("Advanced", Boolean.class, "network.mac.learning", "false",
103+
ConfigKey<Boolean> MacLearning = new ConfigKey<>("Advanced", Boolean.class, "network.mac.learning", "false",
104104
"Whether to allow or deny MAC learning on nics for applicable network elements such as for dvswitch portgroups.", true);
105105

106-
ConfigKey<Boolean> RollingRestartEnabled = new ConfigKey<Boolean>("Advanced", Boolean.class, "network.rolling.restart", "true",
106+
ConfigKey<Boolean> RollingRestartEnabled = new ConfigKey<>("Advanced", Boolean.class, "network.rolling.restart", "true",
107107
"Whether to allow or deny rolling restart of network routers.", true);
108108

109-
static final ConfigKey<Boolean> TUNGSTEN_ENABLED = new ConfigKey<>(Boolean.class, "tungsten.plugin.enable", "Advanced", "false",
109+
ConfigKey<Boolean> TUNGSTEN_ENABLED = new ConfigKey<>(Boolean.class, "tungsten.plugin.enable", "Advanced", "false",
110110
"Indicates whether to enable the Tungsten plugin", false, ConfigKey.Scope.Zone, null);
111111

112-
static final ConfigKey<Boolean> NSX_ENABLED = new ConfigKey<>(Boolean.class, "nsx.plugin.enable", "Advanced", "false",
112+
ConfigKey<Boolean> NSX_ENABLED = new ConfigKey<>(Boolean.class, "nsx.plugin.enable", "Advanced", "false",
113113
"Indicates whether to enable the NSX plugin", false, ConfigKey.Scope.Zone, null);
114114

115115
ConfigKey<Boolean> NETRIS_ENABLED = new ConfigKey<>(Boolean.class, "netris.plugin.enable", "Advanced", "false",
116116
"Indicates whether to enable the Netris plugin", false, ConfigKey.Scope.Zone, null);
117+
ConfigKey<Integer> NETWORK_LB_HAPROXY_MAX_CONN = new ConfigKey<>(
118+
"Network",
119+
Integer.class,
120+
"network.loadbalancer.haproxy.max.conn",
121+
"4096",
122+
"Load Balancer(haproxy) maximum number of concurrent connections(global max)",
123+
true,
124+
Scope.Global);
117125

118126
List<? extends Network> setupNetwork(Account owner, NetworkOffering offering, DeploymentPlan plan, String name, String displayText, boolean isDefault)
119127
throws ConcurrentOperationException;
@@ -129,7 +137,7 @@ void allocate(VirtualMachineProfile vm, LinkedHashMap<? extends Network, List<?
129137
* configures the provided dhcp options on the given nic.
130138
* @param network of the nic
131139
* @param nicId
132-
* @param extraDhcpOptions
140+
* @param extraDhcpOptions a map of rank:value pairs
133141
*/
134142
void configureExtraDhcpOptions(Network network, long nicId, Map<Integer, String> extraDhcpOptions);
135143

@@ -158,16 +166,15 @@ void prepare(VirtualMachineProfile profile, DeployDestination dest, ReservationC
158166
Pair<? extends NetworkGuru, ? extends Network> implementNetwork(long networkId, DeployDestination dest, ReservationContext context)
159167
throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException;
160168

161-
Map<Integer, String> getExtraDhcpOptions(long nicId);
162-
163169
/**
164170
* Returns all extra dhcp options which are set on the provided nic
165171
* @param nicId
166172
* @return map which maps the dhcp value on it's option code
167173
*/
174+
Map<Integer, String> getExtraDhcpOptions(long nicId);
175+
168176
/**
169177
* prepares vm nic change for migration
170-
*
171178
* This method will be called in migration transaction before the vm migration.
172179
* @param vm
173180
* @param dest
@@ -176,7 +183,6 @@ void prepare(VirtualMachineProfile profile, DeployDestination dest, ReservationC
176183

177184
/**
178185
* commit vm nic change for migration
179-
*
180186
* This method will be called in migration transaction after the successful
181187
* vm migration.
182188
* @param src
@@ -186,7 +192,6 @@ void prepare(VirtualMachineProfile profile, DeployDestination dest, ReservationC
186192

187193
/**
188194
* rollback vm nic change for migration
189-
*
190195
* This method will be called in migaration transaction after vm migration
191196
* failure.
192197
* @param src
@@ -266,7 +271,7 @@ NicProfile prepareNic(VirtualMachineProfile vmProfile, DeployDestination dest, R
266271
void releaseNic(VirtualMachineProfile vmProfile, Nic nic) throws ConcurrentOperationException, ResourceUnavailableException;
267272

268273
NicProfile createNicForVm(Network network, NicProfile requested, ReservationContext context, VirtualMachineProfile vmProfile, boolean prepare)
269-
throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException, InsufficientCapacityException,
274+
throws ConcurrentOperationException, InsufficientCapacityException,
270275
ResourceUnavailableException;
271276

272277
NetworkProfile convertNetworkToNetworkProfile(long networkId);
@@ -277,7 +282,7 @@ boolean restartNetwork(Long networkId, Account callerAccount, User callerUser, b
277282
boolean shutdownNetworkElementsAndResources(ReservationContext context, boolean b, Network network);
278283

279284
void implementNetworkElementsAndResources(DeployDestination dest, ReservationContext context, Network network, NetworkOffering findById)
280-
throws ConcurrentOperationException, InsufficientAddressCapacityException, ResourceUnavailableException, InsufficientCapacityException;
285+
throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException;
281286

282287
Map<String, String> finalizeServicesAndProvidersForNetwork(NetworkOffering offering, Long physicalNetworkId);
283288

engine/components-api/src/main/java/com/cloud/configuration/ConfigurationManager.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,6 @@ public interface ConfigurationManager {
7070
"0.5",
7171
"Weight for CPU (as a value between 0 and 1) applied to compute capacity for Pods, Clusters and Hosts for COMBINED capacityType for ordering. Weight for RAM will be (1 - weight of CPU)",
7272
true, ConfigKey.Scope.Global);
73-
ConfigKey<Integer> NETWORK_LB_HAPROXY_MAX_CONN = new ConfigKey<>(
74-
"Network",
75-
Integer.class,
76-
"network.loadbalancer.haproxy.max.conn",
77-
"4096",
78-
"Load Balancer(haproxy) maximum number of concurrent connections(global max)",
79-
true,
80-
ConfigKey.Scope.Global);
8173

8274
/**
8375
* Is this for a VPC

0 commit comments

Comments
 (0)