On Mon, Oct 10, 2016 at 6:23 PM, Kevin Wolf <kw...@redhat.com> wrote: > Am 10.10.2016 um 13:54 hat Ashijeet Acharya geschrieben: >> On Mon, Oct 10, 2016 at 5:01 PM, Kevin Wolf <kw...@redhat.com> wrote: >> > Your .bdrv_open() callback in ssh gets these options as keys in >> > QDict *options, using the dot syntax. options might look like this >> > (using "key" = "value" for the example): >> > >> > "server.host" = "localhost" >> > "server.port" = "1234" >> > "server.ipv4" = "on" >> > "server.ipv6" = "on" >> > "path" = "/tmp/test.img" >> > "user" = "test" >> > >> > You can manually parse the "server.*" fields with >> > qdict_extract_subqdict() and QemuOpts and then construct an >> > InetSocketAddress object in C similar to what NBD does currently. >> > >> > The other option, and maybe a bit nicer, would be to use a visitor to >> > directly go from the (sub-)QDict to InetSocketAddress. >> >> If I am not wrong, this is how Max did it here to unflatten things: >> https://lists.gnu.org/archive/html/qemu-devel/2016-02/msg06709.html >> >> But they don't seem to have been merged yet. I will rebase on top of >> his work though. > > The current version of his series is v4 (from end of September), which > has in turn rebased on top of Dan's "QAPI/QOM work for non-scalar object > properties" series, which adds a qdict_crumple() function. This is a > more complete function to "unflatten" the dict again. > > So maybe you want to rebase on top of Dan's series instead of Max's, and > just refer to Max's series to see how he's integrating things in the > block driver.
Ohh, okay I will find the latest v4 series and rebase on top of Daniel's work. Ashijeet > > Kevin