From cf3742622ea040f16005f5a01981cecfb7bb5181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Gonz=C3=A1lez?= Date: Mon, 8 Jun 2020 10:18:56 +0200 Subject: [PATCH] M #: Update monitoring new parameter for APIs (#4896) --- src/oca/go/src/goca/host.go | 3 ++- src/oca/go/src/goca/vm.go | 3 ++- src/oca/java/src/org/opennebula/client/host/HostPool.java | 4 ++-- .../java/src/org/opennebula/client/vm/VirtualMachinePool.java | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/oca/go/src/goca/host.go b/src/oca/go/src/goca/host.go index 2bf429d9d2..d7b436f5f9 100644 --- a/src/oca/go/src/goca/host.go +++ b/src/oca/go/src/goca/host.go @@ -111,7 +111,8 @@ func (hc *HostsController) Create(name, im, vm string, clusterID int) (int, erro } // Monitoring Returns the Hosts monitoring records -// * num: The number of records to be retrieved. If it is -1, all the records will be retrieved. +// num: Retrieve monitor records in the last num seconds. +// 0 just the last record, -1 all records func (hc *HostsController) Monitoring(num int) (string, error) { monitorData, err := hc.c.Client.Call("one.hostpool.monitoring", num) if err != nil { diff --git a/src/oca/go/src/goca/vm.go b/src/oca/go/src/goca/vm.go index f4fc590ccd..46aa3233c2 100644 --- a/src/oca/go/src/goca/vm.go +++ b/src/oca/go/src/goca/vm.go @@ -180,7 +180,8 @@ func (vc *VMController) Info(decrypt bool) (*vm.VM, error) { // -2: All resources // -1: Resources belonging to the user and any of his groups // >= 0: UID User's Resources -// num: the number of records to be retrieved. If -1 every record is retrieved +// num: Retrieve monitor records in the last num seconds. +// 0 just the last record, -1 all records func (vc *VMsController) Monitoring(filter, num int) (string, error) { monitorData, err := vc.c.Client.Call("one.vmpool.monitoring", filter, num) if err != nil { diff --git a/src/oca/java/src/org/opennebula/client/host/HostPool.java b/src/oca/java/src/org/opennebula/client/host/HostPool.java index 9de7640ff3..4b6c85d12c 100644 --- a/src/oca/java/src/org/opennebula/client/host/HostPool.java +++ b/src/oca/java/src/org/opennebula/client/host/HostPool.java @@ -78,8 +78,8 @@ public class HostPool extends Pool implements Iterable{ * 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. + * @param num: Retrieve monitor records in the last num seconds. + * 0 just the last record, -1 all records. * @return If successful the message contains the string * with the information returned by OpenNebula. */ diff --git a/src/oca/java/src/org/opennebula/client/vm/VirtualMachinePool.java b/src/oca/java/src/org/opennebula/client/vm/VirtualMachinePool.java index d17c971beb..f0b24bbab7 100644 --- a/src/oca/java/src/org/opennebula/client/vm/VirtualMachinePool.java +++ b/src/oca/java/src/org/opennebula/client/vm/VirtualMachinePool.java @@ -265,8 +265,8 @@ public class VirtualMachinePool extends Pool implements Iterable *
  • {@link Pool#GROUP}: User's primary group Virtual Machines
  • *
  • >= 0 UID User's Virtual Machines
  • * - * @param num number of monitoring records to be retrieved, if -1 - * every record will be retrieved. + * @param num: Retrieve monitor records in the last num seconds. + * 0 just the last record, -1 all records. * @return If successful the message contains the string * with the information returned by OpenNebula. */