[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [Patch] XendOptionsSMF, missing get_config_value method on Solaris

  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Juergen Keil <jk@xxxxxxxx>
  • Date: Fri, 6 Jun 2008 14:57:13 +0200 (CEST)
  • Delivery-date: Fri, 06 Jun 2008 05:57:43 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>


On Solaris, xend XendOptions.py uses an additional interface XendOptionsSMF.
This allows xend configuration via Solaris SMF as well as the config file.
(Added by changeset 13407).

Problem: XendOptionsSMF doesn't define a get_config_value; but these
is get_config_string.  The code in XendOptions.py needs both; 
get_keymap() needs get_config_value.

The attached patch adds the missing get_config_value to interface
get_config_value missing in XendOptionsSMF instance, breaks xend on Solaris

On Solaris, interface XendOptionsSMF doesn't define a get_config_value
method. We only have XendOptionsSMF.get_config_string.

Class XendOptionsFile has both: get_config_value and get_config_string.
And get_config_string is an alias for get_config_value.

This breaks the original code for get_keymap() on a solaris dom0:

        def get_keymap(self):
            return self.get_config_value('keymap', None)

[2008-06-06 14:12:18 1350] ERROR (SrvDaemon:347) Exception starting xend (XendOp
tionsSMF instance has no attribute 'get_config_value')

Signed-off-by: Juergen Keil <jk@xxxxxxxx>

diff --git a/tools/python/xen/xend/XendOptions.py 
--- a/tools/python/xen/xend/XendOptions.py
+++ b/tools/python/xen/xend/XendOptions.py
@@ -448,7 +448,7 @@
                     raise XendError("option %s: %s:%s" % (name, e[1], e[2]))
-        def get_config_string(self, name, val=None):
+        def get_config_value(self, name, val=None):
                 return scf.get_string(name)
             except scf.error, e:
@@ -456,6 +456,9 @@
                     return val
                     raise XendError("option %s: %s:%s" % (name, e[1], e[2]))
+       def get_config_string(self, name, val=None):
+           return self.get_config_value(name, val)
         def get_xen_api_server(self):
             # When the new server is a supported configuration, we should
Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.