WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] [PATCH] add xe message-destroy

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH] add xe message-destroy
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Sun, 28 Mar 2010 18:51:50 +0100
Delivery-date: Sun, 28 Mar 2010 10:42:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User David Scott <dave.scott@xxxxxxxxxxxxx>
# Date 1269798687 -3600
# Node ID e1ff2ddf639451cf2e58d86fefe2425288059a18
# Parent  e24b309abff793922bbe67004e50f5945a49a8bb
CA-29183: add a CLI 'message-destroy' to make it easier to clear out old 
messages (alerts).

Signed-off-by: David Scott <dave.scott@xxxxxxxxxxxxx>

diff -r e24b309abff7 -r e1ff2ddf6394 ocaml/xapi/cli_frontend.ml
--- a/ocaml/xapi/cli_frontend.ml        Sun Mar 28 14:19:01 2010 +0100
+++ b/ocaml/xapi/cli_frontend.ml        Sun Mar 28 18:51:27 2010 +0100
@@ -128,6 +128,15 @@
       implementation=No_fd Cli_operations.message_create;
       flags=[];
     };
+
+       "message-destroy",
+         {
+                 reqd=["uuid"];
+                 optn=[];
+                 help="Destroy an existing message.";
+                 implementation=No_fd Cli_operations.message_destroy;
+                 flags=[];
+         };
 
 (*    "host-introduce",
     {
diff -r e24b309abff7 -r e1ff2ddf6394 ocaml/xapi/cli_operations.ml
--- a/ocaml/xapi/cli_operations.ml      Sun Mar 28 14:19:01 2010 +0100
+++ b/ocaml/xapi/cli_operations.ml      Sun Mar 28 18:51:27 2010 +0100
@@ -736,6 +736,10 @@
   in
   ignore(Client.Message.create rpc session_id name priority cls uuid body)
 
+let message_destroy printer rpc session_id params = 
+  let uuid = List.assoc "uuid" params in
+  let message = Client.Message.get_by_uuid rpc session_id uuid in
+  Client.Message.destroy rpc session_id message
 
 (* Pool operations *)
 
2 files changed, 13 insertions(+)
ocaml/xapi/cli_frontend.ml   |    9 +++++++++
ocaml/xapi/cli_operations.ml |    4 ++++


Attachment: xen-api.hg.patch
Description: Text Data

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-API] [PATCH] add xe message-destroy, David Scott <=