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] Make an error message more specific

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH] Make an error message more specific
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Fri, 4 Dec 2009 17:07:01 +0000
Delivery-date: Fri, 04 Dec 2009 09:02:25 -0800
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 1259942644 0
# Node ID b31b98578427c80896dcf93df6e5b440f3a62811
# Parent  bb51391cb68037d3bedec54dbc6a53b83aabfef7
Use the more specific VM_MISSING_PV_DRIVERS error when disallowing an operation 
due to lack of PV drivers rather than generic OPERATION_NOT_ALLOWED with some 
random string.

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

diff -r bb51391cb680 -r b31b98578427 ocaml/xapi/xapi_vm_lifecycle.ml
--- a/ocaml/xapi/xapi_vm_lifecycle.ml   Wed Dec 02 19:08:08 2009 +0000
+++ b/ocaml/xapi/xapi_vm_lifecycle.ml   Fri Dec 04 16:04:04 2009 +0000
@@ -143,7 +143,7 @@
        let op_str = Record_util.vm_operation_to_string op in
 
        if has_booted_hvm && not has_pv_drivers
-       then Some (Api_errors.operation_not_allowed, [ op_str ^ " not possible 
for HVM domains (are PV drivers installed?)"])
+       then Some (Api_errors.vm_missing_pv_drivers, [ Ref.string_of ref ])
        else if is_a_rhel3_bug
        then Some (Api_errors.operation_not_allowed, [ op_str ^ " not possible 
for SMP RHEL 3 linux guests" ])
        else if has_good_drivers
1 file changed, 1 insertion(+), 1 deletion(-)
ocaml/xapi/xapi_vm_lifecycle.ml |    2 +-


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] Make an error message more specific, David Scott <=