Skip to content

Commit 333f286

Browse files
DaanHooglandDaan Hoogland
authored andcommitted
config cleanup
1 parent f6f33c6 commit 333f286

File tree

10 files changed

+100
-207
lines changed

10 files changed

+100
-207
lines changed

api/src/main/java/com/cloud/configuration/ConfigurationService.java

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -104,36 +104,22 @@ public interface ConfigurationService {
104104
/**
105105
* Updates a service offering
106106
*
107-
* @param serviceOfferingId
108-
* @param userId
109-
* @param name
110-
* @param displayText
111-
* @param offerHA
112-
* @param useVirtualNetwork
113-
* @param tags
114107
* @return updated service offering
115108
*/
116109
ServiceOffering updateServiceOffering(UpdateServiceOfferingCmd cmd);
117110

118111
/**
119112
* Deletes a service offering
120-
*
121-
* @param userId
122-
* @param serviceOfferingId
123113
*/
124114
boolean deleteServiceOffering(DeleteServiceOfferingCmd cmd);
125115

126116
/**
127117
* Retrieve ID of domains for a service offering
128-
*
129-
* @param serviceOfferingId
130118
*/
131119
List<Long> getServiceOfferingDomains(Long serviceOfferingId);
132120

133121
/**
134122
* Retrieve ID of domains for a service offering
135-
*
136-
* @param serviceOfferingId
137123
*/
138124
List<Long> getServiceOfferingZones(Long serviceOfferingId);
139125

@@ -143,7 +129,6 @@ public interface ConfigurationService {
143129
* @param cmd
144130
* - the command specifying diskOfferingId, name, description, tags
145131
* @return updated disk offering
146-
* @throws
147132
*/
148133
DiskOffering updateDiskOffering(UpdateDiskOfferingCmd cmd);
149134

@@ -153,34 +138,22 @@ public interface ConfigurationService {
153138
* @param cmd
154139
* - the command specifying disk offering id
155140
* @return true or false
156-
* @throws
157141
*/
158142
boolean deleteDiskOffering(DeleteDiskOfferingCmd cmd);
159143

160144
/**
161145
* Creates a new disk offering
162-
*
163-
* @param domainId
164-
* @param name
165-
* @param description
166-
* @param numGibibytes
167-
* @param mirrored
168-
* @param size
169146
* @return ID
170147
*/
171148
DiskOffering createDiskOffering(CreateDiskOfferingCmd cmd);
172149

173150
/**
174151
* Retrieve ID of domains for a disk offering
175-
*
176-
* @param diskOfferingId
177152
*/
178153
List<Long> getDiskOfferingDomains(Long diskOfferingId);
179154

180155
/**
181156
* Retrieve ID of domains for a disk offering
182-
*
183-
* @param diskOfferingId
184157
*/
185158
List<Long> getDiskOfferingZones(Long diskOfferingId);
186159

@@ -202,8 +175,6 @@ public interface ConfigurationService {
202175
* @param allocationState
203176
* TODO
204177
* @return the new pod if successful, null otherwise
205-
* @throws
206-
* @throws
207178
*/
208179
Pod createPod(long zoneId, String name, String startIp, String endIp, String gateway, String netmask, String allocationState);
209180

@@ -223,8 +194,7 @@ public interface ConfigurationService {
223194
/**
224195
* Updates a mutually exclusive IP range in the pod.
225196
* @param cmd - The command specifying pod ID, current Start IP, current End IP, new Start IP, new End IP.
226-
* @throws com.cloud.exception.ConcurrentOperationException
227-
* @return Success
197+
* @throws com.cloud.exception.ConcurrentOperationException when this pod is already being accessed
228198
*/
229199
void updatePodIpRange(UpdatePodManagementNetworkIpRangeCmd cmd) throws ConcurrentOperationException;
230200

@@ -245,9 +215,6 @@ public interface ConfigurationService {
245215

246216
/**
247217
* Edits a pod in the database. Will not allow you to edit pods that are being used anywhere in the system.
248-
*
249-
* @param UpdatePodCmd
250-
* api command
251218
*/
252219
Pod editPod(UpdatePodCmd cmd);
253220

@@ -257,17 +224,12 @@ public interface ConfigurationService {
257224
* @param cmd
258225
* - the command containing podId
259226
* @return true or false
260-
* @throws ,
261227
*/
262228
boolean deletePod(DeletePodCmd cmd);
263229

264230
/**
265231
* Creates a new zone
266-
*
267-
* @param cmd
268232
* @return the zone if successful, null otherwise
269-
* @throws
270-
* @throws
271233
*/
272234
DataCenter createZone(CreateZoneCmd cmd);
273235

@@ -290,22 +252,7 @@ public interface ConfigurationService {
290252
* Adds a VLAN to the database, along with an IP address range. Can add three types of VLANs: (1) zone-wide VLANs on
291253
* the
292254
* virtual public network (2) pod-wide direct attached VLANs (3) account-specific direct attached VLANs
293-
*
294-
* @param userId
295-
* @param vlanType
296-
* - either "DomR" (VLAN for a virtual public network) or "DirectAttached" (VLAN for IPs that will be
297-
* directly
298-
* attached to UserVMs)
299-
* @param zoneId
300-
* @param accountId
301-
* @param podId
302-
* @param add
303-
* @param vlanId
304-
* @param gateway
305-
* @param startIP
306-
* @param endIP
307255
* @throws ResourceAllocationException TODO
308-
* @throws
309256
* @return The new Vlan object
310257
*/
311258
Vlan createVlanAndPublicIpRange(CreateVlanIpRangeCmd cmd) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException,
@@ -320,9 +267,6 @@ Vlan updateVlanAndPublicIpRange(UpdateVlanIpRangeCmd cmd) throws ConcurrentOpera
320267
/**
321268
* Marks the account with the default zone-id.
322269
*
323-
* @param accountName
324-
* @param domainId
325-
* @param defaultZoneId
326270
* @return The new account object
327271
*/
328272
Account markDefaultZone(String accountName, long domainId, long defaultZoneId);
@@ -344,14 +288,12 @@ Vlan updateVlanAndPublicIpRange(UpdateVlanIpRangeCmd cmd) throws ConcurrentOpera
344288
/**
345289
* Retrieve ID of domains for a network offering
346290
*
347-
* @param networkOfferingId
348291
*/
349292
List<Long> getNetworkOfferingDomains(Long networkOfferingId);
350293

351294
/**
352295
* Retrieve ID of domains for a network offering
353296
*
354-
* @param networkOfferingId
355297
*/
356298
List<Long> getNetworkOfferingZones(Long networkOfferingId);
357299

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

Lines changed: 31 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,19 @@
5656
*/
5757
public interface ConfigurationManager {
5858

59-
public static final String MESSAGE_CREATE_POD_IP_RANGE_EVENT = "Message.CreatePodIpRange.Event";
60-
public static final String MESSAGE_DELETE_POD_IP_RANGE_EVENT = "Message.DeletePodIpRange.Event";
61-
public static final String MESSAGE_CREATE_VLAN_IP_RANGE_EVENT = "Message.CreateVlanIpRange.Event";
62-
public static final String MESSAGE_DELETE_VLAN_IP_RANGE_EVENT = "Message.DeleteVlanIpRange.Event";
59+
String MESSAGE_CREATE_POD_IP_RANGE_EVENT = "Message.CreatePodIpRange.Event";
60+
String MESSAGE_DELETE_POD_IP_RANGE_EVENT = "Message.DeletePodIpRange.Event";
61+
String MESSAGE_CREATE_VLAN_IP_RANGE_EVENT = "Message.CreateVlanIpRange.Event";
62+
String MESSAGE_DELETE_VLAN_IP_RANGE_EVENT = "Message.DeleteVlanIpRange.Event";
6363

6464
public static final ConfigKey<Boolean> AllowNonRFC1918CompliantIPs = new ConfigKey<>(Boolean.class,
6565
"allow.non.rfc1918.compliant.ips", "Advanced", "false",
6666
"Allows non-compliant RFC 1918 IPs for Shared, Isolated networks and VPCs", true, null);
6767

6868
/**
69-
* @param offering
70-
* @return
69+
* Is this for a VPC
70+
* @param offering the offering to check
71+
* @return true or false
7172
*/
7273
boolean isOfferingForVpc(NetworkOffering offering);
7374

@@ -78,75 +79,12 @@ public interface ConfigurationManager {
7879
/**
7980
* Updates a configuration entry with a new value
8081
*
81-
* @param userId
82-
* @param name
83-
* @param value
8482
*/
8583
String updateConfiguration(long userId, String name, String category, String value, String scope, Long id);
8684

87-
// /**
88-
// * Creates a new service offering
89-
// *
90-
// * @param name
91-
// * @param cpu
92-
// * @param ramSize
93-
// * @param speed
94-
// * @param displayText
95-
// * @param localStorageRequired
96-
// * @param offerHA
97-
// * @param domainId
98-
// * @param volatileVm
99-
// * @param hostTag
100-
// * @param networkRate
101-
// * @param id
102-
// * @param useVirtualNetwork
103-
// * @param deploymentPlanner
104-
// * @param details
105-
// * @param bytesReadRate
106-
// * @param bytesWriteRate
107-
// * @param iopsReadRate
108-
// * @param iopsWriteRate
109-
// * @return ID
110-
// */
111-
// ServiceOfferingVO createServiceOffering(long userId, boolean isSystem, VirtualMachine.Type vm_typeType, String name, int cpu, int ramSize, int speed, String displayText, boolean localStorageRequired,
112-
// boolean offerHA, boolean limitResourceUse, boolean volatileVm, String tags, Long domainId, String hostTag, Integer networkRate, String deploymentPlanner, Map<String, String> details,
113-
// Long bytesReadRate, Long bytesWriteRate, Long iopsReadRate, Long iopsWriteRate);
114-
115-
// /**
116-
// * Creates a new disk offering
117-
// *
118-
// * @param domainId
119-
// * @param name
120-
// * @param description
121-
// * @param numGibibytes
122-
// * @param tags
123-
// * @param isCustomized
124-
// * @param localStorageRequired
125-
// * @param isDisplayOfferingEnabled
126-
// * @param isCustomizedIops (is admin allowing users to set custom iops?)
127-
// * @param minIops
128-
// * @param maxIops
129-
// * @param bytesReadRate
130-
// * @param bytesWriteRate
131-
// * @param iopsReadRate
132-
// * @param iopsWriteRate
133-
// * @return newly created disk offering
134-
// */
135-
// DiskOfferingVO createDiskOffering(Long domainId, String name, String description, Long numGibibytes, String tags, boolean isCustomized,
136-
// boolean localStorageRequired, boolean isDisplayOfferingEnabled, Boolean isCustomizedIops, Long minIops, Long maxIops,
137-
// Long bytesReadRate, Long bytesWriteRate, Long iopsReadRate, Long iopsWriteRate);
138-
13985
/**
14086
* Creates a new pod
14187
*
142-
* @param userId
143-
* @param podName
144-
* @param zone
145-
* @param gateway
146-
* @param cidr
147-
* @param startIp
148-
* @param endIp
149-
* @param allocationState
15088
* @param skipGatewayOverlapCheck
15189
* (true if it is ok to not validate that gateway IP address overlap with Start/End IP of the POD)
15290
* @return Pod
@@ -157,22 +95,19 @@ HostPodVO createPod(long userId, String podName, DataCenter zone, String gateway
15795
/**
15896
* Creates a new zone
15997
*
160-
* @param userId
161-
* @param zoneName
162-
* @param dns1
163-
* @param dns2
164-
* @param internalDns1
165-
* @param internalDns2
166-
* @param guestCidr
167-
* @param zoneType
168-
* @param allocationState
16998
* @param networkDomain
17099
* @param isSecurityGroupEnabled
100+
<<<<<<< HEAD
171101
* @param ip6Dns1
172102
* @param ip6Dns2
173103
* @return
174104
* @throws
175105
* @throws
106+
=======
107+
* TODO
108+
* @param ip6Dns1 TODO
109+
* @param ip6Dns2 TODO
110+
>>>>>>> 2240215e42e (config cleanup)
176111
*/
177112
DataCenterVO createZone(long userId, String zoneName, String dns1, String dns2, String internalDns1, String internalDns2, String guestCidr, String domain,
178113
Long domainId, NetworkType zoneType, String allocationState, String networkDomain, boolean isSecurityGroupEnabled, boolean isLocalStorageEnabled, String ip6Dns1,
@@ -182,9 +117,13 @@ DataCenterVO createZone(long userId, String zoneName, String dns1, String dns2,
182117
* Deletes a VLAN from the database, along with all of its IP addresses. Will not delete VLANs that have allocated
183118
* IP addresses.
184119
*
120+
<<<<<<< HEAD
185121
* @param userId
186122
* @param vlanDbId
187123
* @param caller
124+
=======
125+
* @param caller TODO
126+
>>>>>>> 2240215e42e (config cleanup)
188127
* @return success/failure
189128
*/
190129
VlanVO deleteVlanAndPublicIpRange(long userId, long vlanDbId, Account caller);
@@ -195,17 +134,21 @@ DataCenterVO createZone(long userId, String zoneName, String dns1, String dns2,
195134

196135
/**
197136
* Creates a new network offering
137+
<<<<<<< HEAD
198138
*
199139
* @param name
200140
* @param displayText
201141
* @param trafficType
202142
* @param tags
203143
* @param specifyVlan
144+
=======
145+
>>>>>>> 2240215e42e (config cleanup)
204146
* @param networkRate
205147
* @param serviceProviderMap
206148
* @param isDefault
207149
* @param type
208150
* @param systemOnly
151+
<<<<<<< HEAD
209152
* @param serviceOfferingId
210153
* @param conserveMode ;
211154
* @param specifyIpRanges
@@ -216,6 +159,16 @@ DataCenterVO createZone(long userId, String zoneName, String dns1, String dns2,
216159
* @param forNsx
217160
* @param domainIds
218161
* @param zoneIds
162+
=======
163+
* TODO
164+
* @param conserveMode
165+
* ;
166+
* @param specifyIpRanges
167+
* TODO
168+
* @param isPersistent
169+
* ;
170+
* @param details TODO
171+
>>>>>>> 2240215e42e (config cleanup)
219172
* @return network offering object
220173
*/
221174

@@ -235,32 +188,21 @@ Vlan createVlanAndPublicIpRange(long zoneId, long networkId, long physicalNetwor
235188
/**
236189
* Release dedicated virtual ip ranges of a domain.
237190
*
238-
* @param domainId
239191
* @return success/failure
240192
*/
241193
boolean releaseDomainSpecificVirtualRanges(Domain domain);
242194

243195
/**
244196
* Release dedicated virtual ip ranges of an account.
245197
*
246-
* @param accountId
247198
* @return success/failure
248199
*/
249200
boolean releaseAccountSpecificVirtualRanges(Account account);
250201

251202
/**
252203
* Edits a pod in the database. Will not allow you to edit pods that are being used anywhere in the system.
253204
*
254-
* @param id
255-
* @param name
256-
* @param startIp
257-
* @param endIp
258-
* @param gateway
259-
* @param netmask
260-
* @param allocationState
261205
* @return Pod
262-
* @throws
263-
* @throws
264206
*/
265207
Pod editPod(long id, String name, String startIp, String endIp, String gateway, String netmask, String allocationState);
266208

0 commit comments

Comments
 (0)