mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-15 09:13:15 +09:00
Feature #1696: add method to java oca
This commit is contained in:
1 parent
302b82aafc
commit
004af1306b
1 file changed
+16
-3
@@ -261,11 +261,12 @@ public class Image extends PoolElement
|
||||
* @param client XML-RPC Client.
|
||||
* @param id The Image id of the target Image.
|
||||
* @param name Name for the new Image.
|
||||
* @param targetDS The ID of the target datastore. Set to -1 to use the current one.
|
||||
* @return If successful the message contains the new Image ID.
|
||||
*/
|
||||
public static OneResponse clone(Client client, int id, String name)
|
||||
public static OneResponse clone(Client client, int id, String name, int targetDS)
|
||||
{
|
||||
return client.call(CLONE, id, name);
|
||||
return client.call(CLONE, id, name, targetDS);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -523,7 +524,19 @@ public class Image extends PoolElement
|
||||
*/
|
||||
public OneResponse clone(String name)
|
||||
{
|
||||
return clone(client, id, name);
|
||||
return clone(client, id, name, -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clones this Image into a new one
|
||||
*
|
||||
* @param name Name for the new Image.
|
||||
* @param targetDS The ID of the target datastore.
|
||||
* @return If successful the message contains the new Image ID.
|
||||
*/
|
||||
public OneResponse clone(String name, int targetDS)
|
||||
{
|
||||
return clone(client, id, name, targetDS);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user