On 10/22/2013 11:48 AM, Eric Blake wrote: > On 10/22/2013 11:45 AM, Samuel Thibault wrote: > >>>> It makes sense, yes, the syntax would be [ip6-prefix=net[/netsize]] . I >>>> just don't know how to express that in qapi :) >>> >>> '*ip6_net':'str', '*ip6_netsize':'int' >>> >>> passed on the wire as: >>> >>> "ip6_net":"fc00::1", "ip6_netsize":64 >> >> Err, so that means that the user would have to pass >> "ip6-net=fc00::1,ip6_netsize=64"? This would look awkward, compared to >> the ipv4 situation, which is a mere "net=10.0.2.2/24". > > Err, yes. QMP is machine-parseable. HMP can let the user abbreviate to > net=10.0.2.2/24, but QMP should not require reparsing. So what if it's > longer, it's easier for machines to manipulate if it's already broken > into parts. Trust me - I wouldn't be asking you to split it into two > fields unless I thought that libvirt would much rather send it to you as > two fields.
The command line, just like HMP, can use shorthand for convenience. I guess you do have a point about consistency of ipv4's @net requiring post-processing, but that doesn't mean we have to repeat the mistake for IPv6. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature