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

M #: Add new monitoring parameter to JAVA api

This commit is contained in:
Christian González 2020-05-28 17:58:14 +02:00
parent 924d5d9018
commit cb0e3499d7
No known key found for this signature in database
GPG Key ID: BC941A50DF6A42EA
2 changed files with 38 additions and 0 deletions

View File

@ -74,6 +74,20 @@ public class HostPool extends Pool implements Iterable<Host>{
return client.call(MONITORING);
}
/**
* Retrieves the monitoring data for all the hosts in the pool.
*
* @param client XML-RPC Client.
* @param num number of monitoring records to be retrieved, if -1
* every record will be retrieved.
* @return If successful the message contains the string
* with the information returned by OpenNebula.
*/
public static OneResponse monitoring(Client client, int num)
{
return client.call(MONITORING, num);
}
/**
* Loads the xml representation of the host pool.
*

View File

@ -251,6 +251,30 @@ public class VirtualMachinePool extends Pool implements Iterable<VirtualMachine>
return client.call(MONITORING, filter);
}
/**
* Retrieves the monitoring data for all or part of the Virtual
* Machines in the pool.
*
* @param client XML-RPC Client.
* @param filter Filter flag to use. Possible values:
* <ul>
* <li>{@link Pool#ALL}: All Virtual Machines</li>
* <li>{@link Pool#MINE}: Connected user's Virtual Machines</li>
* <li>{@link Pool#MINE_GROUP}: Connected user's Virtual Machines, and
* the ones in his group</li>
* <li>{@link Pool#GROUP}: User's primary group Virtual Machines</li>
* <li>&gt;= 0 UID User's Virtual Machines</li>
* </ul>
* @param num number of monitoring records to be retrieved, if -1
* every record will be retrieved.
* @return If successful the message contains the string
* with the information returned by OpenNebula.
*/
public static OneResponse monitoring(Client client, int filter, int num)
{
return client.call(MONITORING, filter, num);
}
/**
* Loads the xml representation of all or part of the
* Virtual Machines in the pool. The filter used is the one set in