ia64/xen-unstable

changeset 19794:94bf7d4854eb

xend: Improve error messages of xm sched-credit

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

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jun 18 10:27:21 2009 +0100 (2009-06-18)
parents 8018f09ef039
children 4f779d41b0ba
files tools/python/xen/xend/XendDomain.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomain.py	Thu Jun 18 10:26:28 2009 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomain.py	Thu Jun 18 10:27:21 2009 +0100
     1.3 @@ -1583,14 +1583,17 @@ class XendDomain:
     1.4              if weight is None:
     1.5                  weight = int(0)
     1.6              elif weight < 1 or weight > 65535:
     1.7 -                raise XendError("weight is out of range")
     1.8 +                raise XendError("Cpu weight out of range, valid values are "
     1.9 +                                "within range from 1 to 65535")
    1.10              else:
    1.11                  set_weight = True
    1.12  
    1.13              if cap is None:
    1.14                  cap = int(~0)
    1.15              elif cap < 0 or cap > dominfo.getVCpuCount() * 100:
    1.16 -                raise XendError("cap is out of range")
    1.17 +                raise XendError("Cpu cap out of range, valid range is "
    1.18 +                                "from 0 to %s for specified number of vcpus" %
    1.19 +                                (dominfo.getVCpuCount() * 100))
    1.20              else:
    1.21                  set_cap = True
    1.22