All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>
Cc: Xen development list <xen-devel@lists.xensource.com>,
	Kurt Garloff <garloff@suse.de>
Subject: Re: block-nbd script and example config
Date: Tue, 25 Oct 2005 14:37:02 -0500	[thread overview]
Message-ID: <435E895E.3040608@us.ibm.com> (raw)
In-Reply-To: <A95E2296287EAD4EB592B5DEEFCE0E9D32E551@liverpoolst.ad.cl.cam.ac.uk>

Ian Pratt wrote:

>Let's think a little about what we'd like this to look like. 
>
>Taking a similar approach to network devices, we'd end up with something
>that looks like this:
>
>  disks = [ 'export=phy:/dev/sda1, target=/dev/sda1, options=rw',
>            'export=phy:/dev/vg/my_usr, target=/dev/sdb1, options=ro' ]
>  
>
Yup.  Here's another example:

disks = [ 'export=file:/home/anthony/images/Fedora Core 4.img, 
target=/dev/sda1, options=rw',

This is going to become difficult to parse (we could split with ',' here 
but then what if we have commas in files).  We could support an escaping 
mechanism but then it would require triple escapes like:

disks = [ 'export=file:/home/anthony/image/Fedora Core 4\\\, x86-64.img, 
target=/dev/sda1, options=rw' ]

Or regular expression syntax:

disks = [ r'export=file:/home/anthony/image/Fedora Core 4\, x86-64.img, 
target=/dev/sda1, options=rw' ]

>I'm wandering whether the following although slightly ugly might be
>better from a python POV (we'd change network devices acordingly too:
>
>  disks = [ { 'export':'phy:/dev/sda1', 'target':'/dev/sda1',
>'options':'rw' },
>            { 'export':'phy:/dev/vg/my_usr', 'target':'/dev/sdb1',
>'options':'ro' } ]
>  
>
I thought of this too.  I think it's just too much to ask from users 
though.  If you know python, it's understandable, but if you don't, I 
think it reads like gibberish.

>Is this just too ugly and would we be better off going with my first
>proposal? Or should we just leave things alone for 3.0?
>  
>
Yeah, perhaps we should just leave things alone for 3.0.  We can revisit 
when someone comes up with a clever syntax that solves the above problems.

Regards,

Anthony Liguori

>Ian
>
>
>
>
>  
>

  reply	other threads:[~2005-10-25 19:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-24 16:08 block-nbd script and example config Ian Pratt
2005-10-25 19:37 ` Anthony Liguori [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-10-26 22:00 Ian Pratt
2005-10-25 12:15 Ian Pratt
2005-10-19 21:57 Ian Pratt
2005-10-19 22:07 ` Anthony Liguori
2005-10-20  0:52   ` Nicholas Lee
2005-10-20  3:25     ` Anthony Liguori
2005-10-20  8:15       ` Arnd Schmitter
2005-10-19 22:12 ` Nivedita Singhvi
2005-10-19 10:09 Kurt Garloff
2005-10-25 10:53 ` Ewan Mellor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=435E895E.3040608@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=garloff@suse.de \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.