ia64/xen-unstable

changeset 16056:a5b239d68cc2

xm: Add accel option to xm network-attach.
Signed-off-by: Kieran Mansley <kmansley@solarflare.com>
author Keir Fraser <keir@xensource.com>
date Wed Oct 03 14:56:31 2007 +0100 (2007-10-03)
parents 33107700062c
children 74a3ee6e1795
files tools/python/xen/xm/main.py
line diff
     1.1 --- a/tools/python/xen/xm/main.py	Wed Oct 03 14:41:28 2007 +0100
     1.2 +++ b/tools/python/xen/xm/main.py	Wed Oct 03 14:56:31 2007 +0100
     1.3 @@ -163,7 +163,8 @@ SUBCOMMAND_HELP = {
     1.4                          'List virtual block devices for a domain.'),
     1.5      'network-attach':  ('<Domain> [type=<type>] [mac=<mac>] [bridge=<bridge>] '
     1.6                          '[ip=<ip>] [script=<script>] [backend=<BackDomain>] '
     1.7 -                        '[vifname=<name>] [rate=<rate>] [model=<model>]',
     1.8 +                        '[vifname=<name>] [rate=<rate>] [model=<model>]'
     1.9 +                        '[accel=<accel>]',
    1.10                          'Create a new virtual network device.'),
    1.11      'network-detach':  ('<Domain> <DevId> [-f|--force]',
    1.12                          'Destroy a domain\'s virtual network device.'),
    1.13 @@ -2132,12 +2133,12 @@ def xm_block_configure(args):
    1.14  
    1.15  
    1.16  def xm_network_attach(args):
    1.17 -    arg_check(args, 'network-attach', 1, 10)
    1.18 +    arg_check(args, 'network-attach', 1, 11)
    1.19  
    1.20      dom = args[0]
    1.21      vif = ['vif']
    1.22      vif_params = ['type', 'mac', 'bridge', 'ip', 'script', \
    1.23 -                  'backend', 'vifname', 'rate', 'model']
    1.24 +                  'backend', 'vifname', 'rate', 'model', 'accel']
    1.25  
    1.26      if serverType == SERVER_XEN_API:     
    1.27          vif_record = {
    1.28 @@ -2184,7 +2185,9 @@ def xm_network_attach(args):
    1.29              'rate':
    1.30                  lambda x: set(['qos_algorithm_params', 'rate'], x),
    1.31              'model':
    1.32 -                lambda x: None
    1.33 +                lambda x: None,
    1.34 +            'accel':
    1.35 +                lambda x: set(['other_config', 'accel'], x)
    1.36              }
    1.37              
    1.38          for a in args[1:]: