Skip to content

Commit 2240215

Browse files
committed
config cleanup
1 parent 99ea77d commit 2240215

File tree

10 files changed

+79
-226
lines changed

10 files changed

+79
-226
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: 7 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@
5555
*/
5656
public interface ConfigurationManager {
5757

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

6463
/**
65-
* @param offering
66-
* @return
64+
* Is this for a VPC
65+
* @param offering the offering to check
66+
* @return true or false
6767
*/
6868
boolean isOfferingForVpc(NetworkOffering offering);
6969

@@ -74,76 +74,12 @@ public interface ConfigurationManager {
7474
/**
7575
* Updates a configuration entry with a new value
7676
*
77-
* @param userId
78-
* @param name
79-
* @param value
8077
*/
8178
String updateConfiguration(long userId, String name, String category, String value, String scope, Long id);
8279

83-
// /**
84-
// * Creates a new service offering
85-
// *
86-
// * @param name
87-
// * @param cpu
88-
// * @param ramSize
89-
// * @param speed
90-
// * @param displayText
91-
// * @param localStorageRequired
92-
// * @param offerHA
93-
// * @param domainId
94-
// * @param volatileVm
95-
// * @param hostTag
96-
// * @param networkRate
97-
// * TODO
98-
// * @param id
99-
// * @param useVirtualNetwork
100-
// * @param deploymentPlanner
101-
// * @param details
102-
// * @param bytesReadRate
103-
// * @param bytesWriteRate
104-
// * @param iopsReadRate
105-
// * @param iopsWriteRate
106-
// * @return ID
107-
// */
108-
// ServiceOfferingVO createServiceOffering(long userId, boolean isSystem, VirtualMachine.Type vm_typeType, String name, int cpu, int ramSize, int speed, String displayText, boolean localStorageRequired,
109-
// boolean offerHA, boolean limitResourceUse, boolean volatileVm, String tags, Long domainId, String hostTag, Integer networkRate, String deploymentPlanner, Map<String, String> details,
110-
// Long bytesReadRate, Long bytesWriteRate, Long iopsReadRate, Long iopsWriteRate);
111-
112-
// /**
113-
// * Creates a new disk offering
114-
// *
115-
// * @param domainId
116-
// * @param name
117-
// * @param description
118-
// * @param numGibibytes
119-
// * @param tags
120-
// * @param isCustomized
121-
// * @param localStorageRequired
122-
// * @param isDisplayOfferingEnabled
123-
// * @param isCustomizedIops (is admin allowing users to set custom iops?)
124-
// * @param minIops
125-
// * @param maxIops
126-
// * @param bytesReadRate
127-
// * @param bytesWriteRate
128-
// * @param iopsReadRate
129-
// * @param iopsWriteRate
130-
// * @return newly created disk offering
131-
// */
132-
// DiskOfferingVO createDiskOffering(Long domainId, String name, String description, Long numGibibytes, String tags, boolean isCustomized,
133-
// boolean localStorageRequired, boolean isDisplayOfferingEnabled, Boolean isCustomizedIops, Long minIops, Long maxIops,
134-
// Long bytesReadRate, Long bytesWriteRate, Long iopsReadRate, Long iopsWriteRate);
135-
13680
/**
13781
* Creates a new pod
13882
*
139-
* @param userId
140-
* @param podName
141-
* @param zone
142-
* @param gateway
143-
* @param cidr
144-
* @param startIp
145-
* @param endIp
146-
* @param allocationState
14783
* @param skipGatewayOverlapCheck
14884
* (true if it is ok to not validate that gateway IP address overlap with Start/End IP of the POD)
14985
* @return Pod
@@ -154,24 +90,12 @@ HostPodVO createPod(long userId, String podName, DataCenter zone, String gateway
15490
/**
15591
* Creates a new zone
15692
*
157-
* @param userId
158-
* @param zoneName
159-
* @param dns1
160-
* @param dns2
161-
* @param internalDns1
162-
* @param internalDns2
163-
* @param guestCidr
164-
* @param zoneType
165-
* @param allocationState
16693
* @param networkDomain
16794
* TODO
16895
* @param isSecurityGroupEnabled
16996
* TODO
17097
* @param ip6Dns1 TODO
17198
* @param ip6Dns2 TODO
172-
* @return
173-
* @throws
174-
* @throws
17599
*/
176100
DataCenterVO createZone(long userId, String zoneName, String dns1, String dns2, String internalDns1, String internalDns2, String guestCidr, String domain,
177101
Long domainId, NetworkType zoneType, String allocationState, String networkDomain, boolean isSecurityGroupEnabled, boolean isLocalStorageEnabled, String ip6Dns1,
@@ -181,8 +105,6 @@ DataCenterVO createZone(long userId, String zoneName, String dns1, String dns2,
181105
* Deletes a VLAN from the database, along with all of its IP addresses. Will not delete VLANs that have allocated
182106
* IP addresses.
183107
*
184-
* @param userId
185-
* @param vlanDbId
186108
* @param caller TODO
187109
* @return success/failure
188110
*/
@@ -194,11 +116,6 @@ DataCenterVO createZone(long userId, String zoneName, String dns1, String dns2,
194116

195117
/**
196118
* Creates a new network offering
197-
* @param name
198-
* @param displayText
199-
* @param trafficType
200-
* @param tags
201-
* @param specifyVlan
202119
* @param networkRate
203120
* TODO
204121
* @param serviceProviderMap
@@ -209,17 +126,13 @@ DataCenterVO createZone(long userId, String zoneName, String dns1, String dns2,
209126
* TODO
210127
* @param systemOnly
211128
* TODO
212-
* @param serviceOfferingId
213129
* @param conserveMode
214130
* ;
215131
* @param specifyIpRanges
216132
* TODO
217133
* @param isPersistent
218134
* ;
219135
* @param details TODO
220-
* @param forVpc
221-
* @param domainIds
222-
* @param zoneIds
223136
* @return network offering object
224137
*/
225138

@@ -238,32 +151,21 @@ Vlan createVlanAndPublicIpRange(long zoneId, long networkId, long physicalNetwor
238151
/**
239152
* Release dedicated virtual ip ranges of a domain.
240153
*
241-
* @param domainId
242154
* @return success/failure
243155
*/
244156
boolean releaseDomainSpecificVirtualRanges(long domainId);
245157

246158
/**
247159
* Release dedicated virtual ip ranges of an account.
248160
*
249-
* @param accountId
250161
* @return success/failure
251162
*/
252163
boolean releaseAccountSpecificVirtualRanges(long accountId);
253164

254165
/**
255166
* Edits a pod in the database. Will not allow you to edit pods that are being used anywhere in the system.
256167
*
257-
* @param id
258-
* @param name
259-
* @param startIp
260-
* @param endIp
261-
* @param gateway
262-
* @param netmask
263-
* @param allocationState
264168
* @return Pod
265-
* @throws
266-
* @throws
267169
*/
268170
Pod editPod(long id, String name, String startIp, String endIp, String gateway, String netmask, String allocationState);
269171

0 commit comments

Comments
 (0)