# HG changeset patch
# User David Scott <[email protected]>
# 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 <[email protected]>

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 ++++


# HG changeset patch
# User David Scott <[email protected]>
# 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 <[email protected]>

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 *)
 
_______________________________________________
xen-api mailing list
[email protected]
http://lists.xensource.com/mailman/listinfo/xen-api

Reply via email to