From: Sander Eikelenboom Subject: Re: [RFC] native python Xenstore module Date: Tue, 24 Feb 2015 18:06:45 +0100 Message-ID: <128392878.20150224180645@eikelenboom.it> References: <54D0D4B1.5080205@eu.citrix.com> <1424796100.27930.389.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YQIwb-0000nB-74 for xen-devel@lists.xenproject.org; Tue, 24 Feb 2015 17:06:49 +0000 In-Reply-To: <1424796100.27930.389.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xenproject.org, Simon Rowe List-Id: xen-devel@lists.xenproject.org Tuesday, February 24, 2015, 5:41:40 PM, you wrote: > On Tue, 2015-02-03 at 14:01 +0000, Simon Rowe wrote: >> The current Python interface to Xenstore is just a thin binding to the >> C libxenstore library. This means that it is architecture-specific and >> makes it awkward to use in platform-independent code like the XenServer >> guest agent. > Are/were you aware of https://pypi.python.org/pypi/pyxs which sounds > like something similar, judging from its blurb alone? I'm using the above for a project, seems to work fine for my purposes. Although you have to get a hang for working around some of the xenstore watch oddities/limitations (firing once after setup, firing on child changes without you knowing what actually changed because you don't have the previous value, but most of the things can be worked around using the watch token. I use a pickled dict of the watched path and the current value as the token at that seems to work). -- Sander > https://launchpad.net/pyxenstore/ might be too, although I don't know if > that one is pure python. > Anyhow is your intention to have this added to the xen.git tree, perhaps > even replacing tools/python/xen/lowlevel/xs/ or just to gather feedback > on some code destined for an external project? > Personally I don't see a problem with including it in tree, replacing > xen.lowlevel.xs might require thinking a little about API compatibility, > which might be a pain... > Ian.