Received: from eggs.gnu.org ([2001:4830:134:3::10]:50416) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvXfd-0005pn-N4 for qemu-devel@nongnu.org; Sat, 15 Oct 2016 18:43:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bvXfc-0008Od-Mv for qemu-devel@nongnu.org; Sat, 15 Oct 2016 18:43:13 -0400 References: <1476522280-23211-1-git-send-email-ashijeetacharya@gmail.com> <1476522280-23211-6-git-send-email-ashijeetacharya@gmail.com> From: Max Reitz Message-ID: <46159187-19fe-4fed-5eec-344a0a50e817@redhat.com> Date: Sun, 16 Oct 2016 00:43:02 +0200 MIME-Version: 1.0 In-Reply-To: <1476522280-23211-6-git-send-email-ashijeetacharya@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="R0qB7GVnNX0N6M78MvJGbCfSs1BB6nQxK" Subject: Re: [Qemu-devel] [v2 5/5] qapi: allow blockdev-add for ssh List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ashijeet Acharya , kwolf@redhat.com Cc: rjones@redhat.com, jcody@redhat.com, eblake@redhat.com, armbru@redhat.com, berrange@redhat.com, kraxel@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --R0qB7GVnNX0N6M78MvJGbCfSs1BB6nQxK From: Max Reitz To: Ashijeet Acharya , kwolf@redhat.com Cc: rjones@redhat.com, jcody@redhat.com, eblake@redhat.com, armbru@redhat.com, berrange@redhat.com, kraxel@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org Message-ID: <46159187-19fe-4fed-5eec-344a0a50e817@redhat.com> Subject: Re: [v2 5/5] qapi: allow blockdev-add for ssh References: <1476522280-23211-1-git-send-email-ashijeetacharya@gmail.com> <1476522280-23211-6-git-send-email-ashijeetacharya@gmail.com> In-Reply-To: <1476522280-23211-6-git-send-email-ashijeetacharya@gmail.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 15.10.2016 11:04, Ashijeet Acharya wrote: > Introduce new object 'BlockdevOptionsSsh' in qapi/block-core.json to > support blockdev-add for SSH network protocol driver. Use only 'struct > InetSocketAddress' since SSH only supports connection over TCP. >=20 > Signed-off-by: Ashijeet Acharya > --- > qapi/block-core.json | 24 ++++++++++++++++++++++-- > 1 file changed, 22 insertions(+), 2 deletions(-) >=20 > diff --git a/qapi/block-core.json b/qapi/block-core.json > index 9d797b8..2e8a390 100644 > --- a/qapi/block-core.json > +++ b/qapi/block-core.json > @@ -1716,7 +1716,8 @@ > 'dmg', 'file', 'ftp', 'ftps', 'gluster', 'host_cdrom', > 'host_device', 'http', 'https', 'luks', 'null-aio', 'null-= co', > 'parallels', 'qcow', 'qcow2', 'qed', 'quorum', 'raw', > - 'replication', 'tftp', 'vdi', 'vhdx', 'vmdk', 'vpc', 'vvfat' ] } > + 'replication', 'ssh', 'tftp', 'vdi', 'vhdx', 'vmdk', 'vpc'= , > + 'vvfat' ] } > =20 > ## > # @BlockdevOptionsFile > @@ -1953,6 +1954,25 @@ > '*vport': 'int', > '*segment': 'str' } } > =20 > +## > +# @BlockdevoptionsSsh Should be *BlockdevOptionsSsh. > +# > +# @server: host address and port number It could be argued that the port number is part of the host address. I'd therefore just describe it as "host address" since you can specify some other options to, like @ipv6. > +# > +# @path: path to the image on the host > +# > +# @user: user as which to connect This can actually be an optional argument, and I'd make it one (it defaults to the current local user name). > +# > +# @host_key_check defines how and what to check the host key aga= inst As you can see from other descriptions, we normally put an "#optional" in front of descriptions of optional parameters, and it's also a good idea to specify the default behavior or value, which in this case is "yes" - intuitively I'd have expected "no", so you should probably indeed make a note of that. Max > +# > +# Since 2.8 > +## > +{ 'struct': 'BlockdevoptionsSsh', > + 'data': { 'server': 'InetSocketAddress', > + 'path': 'str', > + 'user': 'str', > + '*host_key_check': 'str' } } > + > =20 > ## > # @BlkdebugEvent > @@ -2281,7 +2301,7 @@ > # TODO rbd: Wait for structured options > 'replication':'BlockdevOptionsReplication', > # TODO sheepdog: Wait for structured options > -# TODO ssh: Should take InetSocketAddress for 'host'? > + 'ssh': 'BlockdevoptionsSsh', > 'tftp': 'BlockdevOptionsCurl', > 'vdi': 'BlockdevOptionsGenericFormat', > 'vhdx': 'BlockdevOptionsGenericFormat', >=20 --R0qB7GVnNX0N6M78MvJGbCfSs1BB6nQxK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEvBAEBCAAZBQJYArD2EhxtcmVpdHpAcmVkaGF0LmNvbQAKCRD0B9sAYdXPQCpu CACKzp+iV/9bzAcd4QQzD7nywgRpHmeLBkej+SPYaIR6g1KAevVk1urReaL6BR7Y ktykgAKOhJQEHi29VlTvaPGKr5jqkmUOhbh3sue9KQLQsbFBshbWbTApHCxjsPoD BkUoDXu56vtqxvGd1lI1LdrNUBfG+uvYjIHEy8LoWNNwYUk1/1Ox2fwzwGr8V/lQ IRo5yawQIYtwyMTTteLnrMM8Sm4jkmPFIXdAT2KHNFASzKWEyxf0M8eS67VdwrEq VKkTTvlGmjo9znGsxnHwLYANUS3JRpI2F9NDOIYAw5CQ8lGGc/CDx0ad13tr1zpD ijSAKxYlnwTp568xgdMi+o7e =xGPO -----END PGP SIGNATURE----- --R0qB7GVnNX0N6M78MvJGbCfSs1BB6nQxK--