qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Ashijeet Acharya <ashijeetacharya@gmail.com>
Cc: eblake@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org,
	rjones@redhat.com, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qapi: allow blockdev-add for ssh
Date: Mon, 10 Oct 2016 11:15:52 +0200	[thread overview]
Message-ID: <20161010091552.GC6775@noname.redhat.com> (raw)
In-Reply-To: <1475923446-29428-1-git-send-email-ashijeetacharya@gmail.com>

Am 08.10.2016 um 12:44 hat Ashijeet Acharya geschrieben:
> 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.
> 
> Signed-off-by: Ashijeet Acharya <ashijeetacharya@gmail.com>
> ---
>  qapi/block-core.json | 24 ++++++++++++++++++++++--
>  1 file changed, 22 insertions(+), 2 deletions(-)
> 
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 9d797b8..237ec6b 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' ] }
>  
>  ##
>  # @BlockdevOptionsFile
> @@ -1953,6 +1954,25 @@
>              '*vport': 'int',
>              '*segment': 'str' } }
>  
> +##
> +# @BlockdevoptionsSsh
> +#
> +# @server:              host address and port number
> +#
> +# @path:                path to the image on the host
> +#
> +# @user:                user as which to connect
> +#
> +# @host_key_check       defines how and what to check the host key against
> +#
> +# Since 2.8
> +##
> +{ 'struct': 'BlockdevoptionsSsh',
> +  'data': { 'server': 'InetSocketAddress',
> +            'path': 'str',
> +            'user': 'str',
> +            'host_key_check': 'str' } }

Did you test this? The ssh driver currently takes a separate 'host'
string and 'port' integer, not a 'server' InetSocketAddress, so I think
the C code needs an update, too.

As for how to use a SocketAddress in order to establish a connection,
you can look at block/nbd.c for reference.

Kevin

  parent reply	other threads:[~2016-10-10  9:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-08 10:44 [Qemu-devel] [PATCH] qapi: allow blockdev-add for ssh Ashijeet Acharya
2016-10-08 10:54 ` Richard W.M. Jones
2016-10-08 11:06   ` Ashijeet Acharya
2016-10-10  9:15 ` Kevin Wolf [this message]
2016-10-10 10:48   ` Ashijeet Acharya
2016-10-10 11:31     ` Kevin Wolf
2016-10-10 11:54       ` Ashijeet Acharya
2016-10-10 12:53         ` Kevin Wolf
2016-10-10 12:57           ` Ashijeet Acharya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161010091552.GC6775@noname.redhat.com \
    --to=kwolf@redhat.com \
    --cc=armbru@redhat.com \
    --cc=ashijeetacharya@gmail.com \
    --cc=eblake@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).