Before any getter or setter methods can be introduced, first specify a set of
public attributes/flags that these methods will be compatible with.
---
include/libvirt/libvirt-admin.h | 61 +++++++++++++++++++++++++++++++++++++++++
src/admin/admin_protocol.x | 3 ++
2 files changed, 64 insertions(+)
diff --git a/include/libvirt/libvirt-admin.h b/include/libvirt/libvirt-admin.h
index 1f62a4d..e12c5ce 100644
--- a/include/libvirt/libvirt-admin.h
+++ b/include/libvirt/libvirt-admin.h
@@ -108,6 +108,67 @@ const char *virAdmServerGetName(virAdmServerPtr srv);
virAdmServerPtr virAdmConnectServerLookupByName(virAdmConnectPtr conn,
const char *name);
+
+/* Manage threadpool attributes */
+
+/**
+ * VIR_THREADPOOL_WORKERS_MIN:
+ * Macro for the threadpool minWorkers limit: represents the bottom limit to
+ * number of active workers in threadpool, as uint.
+ */
+
+# define VIR_THREADPOOL_WORKERS_MIN "minWorkers"
+
+/**
+ * VIR_THREADPOOL_WORKERS_MAX:
+ * Macro for the threadpool maxWorkers limit: represents the upper limit to
+ * number of active workers in threadpool, as uint. The value of this limit has
+ * to be greater than VIR_THREADPOOL_WORKERS_MIN at all times.
+ */
+
+# define VIR_THREADPOOL_WORKERS_MAX "maxWorkers"
+
+/**
+ * VIR_THREADPOOL_WORKERS_PRIORITY:
+ * Macro for the threadpool nPrioWorkers attribute: represents the current number
+ * of active priority workers in threadpool, as uint.
+ */
+
+# define VIR_THREADPOOL_WORKERS_PRIORITY "prioWorkers"
+
+/**
+ * VIR_THREADPOOL_WORKERS_FREE:
+ * Macro for the threadpool freeWorkers attribute: represents the current number
+ * of free workers available to accomplish a job, as uint.
+ *
+ * NOTE: This attribute is read-only and any attempt to set it will be denied
+ * by daemon
+ */
+
+# define VIR_THREADPOOL_WORKERS_FREE "freeWorkers"
+
+/**
+ * VIR_THREADPOOL_WORKERS_CURRENT:
+ * Macro for the threadpool nWorkers attribute: represents the current number
+ * of active ordinary workers in threadpool, as uint.
+ *
+ * NOTE: This attribute is read-only and any attempt to set it will be denied
+ * by daemon
+ */
+
+# define VIR_THREADPOOL_WORKERS_CURRENT "nWorkers"
+
+/**
+ * VIR_THREADPOOL_JOB_QUEUE_DEPTH:
+ * Macro for the threadpool jobQueueDepth attribute: represents the current
+ * number of jobs waiting in a queue to be processed, as uint.
+ *
+ * NOTE: This attribute is read-only and any attempt to set it will be denied
+ * by daemon
+ */
+
+# define VIR_THREADPOOL_JOB_QUEUE_DEPTH "jobQueueDepth"
+
# ifdef __cplusplus
}
# endif
diff --git a/src/admin/admin_protocol.x b/src/admin/admin_protocol.x
index 09b9c7d..9d56a69 100644
--- a/src/admin/admin_protocol.x
+++ b/src/admin/admin_protocol.x
@@ -36,6 +36,9 @@ const ADMIN_STRING_MAX = 4194304;
/* Upper limit on list of servers */
const ADMIN_SERVER_LIST_MAX = 16384;
+/* Upper limit on number of threadpool stats */
+const ADMIN_SERVER_THREADPOOL_STATS_MAX = 32;
+
/* A long string, which may NOT be NULL. */
typedef string admin_nonnull_string<ADMIN_STRING_MAX>;
--
2.4.3