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-tools

[Xen-tools] Re: [Xen-devel] [PATCH] rework xen/xm/main.py to be more str

To: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Subject: [Xen-tools] Re: [Xen-devel] [PATCH] rework xen/xm/main.py to be more straight forward
From: Sean Dague <sean@xxxxxxxxx>
Date: Sat, 6 Aug 2005 09:06:59 -0400
Cc: xen-tools@xxxxxxxxxxxxxxxxxxx, Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>
Delivery-date: Sat, 06 Aug 2005 13:05:16 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200508051717.05693.mark.williamson@xxxxxxxxxxxx>
List-help: <mailto:xen-tools-request@lists.xensource.com?subject=help>
List-id: Xen control tools developers <xen-tools.lists.xensource.com>
List-post: <mailto:xen-tools@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-tools>, <mailto:xen-tools-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-tools>, <mailto:xen-tools-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Mark Williamson <mark.williamson@xxxxxxxxxxxx>, Anthony Liguori <aliguori@xxxxxxxxxx>, xen-tools@xxxxxxxxxxxxxxxxxxx, Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>
References: <20050801192216.GA5974@xxxxxxxxxxxxxxxxxxx> <42F38464.1080202@xxxxxxxxxx> <200508051717.05693.mark.williamson@xxxxxxxxxxxx>
Sender: xen-tools-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
On Fri, Aug 05, 2005 at 05:17:05PM +0100, Mark Williamson wrote:
> > #3 has the nice side-effect of ensuring that xmlib is completely
> > documented which makes xmlib the perfect python interface for management
> > tools.  It would be even nicer if the arguments were expanded instead of
> > passed as a list so the functions could be called in a more natural way.
> 
> Just remembered what else I was going to say earlier:
> 
> If you do: function_name(*arg_list) it'll expand the list into separate args, 
> so you can do exactly that.
> 
> (side note: a "**" will cause a dictionary to be expanded into a list of 
> multiple named arguments)
> 
> See, Python Is Your Friend :-)

Yes, I 100% agree that expanding the args before passing on would be a good
thing.  It just requires a lot of other changes, so I decided it would be
best to try to attack things 1 file at a time, instead of changes all over
the place to start. :)

Ideally the first time the args are expanded the functions would be when
they were sanity checked as well (i.e. does this domain exist, are these
values in range, etc, etc) so that args passed to the next level have a
reasonable chance of been semi-valid, not just random, and proper error
conditions can be returned.

        -Sean

-- 
__________________________________________________________________

Sean Dague                                       Mid-Hudson Valley
sean at dague dot net                            Linux Users Group
http://dague.net                                 http://mhvlug.org

There is no silver bullet.  Plus, werewolves make better neighbors
than zombies, and they tend to keep the vampire population down.
__________________________________________________________________

Attachment: pgpQvkT649rni.pgp
Description: PGP signature

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