mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Feature #2562: java oca methods for group add/del provider
This commit is contained in:
parent
386d9cfff3
commit
22fa9960a4
@ -32,6 +32,8 @@ public class Group extends PoolElement{
|
||||
private static final String INFO = METHOD_PREFIX + "info";
|
||||
private static final String DELETE = METHOD_PREFIX + "delete";
|
||||
private static final String QUOTA = METHOD_PREFIX + "quota";
|
||||
private static final String ADD_PROVIDER = METHOD_PREFIX + "addprovider";
|
||||
private static final String DEL_PROVIDER = METHOD_PREFIX + "delprovider";
|
||||
|
||||
/**
|
||||
* Creates a new Group representation.
|
||||
@ -108,6 +110,36 @@ public class Group extends PoolElement{
|
||||
return client.call(QUOTA, id, quota_template);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a resource provider to this group
|
||||
*
|
||||
* @param client XML-RPC Client.
|
||||
* @param id The group id.
|
||||
* @param zoneId The zone id.
|
||||
* @param clusterId The cluster id.
|
||||
* @return A encapsulated response.
|
||||
*/
|
||||
public static OneResponse addProvider(Client client, int id,
|
||||
int zoneId, int clusterId)
|
||||
{
|
||||
return client.call(ADD_PROVIDER, id, zoneId, clusterId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a resource provider from this group
|
||||
*
|
||||
* @param client XML-RPC Client.
|
||||
* @param id The group id.
|
||||
* @param zoneId The zone id.
|
||||
* @param clusterId The cluster id.
|
||||
* @return A encapsulated response.
|
||||
*/
|
||||
public static OneResponse delProvider(Client client, int id,
|
||||
int zoneId, int clusterId)
|
||||
{
|
||||
return client.call(DEL_PROVIDER, id, zoneId, clusterId);
|
||||
}
|
||||
|
||||
// =================================
|
||||
// Instanced object XML-RPC methods
|
||||
// =================================
|
||||
@ -146,6 +178,30 @@ public class Group extends PoolElement{
|
||||
return setQuota(client, id, quota_template);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a resource provider to this group
|
||||
*
|
||||
* @param zoneId The zone id.
|
||||
* @param clusterId The cluster id.
|
||||
* @return A encapsulated response.
|
||||
*/
|
||||
public OneResponse addProvider(int zoneId, int clusterId)
|
||||
{
|
||||
return addProvider(client, id, zoneId, clusterId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a resource provider from this group
|
||||
*
|
||||
* @param zoneId The zone id.
|
||||
* @param clusterId The cluster id.
|
||||
* @return A encapsulated response.
|
||||
*/
|
||||
public OneResponse delProvider(int zoneId, int clusterId)
|
||||
{
|
||||
return delProvider(client, id, zoneId, clusterId);
|
||||
}
|
||||
|
||||
// =================================
|
||||
// Helpers
|
||||
// =================================
|
||||
|
Loading…
x
Reference in New Issue
Block a user