From: Juergen Keil Subject: [Patch] XendOptionsSMF, missing get_config_value method on Solaris Date: Fri, 6 Jun 2008 16:52:07 +0200 (CEST) Message-ID: <20080606145208.027154CA62@imap.tools.intra> Reply-To: Juergen Keil Mime-Version: 1.0 Content-Type: MULTIPART/mixed; BOUNDARY=Den_of_Snakes_503_000 Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: John Levon List-Id: xen-devel@lists.xenproject.org --Den_of_Snakes_503_000 Content-Type: TEXT/plain; charset=us-ascii Content-MD5: TzbqxpRao1LbdPYyKS6qXg== John Levon wrote: > Instead, I think get_keymap() needs to use get_config_string(). Here's an alternate version of my previous patch, using get_config_string for options that are strings. --Den_of_Snakes_503_000 Content-Type: TEXT/plain; name="XendOptionsSMF-alt.patch"; charset=us-ascii; x-unix-mode=0644 Content-Description: XendOptionsSMF-alt.patch Content-MD5: jAOxmOjuHaJOUES1XNPGYw== 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 (XendOptionsSMF instance has no attribute 'get_config_value') Use get_config_string for 'keymap' and 'resource-label-change-script'. Signed-off-by: Juergen Keil diff --git a/tools/python/xen/xend/XendOptions.py b/tools/python/xen/xend/XendOptions.py --- a/tools/python/xen/xend/XendOptions.py +++ b/tools/python/xen/xend/XendOptions.py @@ -330,10 +330,10 @@ self.vncpasswd_default) def get_keymap(self): - return self.get_config_value('keymap', None) + return self.get_config_string('keymap', None) def get_resource_label_change_script(self): - s = self.get_config_value('resource-label-change-script') + s = self.get_config_string('resource-label-change-script') if s: result = s.split(" ") result[0] = os.path.join(osdep.scripts_dir, result[0]) --Den_of_Snakes_503_000 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Den_of_Snakes_503_000--