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

[Xen-devel] add a description for each guest.

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] add a description for each guest.
From: "James Song" <jsong@xxxxxxxxxx>
Date: Thu, 15 Oct 2009 02:02:12 -0600
Delivery-date: Thu, 15 Oct 2009 01:02:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
This patch adds 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>
 
diff -r 6a0d0d8ba080 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Mon Oct 12 13:27:02 2009 +0800
+++ b/tools/python/xen/xend/XendConfig.py       Tue Oct 13 13:34:02 2009 +0800
@@ -172,6 +172,7 @@
     'pci_msitranslate': int,
     'pci_power_mgmt': int,
     'xen_platform_pci': int,
+    'description': str,
 }
 
 # Xen API console 'other_config' keys.
@@ -473,6 +474,8 @@
                 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 6a0d0d8ba080 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Mon Oct 12 13:27:02 2009 +0800
+++ b/tools/python/xen/xm/create.py     Tue Oct 13 13:34:02 2009 +0800
@@ -498,6 +498,10 @@
           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',
           use="Guest OS type running in HVM")
@@ -936,7 +940,7 @@
              'acpi', 'apic', 'usb', 'usbdevice', 'keymap', 'pci', 'hpet',
              'guest_os_type', 'hap', 'opengl', 'cpuid', 'cpuid_check',
              'viridian', 'xen_extended_power_mgmt', 'pci_msitranslate',
-             'vpt_align', 'pci_power_mgmt', 'xen_platform_pci' ]
+             'vpt_align', 'pci_power_mgmt', 'xen_platform_pci', 'description']
 
     for a in args:
         if a in vals.__dict__ and vals.__dict__[a] is not None:
diff -r 6a0d0d8ba080 tools/python/xen/xm/xenapi_create.py
--- a/tools/python/xen/xm/xenapi_create.py      Mon Oct 12 13:27:02 2009 +0800
+++ b/tools/python/xen/xm/xenapi_create.py      Tue Oct 13 13:34:02 2009 +0800
@@ -1050,6 +1050,7 @@
             'pci_msitranslate',
             'pci_power_mgmt',
             'xen_platform_pci',
+            'description',
         ]
 
         platform_configs = []
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>