mirror of
https://github.com/OpenNebula/one.git
synced 2026-12-06 07:04:45 +09:00
1 parent
dcb1c8b837
commit
972f66aab6
3 files changed
+333
-1
No files matched your search
@@ -38,6 +38,9 @@ public class Cluster extends PoolElement{
|
||||
private static final String ADDVNET = METHOD_PREFIX + "addvnet";
|
||||
private static final String DELVNET = METHOD_PREFIX + "delvnet";
|
||||
private static final String RENAME = METHOD_PREFIX + "rename";
|
||||
private static final String OPTIMIZE = METHOD_PREFIX + "optimize";
|
||||
private static final String PLANEXECUTE = METHOD_PREFIX + "planexecute";
|
||||
private static final String PLANDELETE = METHOD_PREFIX + "plandelete";
|
||||
|
||||
/**
|
||||
* Creates a new Cluster representation.
|
||||
@@ -218,7 +221,7 @@ public class Cluster extends PoolElement{
|
||||
* Renames this Cluster.
|
||||
*
|
||||
* @param client XML-RPC Client.
|
||||
* @param id The image id of the target host we want to modify.
|
||||
* @param id The cluster id.
|
||||
* @param name New name for the Cluster
|
||||
* @return If successful the message contains the cluster id.
|
||||
*/
|
||||
@@ -227,6 +230,39 @@ public class Cluster extends PoolElement{
|
||||
return client.call(RENAME, id, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Optimize Cluster
|
||||
*
|
||||
* @param client XML-RPC Client.
|
||||
* @param id The cluster id.
|
||||
*/
|
||||
public static OneResponse optimize(Client client, int id)
|
||||
{
|
||||
return client.call(OPTIMIZE, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute Plan
|
||||
*
|
||||
* @param client XML-RPC Client.
|
||||
* @param id The cluster id.
|
||||
*/
|
||||
public static OneResponse planExecute(Client client, int id)
|
||||
{
|
||||
return client.call(PLANEXECUTE, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete Plan
|
||||
*
|
||||
* @param client XML-RPC Client.
|
||||
* @param id The cluster id.
|
||||
*/
|
||||
public static OneResponse planDelete(Client client, int id)
|
||||
{
|
||||
return client.call(PLANDELETE, id);
|
||||
}
|
||||
|
||||
// =================================
|
||||
// Instanced object XML-RPC methods
|
||||
// =================================
|
||||
@@ -354,6 +390,36 @@ public class Cluster extends PoolElement{
|
||||
return rename(client, id, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Optimize Cluster
|
||||
*
|
||||
* @return If an error occurs the error message contains the reason.
|
||||
*/
|
||||
public OneResponse optimize()
|
||||
{
|
||||
return optimize(client, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute Plan
|
||||
*
|
||||
* @return If an error occurs the error message contains the reason.
|
||||
*/
|
||||
public OneResponse planExecute()
|
||||
{
|
||||
return planExecute(client, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete Plan
|
||||
*
|
||||
* @return If an error occurs the error message contains the reason.
|
||||
*/
|
||||
public OneResponse planDelete()
|
||||
{
|
||||
return planDelete(client, id);
|
||||
}
|
||||
|
||||
// =================================
|
||||
// Helpers
|
||||
// =================================
|
||||
|
||||
Reference in new issue
Block a user