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/
Home Products Support Community News


[Xen-API] [PATCH] CA-39115: subject-add should return a uuid

To: xen-api <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-API] [PATCH] CA-39115: subject-add should return a uuid
From: Marcus Granado <marcus.granado@xxxxxxxxxx>
Date: Tue, 30 Mar 2010 17:32:51 +0100
Delivery-date: Tue, 30 Mar 2010 09:31:12 -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 Marcus Granado <marcus.granado@xxxxxxxxxx>
# Date 1269966685 -3600
# Node ID 48dac676861039b8d9b1400799cb50da888e4201
# Parent  3748135c77eaaaf7b3dcc9ba99f64554da5daaa2
CA-39115: subject-add should return a uuid

Signed-off-by: Marcus Granado <marcus.granado@xxxxxxxxxxxxx>

diff -r 3748135c77ea -r 48dac6768610 ocaml/xapi/cli_operations.ml
--- a/ocaml/xapi/cli_operations.ml      Tue Mar 30 16:41:39 2010 +0100
+++ b/ocaml/xapi/cli_operations.ml      Tue Mar 30 17:31:25 2010 +0100
@@ -3766,7 +3766,9 @@
   (* obtains a list of name-value pairs with info about the subject from the 
external directory *)
   let subject_info = Client.Auth.get_subject_information_from_identifier ~rpc 
~session_id ~subject_identifier in
   (* now we've got enough information to create our new subject in the pool *)
-  ignore (Client.Subject.create ~rpc ~session_id ~subject_identifier 
+  let subject_ref = Client.Subject.create ~rpc ~session_id ~subject_identifier 
~other_config:subject_info in
+  let subject_uuid = Client.Subject.get_uuid rpc session_id subject_ref in
+  printer (Cli_printer.PList [subject_uuid])
 let subject_remove printer rpc session_id params =
   (* we are removing by subject-uuid *)
1 file changed, 3 insertions(+), 1 deletion(-)
ocaml/xapi/cli_operations.ml |    4 +++-

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

xen-api mailing list
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-API] [PATCH] CA-39115: subject-add should return a uuid, Marcus Granado <=