29
29
import org .apache .cloudstack .api .command .user .vm .RemoveNicFromVMCmd ;
30
30
import org .apache .cloudstack .api .command .user .vm .ResetVMPasswordCmd ;
31
31
import org .apache .cloudstack .api .command .user .vm .ResetVMSSHKeyCmd ;
32
+ import org .apache .cloudstack .api .command .user .vm .ResetVMUserDataCmd ;
32
33
import org .apache .cloudstack .api .command .user .vm .RestoreVMCmd ;
33
34
import org .apache .cloudstack .api .command .user .vm .ScaleVMCmd ;
34
35
import org .apache .cloudstack .api .command .user .vm .StartVMCmd ;
@@ -103,6 +104,8 @@ public interface UserVmService {
103
104
*/
104
105
UserVm resetVMSSHKey (ResetVMSSHKeyCmd cmd ) throws ResourceUnavailableException , InsufficientCapacityException ;
105
106
107
+ UserVm resetVMUserData (ResetVMUserDataCmd cmd ) throws ResourceUnavailableException , InsufficientCapacityException ;
108
+
106
109
UserVm startVirtualMachine (StartVMCmd cmd ) throws StorageUnavailableException , ExecutionException , ConcurrentOperationException , ResourceUnavailableException ,
107
110
InsufficientCapacityException , ResourceAllocationException ;
108
111
@@ -146,6 +149,12 @@ UserVm startVirtualMachine(StartVMCmd cmd) throws StorageUnavailableException, E
146
149
*
147
150
*
148
151
*
152
+ * @param sshKeyPair
153
+ * - name of the ssh key pair used to login to the virtual
154
+ * machine
155
+ * @param cpuSpeed
156
+ * @param memory
157
+ * @param cpuNumber
149
158
* @param zone
150
159
* - availability zone for the virtual machine
151
160
* @param serviceOffering
@@ -181,29 +190,25 @@ UserVm startVirtualMachine(StartVMCmd cmd) throws StorageUnavailableException, E
181
190
* base64 encoded before adding it to the request. Currently only
182
191
* HTTP GET is supported. Using HTTP GET (via querystring), you
183
192
* can send up to 2KB of data after base64 encoding
184
- * @param sshKeyPair
185
- * - name of the ssh key pair used to login to the virtual
186
- * machine
193
+ * @param userDataId
194
+ * @param userDataDetails
187
195
* @param requestedIps
188
196
* TODO
189
197
* @param defaultIp
190
198
* TODO
191
199
* @param displayVm
192
200
* - Boolean flag whether to the display the vm to the end user or not
193
201
* @param affinityGroupIdList
194
- * @param cpuSpeed
195
- * @param memory
196
- * @param cpuNumber
197
202
* @param customId
198
203
* @param dhcpOptionMap
199
204
* - Maps the dhcp option code and the dhcp value to the network uuid
200
- * @return UserVm object if successful.
201
205
* @param dataDiskTemplateToDiskOfferingMap
202
206
* - Datadisk template to Disk offering Map
203
207
* an optional parameter that creates additional data disks for the virtual machine
204
208
* For each of the templates in the map, a data disk will be created from the corresponding
205
209
* disk offering obtained from the map
206
210
*
211
+ * @return UserVm object if successful.
207
212
* @throws InsufficientCapacityException
208
213
* if there is insufficient capacity to deploy the VM.
209
214
* @throws ConcurrentOperationException
@@ -214,11 +219,11 @@ UserVm startVirtualMachine(StartVMCmd cmd) throws StorageUnavailableException, E
214
219
* available.
215
220
*/
216
221
UserVm createBasicSecurityGroupVirtualMachine (DataCenter zone , ServiceOffering serviceOffering , VirtualMachineTemplate template , List <Long > securityGroupIdList ,
217
- Account owner , String hostName , String displayName , Long diskOfferingId , Long diskSize , String group , HypervisorType hypervisor , HTTPMethod httpmethod ,
218
- String userData , List <String > sshKeyPairs , Map <Long , IpAddresses > requestedIps , IpAddresses defaultIp , Boolean displayVm , String keyboard ,
219
- List <Long > affinityGroupIdList , Map <String , String > customParameter , String customId , Map <String , Map <Integer , String >> dhcpOptionMap ,
220
- Map <Long , DiskOffering > dataDiskTemplateToDiskOfferingMap ,
221
- Map <String , String > userVmOVFProperties , boolean dynamicScalingEnabled , Long overrideDiskOfferingId ) throws InsufficientCapacityException ,
222
+ Account owner , String hostName , String displayName , Long diskOfferingId , Long diskSize , String group , HypervisorType hypervisor , HTTPMethod httpmethod ,
223
+ String userData , Long userDataId , String userDataDetails , List <String > sshKeyPairs , Map <Long , IpAddresses > requestedIps , IpAddresses defaultIp , Boolean displayVm , String keyboard ,
224
+ List <Long > affinityGroupIdList , Map <String , String > customParameter , String customId , Map <String , Map <Integer , String >> dhcpOptionMap ,
225
+ Map <Long , DiskOffering > dataDiskTemplateToDiskOfferingMap ,
226
+ Map <String , String > userVmOVFProperties , boolean dynamicScalingEnabled , Long overrideDiskOfferingId ) throws InsufficientCapacityException ,
222
227
ConcurrentOperationException , ResourceUnavailableException , StorageUnavailableException , ResourceAllocationException ;
223
228
224
229
/**
@@ -227,6 +232,7 @@ UserVm createBasicSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering s
227
232
*
228
233
*
229
234
*
235
+ * @param type
230
236
* @param zone
231
237
* - availability zone for the virtual machine
232
238
* @param serviceOffering
@@ -264,6 +270,8 @@ UserVm createBasicSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering s
264
270
* base64 encoded before adding it to the request. Currently only
265
271
* HTTP GET is supported. Using HTTP GET (via querystring), you
266
272
* can send up to 2KB of data after base64 encoding
273
+ * @param userDataId
274
+ * @param userDataDetails
267
275
* @param requestedIps
268
276
* TODO
269
277
* @param defaultIps
@@ -279,7 +287,6 @@ UserVm createBasicSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering s
279
287
* an optional parameter that creates additional data disks for the virtual machine
280
288
* For each of the templates in the map, a data disk will be created from the corresponding
281
289
* disk offering obtained from the map
282
- * @param type
283
290
* @return UserVm object if successful.
284
291
*
285
292
* @throws InsufficientCapacityException
@@ -292,17 +299,23 @@ UserVm createBasicSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering s
292
299
* available.
293
300
*/
294
301
UserVm createAdvancedSecurityGroupVirtualMachine (DataCenter zone , ServiceOffering serviceOffering , VirtualMachineTemplate template , List <Long > networkIdList ,
295
- List <Long > securityGroupIdList , Account owner , String hostName , String displayName , Long diskOfferingId , Long diskSize , String group , HypervisorType hypervisor ,
296
- HTTPMethod httpmethod , String userData , List <String > sshKeyPairs , Map <Long , IpAddresses > requestedIps , IpAddresses defaultIps , Boolean displayVm , String keyboard ,
297
- List <Long > affinityGroupIdList , Map <String , String > customParameters , String customId , Map <String , Map <Integer , String >> dhcpOptionMap ,
298
- Map <Long , DiskOffering > dataDiskTemplateToDiskOfferingMap , Map <String , String > userVmOVFProperties , boolean dynamicScalingEnabled , Long overrideDiskOfferingId , String vmType ) throws InsufficientCapacityException , ConcurrentOperationException , ResourceUnavailableException , StorageUnavailableException , ResourceAllocationException ;
302
+ List <Long > securityGroupIdList , Account owner , String hostName , String displayName , Long diskOfferingId , Long diskSize , String group , HypervisorType hypervisor ,
303
+ HTTPMethod httpmethod , String userData , Long userDataId , String userDataDetails , List <String > sshKeyPairs , Map <Long , IpAddresses > requestedIps , IpAddresses defaultIps , Boolean displayVm , String keyboard ,
304
+ List <Long > affinityGroupIdList , Map <String , String > customParameters , String customId , Map <String , Map <Integer , String >> dhcpOptionMap ,
305
+ Map <Long , DiskOffering > dataDiskTemplateToDiskOfferingMap , Map <String , String > userVmOVFProperties , boolean dynamicScalingEnabled , Long overrideDiskOfferingId , String vmType ) throws InsufficientCapacityException , ConcurrentOperationException , ResourceUnavailableException , StorageUnavailableException , ResourceAllocationException ;
299
306
300
307
/**
301
308
* Creates a User VM in Advanced Zone (Security Group feature is disabled)
302
309
* in the database and returns the VM to the caller.
303
310
*
304
311
*
305
312
*
313
+ * @param sshKeyPair
314
+ * - name of the ssh key pair used to login to the virtual
315
+ * machine
316
+ * @param cpuSpeed
317
+ * @param memory
318
+ * @param cpuNumber
306
319
* @param zone
307
320
* - availability zone for the virtual machine
308
321
* @param serviceOffering
@@ -337,19 +350,15 @@ UserVm createAdvancedSecurityGroupVirtualMachine(DataCenter zone, ServiceOfferin
337
350
* base64 encoded before adding it to the request. Currently only
338
351
* HTTP GET is supported. Using HTTP GET (via querystring), you
339
352
* can send up to 2KB of data after base64 encoding
340
- * @param sshKeyPair
341
- * - name of the ssh key pair used to login to the virtual
342
- * machine
353
+ * @param userDataId
354
+ * @param userDataDetails
343
355
* @param requestedIps
344
356
* TODO
345
357
* @param defaultIps
346
358
* TODO
347
359
* @param displayVm
348
360
* - Boolean flag whether to the display the vm to the end user or not
349
361
* @param affinityGroupIdList
350
- * @param cpuSpeed
351
- * @param memory
352
- * @param cpuNumber
353
362
* @param customId
354
363
* @param dhcpOptionMap
355
364
* - Map that maps the DhcpOption code and their value on the Network uuid
@@ -370,10 +379,10 @@ UserVm createAdvancedSecurityGroupVirtualMachine(DataCenter zone, ServiceOfferin
370
379
* available.
371
380
*/
372
381
UserVm createAdvancedVirtualMachine (DataCenter zone , ServiceOffering serviceOffering , VirtualMachineTemplate template , List <Long > networkIdList , Account owner ,
373
- String hostName , String displayName , Long diskOfferingId , Long diskSize , String group , HypervisorType hypervisor , HTTPMethod httpmethod , String userData ,
374
- List <String > sshKeyPairs , Map <Long , IpAddresses > requestedIps , IpAddresses defaultIps , Boolean displayVm , String keyboard , List <Long > affinityGroupIdList ,
375
- Map <String , String > customParameters , String customId , Map <String , Map <Integer , String >> dhcpOptionMap , Map <Long , DiskOffering > dataDiskTemplateToDiskOfferingMap ,
376
- Map <String , String > templateOvfPropertiesMap , boolean dynamicScalingEnabled , String vmType , Long overrideDiskOfferingId )
382
+ String hostName , String displayName , Long diskOfferingId , Long diskSize , String group , HypervisorType hypervisor , HTTPMethod httpmethod , String userData ,
383
+ Long userDataId , String userDataDetails , List <String > sshKeyPairs , Map <Long , IpAddresses > requestedIps , IpAddresses defaultIps , Boolean displayVm , String keyboard , List <Long > affinityGroupIdList ,
384
+ Map <String , String > customParameters , String customId , Map <String , Map <Integer , String >> dhcpOptionMap , Map <Long , DiskOffering > dataDiskTemplateToDiskOfferingMap ,
385
+ Map <String , String > templateOvfPropertiesMap , boolean dynamicScalingEnabled , String vmType , Long overrideDiskOfferingId )
377
386
378
387
throws InsufficientCapacityException , ConcurrentOperationException , ResourceUnavailableException , StorageUnavailableException , ResourceAllocationException ;
379
388
0 commit comments