[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] block-nbd script and example config
Nicholas Lee wrote: Double quotes are actually valid characters in a filename although rarely used.The only thing to think about is how do handle file devices with spaces in the filename. This is going to be common I think.Since it's a python variable can't you just run a validator on configimport and throw an exception if the devive block doesn't exist. Noting that device paths including special characters need to beenclosured in "...". ie. export=phy:"/dev/vgname/bob your uncle; mate! device", ... A more bold way of approaching this would be to adopt a more qemu like syntax of: hda1="/dev/vgname/bob you uncle; mate1" hda2="/root/rockhopper.img"We could use stat to figure out whether something was a file or a device and use the appropriate script (file or phy). For everything else, we could use explicit urls such as: hda3="nbd://rockhopper.austin.ibm.com:1025"I like the syntax a lot but I'm not sure that marking a device read-only works nicely anymore. We could have a single readonly attribute like: readonly=['hda1', 'hda2'] Or perhaps just require url encoding: hda1="phy:///dev/vgname/bob you uncle&readonly=1" Kind of ugly but at least we're optimizing for the common case. Just thinking out loud. Regards, Anthony Liguori -- Nicholas Lee http://stateless.geek.nz gpg 8072 4F86 EDCD 4FC1 18EF 5BDD 07B0 9597 6D58 D70C _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |