Re: Standard NBD URL syntax (again)
On Tue, May 21, 2019 at 10:30:36PM +0200, Wouter Verhelst wrote:
> On Mon, May 20, 2019 at 10:20:56AM +0100, Richard W.M. Jones wrote:
> > The leading problem with the "obvious" NBD URL format seems to be that
> > it's impossible to specify empty export names or export names which
> > don't start with a '/' character.
>
> Not sure? We can just define the / as a separator character, rather than
> as part of the name. That would then result in:
>
> nbd://nbd-server.example.com:12345/foo
>
> for "the export called 'foo' at nbd-server.example.com on port 12345"
>
> nbd://nbd-server.example.com//foo
>
> for "the export called '/foo' at nbd-server.example.com on the default
> port"
This is what qemu uses, but it does seem a little awkward? It would
be easy to make the naive assumption that given an export called
"/foo" you'd write the URL "nbd://server/foo".
> Alternatively, we could URL-encode things, since the NBD spec allows way
> more characters than do URLs:
>
> nbds://nbd-server.example.com/%2Ffoo
>
> for "the export called '/foo' at nbd-server.example.com, using STARTTLS"
Yup, TLS is also something I didn't consider.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
Reply to: