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] The features for a domain are more a property of the dom

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] The features for a domain are more a property of the domain than the
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 28 Apr 2006 16:14:10 +0000
Delivery-date: Fri, 28 Apr 2006 09:15:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 268e45409ecdf6a40167a799d7ea91f5bcd6cb8f
# Parent  f06b6db6823d9667d368433a22946322a95a268b
The features for a domain are more a property of the domain than the
image.  Move them into the domain info so that the image is just the
pieces needed for booting (eg, kernel + initrd + args)

Signed-off-by: Jeremy Katz <katzj@xxxxxxxxxx>

diff -r f06b6db6823d -r 268e45409ecd tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Fri Apr 28 14:09:35 2006 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py   Fri Apr 28 14:10:59 2006 +0100
@@ -132,6 +132,7 @@ ROUNDTRIPPING_CONFIG_ENTRIES = [
     ('memory',     int),
     ('maxmem',     int),
     ('bootloader', str),
+    ('features', str),
     ]
 
 ROUNDTRIPPING_CONFIG_ENTRIES += VM_CONFIG_PARAMS
@@ -549,6 +550,7 @@ class XendDomainInfo:
             defaultInfo('on_poweroff',  lambda: "destroy")
             defaultInfo('on_reboot',    lambda: "restart")
             defaultInfo('on_crash',     lambda: "restart")
+            defaultInfo('features',     lambda: "")
             defaultInfo('cpu',          lambda: None)
             defaultInfo('cpus',         lambda: [])
             defaultInfo('cpu_weight',   lambda: 1.0)
@@ -775,6 +777,9 @@ class XendDomainInfo:
         """For use only by image.py and XendCheckpoint.py"""
         return self.console_port
 
+    def getFeatures(self):
+        """For use only by image.py."""
+        return self.info['features']
 
     def getVCpuCount(self):
         return self.info['vcpus']
diff -r f06b6db6823d -r 268e45409ecd tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Fri Apr 28 14:09:35 2006 +0100
+++ b/tools/python/xen/xend/image.py    Fri Apr 28 14:10:59 2006 +0100
@@ -68,7 +68,6 @@ class ImageHandler:
         self.kernel = None
         self.ramdisk = None
         self.cmdline = None
-        self.features = None
 
         self.configure(imageConfig, deviceConfig)
 
@@ -90,7 +89,6 @@ class ImageHandler:
         if args:
             self.cmdline += " " + args
         self.ramdisk = get_cfg("ramdisk", '')
-        self.features = get_cfg("features", '')
         
         self.vm.storeVm(("image/ostype", self.ostype),
                         ("image/kernel", self.kernel),
@@ -177,7 +175,7 @@ class LinuxImageHandler(ImageHandler):
         log.debug("cmdline        = %s", self.cmdline)
         log.debug("ramdisk        = %s", self.ramdisk)
         log.debug("vcpus          = %d", self.vm.getVCpuCount())
-        log.debug("features       = %s", self.features)
+        log.debug("features       = %s", self.vm.getFeatures())
 
         return xc.linux_build(dom            = self.vm.getDomid(),
                               image          = self.kernel,
@@ -185,7 +183,7 @@ class LinuxImageHandler(ImageHandler):
                               console_evtchn = console_evtchn,
                               cmdline        = self.cmdline,
                               ramdisk        = self.ramdisk,
-                              features       = self.features)
+                              features       = self.vm.getFeatures())
 
 class HVMImageHandler(ImageHandler):
 
diff -r f06b6db6823d -r 268e45409ecd tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Fri Apr 28 14:09:35 2006 +0100
+++ b/tools/python/xen/xm/create.py     Fri Apr 28 14:10:59 2006 +0100
@@ -456,8 +456,6 @@ def configure_image(vals):
         config_image.append(['root', cmdline_root])
     if vals.extra:
         config_image.append(['args', vals.extra])
-    if vals.features:
-        config_image.append(['features', vals.features])
 
     if vals.builder == 'hvm':
         configure_hvm(config_image, vals)
@@ -638,7 +636,7 @@ def make_config(vals):
                 config.append([n, v])
 
     map(add_conf, ['name', 'memory', 'maxmem', 'restart', 'on_poweroff',
-                   'on_reboot', 'on_crash', 'vcpus'])
+                   'on_reboot', 'on_crash', 'vcpus', 'features'])
 
     if vals.uuid is not None:
         config.append(['uuid', vals.uuid])

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] The features for a domain are more a property of the domain than the, Xen patchbot -unstable <=