ia64/xen-unstable

changeset 8236:e74d110dd2a2

Rename set-vcpus to vcpu-set (match docs) and update short help page.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Sun Dec 04 17:29:46 2005 +0100 (2005-12-04)
parents f94923f2dd14
children f3f0be058855
files tools/python/xen/xm/main.py
line diff
     1.1 --- a/tools/python/xen/xm/main.py	Sun Dec 04 12:06:38 2005 +0100
     1.2 +++ b/tools/python/xen/xm/main.py	Sun Dec 04 17:29:46 2005 +0100
     1.3 @@ -72,8 +72,7 @@ help_spacer = """
     1.4  sysrq_help =   "sysrq   <DomId> <letter>         Send a sysrq to a domain"
     1.5  domid_help =   "domid <DomName>                  Converts a domain name to a domain id"
     1.6  domname_help = "domname <DomId>                  Convert a domain id to a domain name"
     1.7 -set_vcpus_help = """set-vcpus <DomId> <VCPUs>        Enable the specified number of VCPUs in a
     1.8 -                                    domain"""
     1.9 +vcpu_set_help = """vcpu-set <DomId> <VCPUs>         Set the number of VCPUs for a domain"""
    1.10  vcpu_list_help = "vcpu-list <DomId>                List the VCPUs for a domain (or all domains)"
    1.11  vcpu_pin_help = "vcpu-pin <DomId> <VCPU> <CPUs>   Set which cpus a VCPU can use" 
    1.12  dmesg_help =   "dmesg [--clear]                  Read or clear Xen's message buffer"
    1.13 @@ -110,7 +109,6 @@ short_command_list = [
    1.14      "destroy",
    1.15      "help",
    1.16      "list",
    1.17 -    "mem-max",
    1.18      "mem-set",
    1.19      "migrate",
    1.20      "pause",
    1.21 @@ -120,6 +118,7 @@ short_command_list = [
    1.22      "shutdown",
    1.23      "top",
    1.24      "unpause",
    1.25 +    "vcpu-set",
    1.26      ]
    1.27  
    1.28  domain_commands = [
    1.29 @@ -141,8 +140,9 @@ domain_commands = [
    1.30      "sysrq",
    1.31      "top",
    1.32      "unpause",
    1.33 -    "set-vcpus",
    1.34 +    "vcpu-list",
    1.35      "vcpu-pin",
    1.36 +    "vcpu-set",
    1.37      ]
    1.38  
    1.39  host_commands = [
    1.40 @@ -575,8 +575,8 @@ def xm_mem_set(args):
    1.41      from xen.xend.XendClient import server
    1.42      server.xend_domain_mem_target_set(dom, mem_target)
    1.43      
    1.44 -def xm_set_vcpus(args):
    1.45 -    arg_check(args, "set-vcpus", 2)
    1.46 +def xm_vcpu_set(args):
    1.47 +    arg_check(args, "vcpu-set", 2)
    1.48      
    1.49      from xen.xend.XendClient import server
    1.50      server.xend_domain_set_vcpus(args[0], int(args[1]))
    1.51 @@ -799,8 +799,8 @@ commands = {
    1.52      "mem-set": xm_mem_set,
    1.53      # cpu commands
    1.54      "vcpu-pin": xm_vcpu_pin,
    1.55 -    "set-vcpus": xm_set_vcpus,
    1.56      "vcpu-list": xm_vcpu_list,
    1.57 +    "vcpu-set": xm_vcpu_set,
    1.58      # special
    1.59      "pause": xm_pause,
    1.60      "unpause": xm_unpause,
    1.61 @@ -840,6 +840,7 @@ for c in subcommands:
    1.62  
    1.63  aliases = {
    1.64      "balloon": "mem-set",
    1.65 +    "set-vcpus": "vcpu-set",
    1.66      "vif-list": "network-list",
    1.67      "vbd-create": "block-create",
    1.68      "vbd-destroy": "block-destroy",
    1.69 @@ -862,8 +863,8 @@ def xm_lookup_cmd(cmd):
    1.70          usage()
    1.71  
    1.72  def deprecated(old,new):
    1.73 -    err('Option %s is deprecated, and will be removed in future!!!' % old)
    1.74 -    err('Option %s is the new replacement, see "xm help %s" for more info' % (new, new))
    1.75 +    print >>sys.stderr, (
    1.76 +        "Command %s is deprecated.  Please use xm %s instead." % (old, new))
    1.77  
    1.78  def usage(cmd=None):
    1.79      if cmd == 'create':