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-changelog

[Xen-changelog] [xen-unstable] xend: add a description config item for e

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: add a description config item for each guest.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Oct 2009 01:10:11 -0700
Delivery-date: Fri, 16 Oct 2009 01:10:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1255677887 -3600
# Node ID 7a69f773548e7fc88f13bf59db4ac73208ec32c5
# Parent  2eba302831c4534ac40283491f887263c7197b4a
xend: add a description config item for each guest.

Add a new option "description=" to each VM to increase the
manageability of VM, which could be accessed via "xm list -l
MACHINE".e.g add "description='(name, james),(priority 5), (owner
james.song@xxxxxxxxxxx)'" to configure file, User can get the VM's
attribute easily by "xm list -l Machine" or some tools.

Signed-off-by: James Song<jsong@xxxxxxxxxx>
---
 tools/python/xen/xend/XendConfig.py  |    3 +++
 tools/python/xen/xm/create.py        |    6 +++++-
 tools/python/xen/xm/xenapi_create.py |    1 +
 3 files changed, 9 insertions(+), 1 deletion(-)

diff -r 2eba302831c4 -r 7a69f773548e tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Thu Oct 15 16:49:21 2009 +0100
+++ b/tools/python/xen/xend/XendConfig.py       Fri Oct 16 08:24:47 2009 +0100
@@ -177,6 +177,7 @@ XENAPI_PLATFORM_CFG_TYPES = {
     'pci_power_mgmt': int,
     'xen_platform_pci': int,
     "gfx_passthru": int,
+    'description': str,
 }
 
 # Xen API console 'other_config' keys.
@@ -490,6 +491,8 @@ class XendConfig(dict):
                 self['platform']['xen_platform_pci'] = 1
             if 'vpt_align' not in self['platform']:
                 self['platform']['vpt_align'] = 1
+            if 'description' not in self['platform']:
+                self['platform']['description'] = ''
             if 'loader' not in self['platform']:
                 # Old configs may have hvmloader set as PV_kernel param
                 if self.has_key('PV_kernel') and self['PV_kernel'] != '':
diff -r 2eba302831c4 -r 7a69f773548e tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Thu Oct 15 16:49:21 2009 +0100
+++ b/tools/python/xen/xm/create.py     Fri Oct 16 08:24:47 2009 +0100
@@ -506,6 +506,10 @@ gopts.var('usbdevice', val='NAME',
 gopts.var('usbdevice', val='NAME',
           fn=set_value, default='',
           use="Name of USB device to add?")
+
+gopts.var('description', val='NAME',
+          fn=set_value, default='',
+          use="Description of a domain")
 
 gopts.var('guest_os_type', val='NAME',
           fn=set_value, default='default',
@@ -989,7 +993,7 @@ def configure_hvm(config_image, vals):
              'guest_os_type', 'hap', 'opengl', 'cpuid', 'cpuid_check',
              'viridian', 'xen_extended_power_mgmt', 'pci_msitranslate',
              'vpt_align', 'pci_power_mgmt', 'xen_platform_pci',
-             'gfx_passthru' ]
+             'gfx_passthru', 'description' ]
 
     for a in args:
         if a in vals.__dict__ and vals.__dict__[a] is not None:
diff -r 2eba302831c4 -r 7a69f773548e tools/python/xen/xm/xenapi_create.py
--- a/tools/python/xen/xm/xenapi_create.py      Thu Oct 15 16:49:21 2009 +0100
+++ b/tools/python/xen/xm/xenapi_create.py      Fri Oct 16 08:24:47 2009 +0100
@@ -1077,6 +1077,7 @@ class sxp2xml:
             'pci_power_mgmt',
             'xen_platform_pci',
             'tsc_native'
+            'description',
         ]
 
         platform_configs = []

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xend: add a description config item for each guest., Xen patchbot-unstable <=