From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bta96-0002O7-LV for qemu-devel@nongnu.org; Mon, 10 Oct 2016 08:57:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bta94-0000YZ-PV for qemu-devel@nongnu.org; Mon, 10 Oct 2016 08:57:31 -0400 MIME-Version: 1.0 In-Reply-To: <20161010125350.GH6775@noname.redhat.com> References: <1475923446-29428-1-git-send-email-ashijeetacharya@gmail.com> <20161010091552.GC6775@noname.redhat.com> <20161010113115.GF6775@noname.redhat.com> <20161010125350.GH6775@noname.redhat.com> From: Ashijeet Acharya Date: Mon, 10 Oct 2016 18:27:29 +0530 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH] qapi: allow blockdev-add for ssh List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Eric Blake , armbru@redhat.com, QEMU Developers , "Richard W.M. Jones" , qemu-block@nongnu.org On Mon, Oct 10, 2016 at 6:23 PM, Kevin Wolf wrote: > Am 10.10.2016 um 13:54 hat Ashijeet Acharya geschrieben: >> On Mon, Oct 10, 2016 at 5:01 PM, Kevin Wolf 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