From 8950f5c6ba8e2349de4162af6f09f36c80670cf7 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 3 Oct 2007 14:04:51 +0100 Subject: Extend 'xm dumppolicy' to support Xen-API I am extending 'xm dumppolicy' to be used via the Xen-API. For this there are two new functions in the ACM policy class: - get the currently enforced policy including statistical data from the hypervisor - get the ACM 'ssidref' of a Domain. Since this may be a ACM-specific variable or type (int) I put it into the ACM class. I extended the Xen-API documentation with the two new functions. Signed-off-by: Stefan Berger --- tools/libxen/src/xen_acmpolicy.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'tools/libxen/src') diff --git a/tools/libxen/src/xen_acmpolicy.c b/tools/libxen/src/xen_acmpolicy.c index 1a6190bfee..f8d69195a4 100644 --- a/tools/libxen/src/xen_acmpolicy.c +++ b/tools/libxen/src/xen_acmpolicy.c @@ -216,6 +216,41 @@ xen_acmpolicy_get_binary(xen_session *session, char **result, } +bool +xen_acmpolicy_get_enforced_binary(xen_session *session, char **result, + xen_xspolicy xspolicy) +{ + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = xspolicy }, + }; + + abstract_type result_type = abstract_type_string; + + *result = NULL; + XEN_CALL_("ACMPolicy.get_enforced_binary"); + return session->ok; +} + + +bool +xen_acmpolicy_get_VM_ssidref(xen_session *session, + int64_t *result, xen_vm vm) +{ + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = vm } + }; + + abstract_type result_type = abstract_type_int; + + XEN_CALL_("ACMPolicy.get_VM_ssidref"); + return session->ok; +} + + bool xen_acmpolicy_get_uuid(xen_session *session, char **result, xen_xspolicy xspolicy) -- cgit v1.2.3