1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

Feature #1791: Fix Java oca

This commit is contained in:
Carlos Martín 2013-03-11 12:54:24 +01:00
parent e0f2fe17cd
commit e277273f41
2 changed files with 22 additions and 6 deletions

View File

@ -121,7 +121,7 @@ public class VirtualMachine extends PoolElement{
"clea",
"unkn",
"hotp",
"poff",
"shut",
"boot",
"boot",
"boot",
@ -469,26 +469,40 @@ public class VirtualMachine extends PoolElement{
/**
* Sets the specified vm's disk to be saved in a new image when the
* VirtualMachine shutdowns.
* VirtualMachine shuts down.
*
* @param diskId ID of the disk to be saved.
* @param imageName Name of the new Image that will be created.
* @return If an error occurs the error message contains the reason.
*/
public OneResponse savedisk(int diskId, String imageName, boolean hot = false)
public OneResponse savedisk(int diskId, String imageName)
{
return savedisk(diskId, imageName, "", false);
}
/**
* Sets the specified vm's disk to be saved in a new image.
*
* @param diskId ID of the disk to be saved.
* @param imageName Name of the new Image that will be created.
* @param hot True to save the disk immediately, false will perform
* the operation when the VM shuts down
* @return If an error occurs the error message contains the reason.
*/
public OneResponse savedisk(int diskId, String imageName, boolean hot)
{
return savedisk(diskId, imageName, "", hot);
}
/**
* Sets the specified vm's disk to be saved in a new image when the
* VirtualMachine shutdowns.
* Sets the specified vm's disk to be saved in a new image.
*
* @param diskId ID of the disk to be saved.
* @param imageName Name of the new Image that will be created.
* @param imageType Type of the new image. Set to empty string to use
* the default type
* @param hot do not defer saveas operation
* @param hot True to save the disk immediately, false will perform
* the operation when the VM shuts down
* @return If an error occurs the error message contains the reason.
*/
public OneResponse savedisk(int diskId, String imageName, String imageType,

View File

@ -351,6 +351,8 @@ module OpenNebula
# disk will be saved
# @param image_type [String] Type of the new image. Set to empty string
# to use the default type
# @param hot [true|false] True to save the disk immediately, false will
# perform the operation when the VM shuts down
#
# @return [Integer, OpenNebula::Error] the new Image ID in case of
# success, error otherwise