|  |  | 
  
    |  |  | 
 
  |   |  | 
  
    |  |  | 
  
    |  |  | 
  
    |   xen-api
[Xen-API] [PATCH] Make an error message more specific 
| # 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 +-
 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 <=
 |  |  | 
  
    |  |  |