From patchwork Sat Oct 15 09:04:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashijeet Acharya X-Patchwork-Id: 9377739 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9B63E607FD for ; Sat, 15 Oct 2016 09:08:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B4B1293FE for ; Sat, 15 Oct 2016 09:08:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F3B12940B; Sat, 15 Oct 2016 09:08:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0C34D293FE for ; Sat, 15 Oct 2016 09:08:07 +0000 (UTC) Received: from localhost ([::1]:51014 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvKwo-0005LY-51 for patchwork-qemu-devel@patchwork.kernel.org; Sat, 15 Oct 2016 05:08:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvKwI-0005It-Sm for qemu-devel@nongnu.org; Sat, 15 Oct 2016 05:07:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bvKwE-0001u0-IA for qemu-devel@nongnu.org; Sat, 15 Oct 2016 05:07:33 -0400 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]:33466) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bvKwE-0001td-B9; Sat, 15 Oct 2016 05:07:30 -0400 Received: by mail-pf0-x244.google.com with SMTP id i85so5434858pfa.0; Sat, 15 Oct 2016 02:07:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8G7mLLBbxjznnvFbuuNGM86UZPhRw8pIkfOXd8+EgKo=; b=fy6GA7qGdiUpPCpPABfc2nZmT86rHp4K7hDsDSW9lOd0vgxMTcPYlxNf6FbNFJ04hC 1sbT7gr8J4mI44An25s/gNPH+UiR17Yj7hf23nS5GOvkHvHo3ctNI9WLS+CwxMXU5+6i LdBja8iZao3sc5VH+QutERtIz1gWikFfKbM1nNRI6hpxv5uizymMWm2v/HF3SUSX67Oq 1+yUYFZIdZVXdRDgSz5kEe3wMpPeHVwGcwf8jYUJDAU+ThumLjYm+QE7IFH0Mo0HQ4py 7aPVs4NNvf5i7JwhSE11zhV5K/9C5Bb8ubRFy2mFNe5dfgq7WjTtf4m5Tgkm4ECFCdLl aZcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8G7mLLBbxjznnvFbuuNGM86UZPhRw8pIkfOXd8+EgKo=; b=G4cCI/Q4Z3if1D2geQlInqdhU5b1xNsAcVu8ubbhH+L5LdQATzk7a9SXusOc2Lx3Jf dc6fIjuotpBBUEWS1fPAFht/yUrw2glCG5iD9EpEW6T1wN/Ay3wflb2p12zMNS66I1KW pYzJ1s8bpFrQbu3JzW1qJtqnmFtjXTh6imHXmvztLAP+0P5MDGT+v6dfDvWmiamTzBlY xfbSkv1iv2SRDvZr6fwQvehA8/+eRu9ySLR5oJxAh2Yssh17XpaDis9hXkfGE6+08TrL XookX+FN2ZC8KNvj0i3zahoz0OKQlGABXCceWQCnF3hCWGKR4/kv9y+9hbLSi9pQAjRM feSA== X-Gm-Message-State: AA6/9RkYgRajPAqnR6EHZY/5YIAholjmxu1zxqqCl1CAcfQHVt0HTlESa33zE8fSu9Nfgg== X-Received: by 10.98.72.3 with SMTP id v3mr24110363pfa.175.1476522449209; Sat, 15 Oct 2016 02:07:29 -0700 (PDT) Received: from linux.local ([27.251.197.196]) by smtp.gmail.com with ESMTPSA id a7sm5295159pan.34.2016.10.15.02.07.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 15 Oct 2016 02:07:28 -0700 (PDT) From: Ashijeet Acharya To: kwolf@redhat.com Date: Sat, 15 Oct 2016 14:34:40 +0530 Message-Id: <1476522280-23211-6-git-send-email-ashijeetacharya@gmail.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1476522280-23211-1-git-send-email-ashijeetacharya@gmail.com> References: <1476522280-23211-1-git-send-email-ashijeetacharya@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::244 Subject: [Qemu-devel] [v2 5/5] qapi: allow blockdev-add for ssh X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, jcody@redhat.com, armbru@redhat.com, rjones@redhat.com, kraxel@redhat.com, Ashijeet Acharya , pbonzini@redhat.com, mreitz@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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..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' ] } ## # @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' } } + ## # @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',