ia64/xen-unstable

changeset 8822:e2755215a1e5

The attached patch adds 'xm vtpm-list <DomId>' functionality.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
author emellor@leeni.uk.xensource.com
date Fri Feb 10 02:04:24 2006 +0100 (2006-02-10)
parents d1596fc2cbaa
children 324caad9e145
files tools/python/xen/xm/main.py
line diff
     1.1 --- a/tools/python/xen/xm/main.py	Fri Feb 10 02:03:24 2006 +0100
     1.2 +++ b/tools/python/xen/xm/main.py	Fri Feb 10 02:04:24 2006 +0100
     1.3 @@ -101,7 +101,7 @@ network_list_help = "network-list <DomId
     1.4  vnet_list_help = "vnet-list [-l|--long]            list vnets"
     1.5  vnet_create_help = "vnet-create <config>             create a vnet from a config file"
     1.6  vnet_delete_help = "vnet-delete <vnetid>             delete a vnet"
     1.7 -
     1.8 +vtpm_list_help = "vtpm-list <DomId>                list virtual TPM devices"
     1.9  
    1.10  short_command_list = [
    1.11      "console",
    1.12 @@ -165,6 +165,7 @@ device_commands = [
    1.13      "network-attach",
    1.14      "network-detach",
    1.15      "network-list",
    1.16 +    "vtpm-list",
    1.17      ]
    1.18  
    1.19  vnet_commands = [
    1.20 @@ -699,6 +700,14 @@ def xm_block_list(args):
    1.21          sxp.show(x)
    1.22          print
    1.23  
    1.24 +def xm_vtpm_list(args):
    1.25 +    arg_check(args, "vtpm-list", 1)
    1.26 +    dom = args[0]
    1.27 +    from xen.xend.XendClient import server
    1.28 +    for x in server.xend_domain_devices(dom, 'vtpm'):
    1.29 +        sxp.show(x)
    1.30 +        print
    1.31 +
    1.32  def xm_block_attach(args):
    1.33      arg_check(args, 'block-attach', 4, 5)
    1.34  
    1.35 @@ -834,6 +843,8 @@ commands = {
    1.36      "vnet-list": xm_vnet_list,
    1.37      "vnet-create": xm_vnet_create,
    1.38      "vnet-delete": xm_vnet_delete,
    1.39 +    # vtpm
    1.40 +    "vtpm-list": xm_vtpm_list,
    1.41      }
    1.42  
    1.43  ## The commands supported by a separate argument parser in xend.xm.