Skip to contentSkip to conversation

xend: Improve error messages of xm sched-credit

PATCH New Masaki Kanno 1 participant 1 message Jun 18, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xend: Improve error messages of xm sched-credit

Hi,

This patch improves error messages of xm sched-credit as with error messages of CS:19468.

Best regards,
Kan

tools/python/xen/xend/XendDomain.py +5 -2
diff -r 55ca7ef865b4 tools/python/xen/xend/XendDomain.py
@@ -1583,14 +1583,17 @@
             if weight is None:
                 weight = int(0)
             elif weight < 1 or weight > 65535:
-                raise XendError("weight is out of range")
+                raise XendError("Cpu weight out of range, valid values are "
+                                "within range from 1 to 65535")
             else:
                 set_weight = True
 
             if cap is None:
                 cap = int(~0)
             elif cap < 0 or cap > dominfo.getVCpuCount() * 100:
-                raise XendError("cap is out of range")
+                raise XendError("Cpu cap out of range, valid range is "
+                                "from 0 to %s for specified number of vcpus" %
+                                (dominfo.getVCpuCount() * 100))
             else:
                 set_cap = True
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel