From 1997c1aff6e32fd54153636f57acfc8f95d95112 Mon Sep 17 00:00:00 2001
From: "Daniel P. Berrange" <berrange@redhat.com>
Date: Thu, 25 Sep 2014 15:50:56 +0100
Subject: [PATCH] Add more VIR_DOMAIN_STATS_* constants
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 268808b3ab5dc032f51ada4a099cc21edc8daef3)
---
Virt.xs | 5 +++++
lib/Sys/Virt/Domain.pm | 20 ++++++++++++++++++++
2 files changed, 25 insertions(+)
diff --git a/Virt.xs b/Virt.xs
index 894f9c3..2f973a6 100644
--- a/Virt.xs
+++ b/Virt.xs
@@ -7188,7 +7188,12 @@ BOOT:
REGISTER_CONSTANT(VIR_KEYCODE_SET_WIN32, KEYCODE_SET_WIN32);
REGISTER_CONSTANT(VIR_KEYCODE_SET_RFB, KEYCODE_SET_RFB);
+ REGISTER_CONSTANT(VIR_DOMAIN_STATS_BALLOON, STATS_BALLOON);
+ REGISTER_CONSTANT(VIR_DOMAIN_STATS_BLOCK, STATS_BLOCK);
+ REGISTER_CONSTANT(VIR_DOMAIN_STATS_CPU_TOTAL, STATS_CPU_TOTAL);
+ REGISTER_CONSTANT(VIR_DOMAIN_STATS_INTERFACE, STATS_INTERFACE);
REGISTER_CONSTANT(VIR_DOMAIN_STATS_STATE, STATS_STATE);
+ REGISTER_CONSTANT(VIR_DOMAIN_STATS_VCPU, STATS_VCPU);
REGISTER_CONSTANT(VIR_CONNECT_GET_ALL_DOMAINS_STATS_ACTIVE, GET_ALL_STATS_ACTIVE);
REGISTER_CONSTANT(VIR_CONNECT_GET_ALL_DOMAINS_STATS_INACTIVE, GET_ALL_STATS_INACTIVE);
diff --git a/lib/Sys/Virt/Domain.pm b/lib/Sys/Virt/Domain.pm
index 17101e6..21f8c15 100644
--- a/lib/Sys/Virt/Domain.pm
+++ b/lib/Sys/Virt/Domain.pm
@@ -3267,10 +3267,30 @@ are returned for stats queries.
=over
+=item Sys::Virt::Domain::STATS_BALLOON
+
+Balloon statistics
+
+=item Sys::Virt::Domain::STATS_BLOCK
+
+Block device info
+
+=item Sys::Virt::Domain::STATS_CPU_TOTAL
+
+CPU usage info
+
+=item Sys::Virt::Domain::STATS_INTERFACE
+
+Network interface info
+
=item Sys::Virt::Domain::STATS_STATE
General lifecycle state
+=item Sys::Virt::Domain::STATS_VCPU
+
+Virtual CPU info
+
=back
=head2 PROCESS SIGNALS