WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH][VTPM] Show vtpm with xm

To: Stefan Berger <stefanb@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH][VTPM] Show vtpm with xm
From: Anthony Liguori <aliguori@xxxxxxxxxx>
Date: Mon, 30 Jan 2006 21:01:47 -0600
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 31 Jan 2006 03:11:36 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1138676294.8810.1.camel@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1138676294.8810.1.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
I know all of the other devices spit out S-Expression outputs but perhaps we can spit something a little more friendly out.

Regards,

Anthony Liguori

Stefan Berger wrote:

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

Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>


------------------------------------------------------------------------

Index: root/xen-unstable.hg/tools/python/xen/xm/main.py
===================================================================
--- root.orig/xen-unstable.hg/tools/python/xen/xm/main.py
+++ root/xen-unstable.hg/tools/python/xen/xm/main.py
@@ -101,7 +101,7 @@ network_list_help = "network-list <DomId
vnet_list_help = "vnet-list [-l|--long]            list vnets"
vnet_create_help = "vnet-create <config>             create a vnet from a config 
file"
vnet_delete_help = "vnet-delete <vnetid>             delete a vnet"
-
+vtpm_list_help = "vtpm-list <DomId>                list virtual TPM devices"

short_command_list = [
    "console",
@@ -165,6 +165,7 @@ device_commands = [
    "network-attach",
    "network-detach",
    "network-list",
+    "vtpm-list",
    ]

vnet_commands = [
@@ -699,6 +700,14 @@ def xm_block_list(args):
        sxp.show(x)
        print

+def xm_vtpm_list(args):
+    arg_check(args, "vtpm-list", 1)
+    dom = args[0]
+    from xen.xend.XendClient import server
+    for x in server.xend_domain_devices(dom, 'vtpm'):
+        sxp.show(x)
+        print
+
def xm_block_attach(args):
    arg_check(args, 'block-attach', 4, 5)

@@ -834,6 +843,8 @@ commands = {
    "vnet-list": xm_vnet_list,
    "vnet-create": xm_vnet_create,
    "vnet-delete": xm_vnet_delete,
+    # vtpm
+    "vtpm-list": xm_vtpm_list,
    }

## The commands supported by a separate argument parser in xend.xm.
------------------------------------------------------------------------

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>