2929import org .apache .cloudstack .api .command .user .vm .RemoveNicFromVMCmd ;
3030import org .apache .cloudstack .api .command .user .vm .ResetVMPasswordCmd ;
3131import org .apache .cloudstack .api .command .user .vm .ResetVMSSHKeyCmd ;
32+ import org .apache .cloudstack .api .command .user .vm .ResetVMUserDataCmd ;
3233import org .apache .cloudstack .api .command .user .vm .RestoreVMCmd ;
3334import org .apache .cloudstack .api .command .user .vm .ScaleVMCmd ;
3435import org .apache .cloudstack .api .command .user .vm .StartVMCmd ;
@@ -103,6 +104,8 @@ public interface UserVmService {
103104 */
104105 UserVm resetVMSSHKey (ResetVMSSHKeyCmd cmd ) throws ResourceUnavailableException , InsufficientCapacityException ;
105106
107+ UserVm resetVMUserData (ResetVMUserDataCmd cmd ) throws ResourceUnavailableException , InsufficientCapacityException ;
108+
106109 UserVm startVirtualMachine (StartVMCmd cmd ) throws StorageUnavailableException , ExecutionException , ConcurrentOperationException , ResourceUnavailableException ,
107110 InsufficientCapacityException , ResourceAllocationException ;
108111
@@ -146,6 +149,12 @@ UserVm startVirtualMachine(StartVMCmd cmd) throws StorageUnavailableException, E
146149 *
147150 *
148151 *
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
149158 * @param zone
150159 * - availability zone for the virtual machine
151160 * @param serviceOffering
@@ -181,29 +190,25 @@ UserVm startVirtualMachine(StartVMCmd cmd) throws StorageUnavailableException, E
181190 * base64 encoded before adding it to the request. Currently only
182191 * HTTP GET is supported. Using HTTP GET (via querystring), you
183192 * 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
187195 * @param requestedIps
188196 * TODO
189197 * @param defaultIp
190198 * TODO
191199 * @param displayVm
192200 * - Boolean flag whether to the display the vm to the end user or not
193201 * @param affinityGroupIdList
194- * @param cpuSpeed
195- * @param memory
196- * @param cpuNumber
197202 * @param customId
198203 * @param dhcpOptionMap
199204 * - Maps the dhcp option code and the dhcp value to the network uuid
200- * @return UserVm object if successful.
201205 * @param dataDiskTemplateToDiskOfferingMap
202206 * - Datadisk template to Disk offering Map
203207 * an optional parameter that creates additional data disks for the virtual machine
204208 * For each of the templates in the map, a data disk will be created from the corresponding
205209 * disk offering obtained from the map
206210 *
211+ * @return UserVm object if successful.
207212 * @throws InsufficientCapacityException
208213 * if there is insufficient capacity to deploy the VM.
209214 * @throws ConcurrentOperationException
@@ -214,11 +219,11 @@ UserVm startVirtualMachine(StartVMCmd cmd) throws StorageUnavailableException, E
214219 * available.
215220 */
216221 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 ,
222227 ConcurrentOperationException , ResourceUnavailableException , StorageUnavailableException , ResourceAllocationException ;
223228
224229 /**
@@ -227,6 +232,7 @@ UserVm createBasicSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering s
227232 *
228233 *
229234 *
235+ * @param type
230236 * @param zone
231237 * - availability zone for the virtual machine
232238 * @param serviceOffering
@@ -264,6 +270,8 @@ UserVm createBasicSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering s
264270 * base64 encoded before adding it to the request. Currently only
265271 * HTTP GET is supported. Using HTTP GET (via querystring), you
266272 * can send up to 2KB of data after base64 encoding
273+ * @param userDataId
274+ * @param userDataDetails
267275 * @param requestedIps
268276 * TODO
269277 * @param defaultIps
@@ -279,7 +287,6 @@ UserVm createBasicSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering s
279287 * an optional parameter that creates additional data disks for the virtual machine
280288 * For each of the templates in the map, a data disk will be created from the corresponding
281289 * disk offering obtained from the map
282- * @param type
283290 * @return UserVm object if successful.
284291 *
285292 * @throws InsufficientCapacityException
@@ -292,17 +299,23 @@ UserVm createBasicSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering s
292299 * available.
293300 */
294301 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 ;
299306
300307 /**
301308 * Creates a User VM in Advanced Zone (Security Group feature is disabled)
302309 * in the database and returns the VM to the caller.
303310 *
304311 *
305312 *
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
306319 * @param zone
307320 * - availability zone for the virtual machine
308321 * @param serviceOffering
@@ -337,19 +350,15 @@ UserVm createAdvancedSecurityGroupVirtualMachine(DataCenter zone, ServiceOfferin
337350 * base64 encoded before adding it to the request. Currently only
338351 * HTTP GET is supported. Using HTTP GET (via querystring), you
339352 * 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
343355 * @param requestedIps
344356 * TODO
345357 * @param defaultIps
346358 * TODO
347359 * @param displayVm
348360 * - Boolean flag whether to the display the vm to the end user or not
349361 * @param affinityGroupIdList
350- * @param cpuSpeed
351- * @param memory
352- * @param cpuNumber
353362 * @param customId
354363 * @param dhcpOptionMap
355364 * - Map that maps the DhcpOption code and their value on the Network uuid
@@ -370,10 +379,10 @@ UserVm createAdvancedSecurityGroupVirtualMachine(DataCenter zone, ServiceOfferin
370379 * available.
371380 */
372381 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 )
377386
378387 throws InsufficientCapacityException , ConcurrentOperationException , ResourceUnavailableException , StorageUnavailableException , ResourceAllocationException ;
379388
0 commit comments