From patchwork Tue Oct 11 07:37:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashijeet Acharya X-Patchwork-Id: 9370205 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 79EAE6048F for ; Tue, 11 Oct 2016 07:41:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D50228730 for ; Tue, 11 Oct 2016 07:41:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 41DED29AC5; Tue, 11 Oct 2016 07:41:28 +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 E6C3C28730 for ; Tue, 11 Oct 2016 07:41:27 +0000 (UTC) Received: from localhost ([::1]:54184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btrgl-0004WW-7M for patchwork-qemu-devel@patchwork.kernel.org; Tue, 11 Oct 2016 03:41:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34485) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btrgC-0004TL-Un for qemu-devel@nongnu.org; Tue, 11 Oct 2016 03:40:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btrgA-0006hT-Ng for qemu-devel@nongnu.org; Tue, 11 Oct 2016 03:40:51 -0400 Received: from mail-pa0-x242.google.com ([2607:f8b0:400e:c03::242]:34660) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btrgA-0006gz-Gg; Tue, 11 Oct 2016 03:40:50 -0400 Received: by mail-pa0-x242.google.com with SMTP id fn2so199142pad.1; Tue, 11 Oct 2016 00:40:50 -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=sskp5zJOy6Q3t4ja2hGwNU+CKfpBlSJ+eJvhj7U19EWfiKbpPMleDCBYbk9Qke83lK 42VWsShbygjQgxzRQ3OSl3oiCDD8pBu191oy3Ga/sSZ0rsyz/acWkUCGT/4wUF3AUYSh QDndYaK3rADStwYelVBCKRelxQcmAVRzTirB3lV0qBLEIENr1cDoXRNEq1tE8eG9kiRm h+68YjMXaEuAEmGPYzRRvC0pVXplzOjU+DzPmIfvdHIkHeteS360jgB63HCyq4cP/c8O hMed3ecRaIgvph4bO1YOO/gEXi7trkIjxKtdbD0vGqiZzSKAIsSDW4KXLNpa1za5b3JJ Xnow== 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=U6feah+wpNZEuEb7OfPf2Z+t0wcu36p64EhDrDP6pEMweyRNzLhuDbQLdTB0Ph8+Cm OSoCvvU7eZGNGTS/Gg68++YMYgGVDnaOYfni8Rv2bLJs29x49ggvxi7kOZuU7RO0he7N Aq49FjWzEQfal85KRjTnftt6tCHHlgP4+aRc+57oicxhtBBUR6pFiqIpsuN/fzrNLMkT KbBLmXMssTRT4GZ7Avx72LscDVBWe5Ay1D9b6Qhm5b0yBVmWQBoocROo5pHpWNtPwzy9 HzIln8y+bm373q7g2ZYqXOrBRT0H221ve53OCTQxtvbpvCZTfhSvocuMnyr23RbzU0ls as7g== X-Gm-Message-State: AA6/9RnhMzbN3Ndr2447EoTdP69+Q61XiCE5UPFOt5ZN0GI1vllQwTnbThuKqyFgA6UsYA== X-Received: by 10.66.193.199 with SMTP id hq7mr4684810pac.70.1476171649871; Tue, 11 Oct 2016 00:40:49 -0700 (PDT) Received: from linux.local ([27.251.197.196]) by smtp.gmail.com with ESMTPSA id v86sm2475563pfa.91.2016.10.11.00.40.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Oct 2016 00:40:49 -0700 (PDT) From: Ashijeet Acharya To: kwolf@redhat.com Date: Tue, 11 Oct 2016 13:07:17 +0530 Message-Id: <1476171437-11830-5-git-send-email-ashijeetacharya@gmail.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1476171437-11830-1-git-send-email-ashijeetacharya@gmail.com> References: <1476171437-11830-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:c03::242 Subject: [Qemu-devel] [PATCH 4/4] 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, rjones@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com, Ashijeet Acharya , 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',