Skip to contentSkip to conversation

Fix long options of xm sched-credit

PATCH New Masaki Kanno 1 participant 1 message Nov 8, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix long options of xm sched-credit

Hi,

Long options of xm sched-credit command are ignored.

# xm sched-credit --domain=vm1
Name                                ID Weight  Cap
Domain-0                             0    256    0
vm1                                  2    256    0
# xm sched-credit --domain=vm1 --weight=512 --cap=50
Name                                ID Weight  Cap
Domain-0                             0    256    0
vm1                                  2    256    0

Long options of xm sched-credit command work by this patch.

# xm sched-credit --domain=vm1
Name                                ID Weight  Cap
vm1                                  3    256    0
# xm sched-credit --domain=vm1 --weight=512 --cap=50
# xm sched-credit --domain=vm1
Name                                ID Weight  Cap
vm1                                  3    512   50

Best regards,
Kan

tools/python/xen/xm/main.py +3 -3
diff -r 3191627e5ad6 tools/python/xen/xm/main.py
@@ -1529,11 +1529,11 @@ def xm_sched_credit(args):
     cap = None
 
     for o, a in opts:
-        if o == "-d":
+        if o in ["-d", "--domain"]:
             domid = a
-        elif o == "-w":
+        elif o in ["-w", "--weight"]:
             weight = int(a)
-        elif o == "-c":
+        elif o in ["-c", "--cap"]:
             cap = int(a);
 
     doms = filter(lambda x : domid_match(domid, x),

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