From patchwork Tue Oct 25 13:04:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashijeet Acharya X-Patchwork-Id: 9394507 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 865C060762 for ; Tue, 25 Oct 2016 13:07:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 787082955C for ; Tue, 25 Oct 2016 13:07:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6D4F82959A; Tue, 25 Oct 2016 13:07:59 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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 0BD472955C for ; Tue, 25 Oct 2016 13:07:59 +0000 (UTC) Received: from localhost ([::1]:54359 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bz1SQ-0008Dh-8Y for patchwork-qemu-devel@patchwork.kernel.org; Tue, 25 Oct 2016 09:07:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52587) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bz1Rp-0008Bh-DS for qemu-devel@nongnu.org; Tue, 25 Oct 2016 09:07:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bz1Ro-0001s8-Go for qemu-devel@nongnu.org; Tue, 25 Oct 2016 09:07:21 -0400 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:34686) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bz1Ro-0001s0-AV; Tue, 25 Oct 2016 09:07:20 -0400 Received: by mail-pf0-x241.google.com with SMTP id 128so19613474pfz.1; Tue, 25 Oct 2016 06:07:20 -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=YYu6MNHWBWVUDZrNsge1tp91CYOWtucoF9ld6uucSeE=; b=W5iJQWScCIWQw/SpJkHETLAcRdGqfq8n2c/y9DOw9WF7uFJTPqw5FFAgMtz/LC4x73 5LI/af8Cz42fLXFyqhLwA3WN3Ow83wZ7U/2rl3XPn/cMunCXMm+fbCerlrQ0tovU2iP8 rB3ja5Cu/Ku/mqo6D/ccL1oN3Hz5m/ejz2foXM/RiFQ7tLKGHz+++35+qyDErCYBDNKc fXwo/yaUyhJpt4lxqh+q8D8T42B+k7aI1COZUaC2QAv79dgnpa4mMDdbRzaC1OF9oY4X JNW9rE2K471OboUykpq2ErR6EWKrSCn3qsXwxmEuUODEkUjMIeKVKEW8Ob7uxuzHy+zf 4pCg== 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=YYu6MNHWBWVUDZrNsge1tp91CYOWtucoF9ld6uucSeE=; b=MqnGihcjxCW5kR2ic5G74WVmVRIg1PuUwWAQj9tWzRy+x/fkpRfz1bkSvVa8tK4Wtb QFnpY1Ex530tiJjseHXRaRv9u23TWzE0MeQUGG+8hxmkQZtjoaQkzIfoSueLAWUqmrQi JDqup7srWR2+Y9+KPSawvSzaGvwSCw6f/aaLCgLfmLqGqu/E1Hdh1gdPtuqpUnB/1JNe OFMz8xuS3ayI9BlbSFnF0C0AbBDXU5dfT44yeh4Nq23znCiOvGBEyr67IyA5Pe4lqwWD sMT+ic/K2MZjPO7DwooNg7HgT4svaMSC2uf9ksMs57GhcK7Z43x8fywZ4h84CSPnfRAG vHFA== X-Gm-Message-State: ABUngvfZqDZ8Y3lvtIAXJr6uh/6d7GsGuS9Pkvfyp0WHCxCIPvnlA/ZogHkkjxhttdY0Ag== X-Received: by 10.99.10.20 with SMTP id 20mr32210077pgk.98.1477400839531; Tue, 25 Oct 2016 06:07:19 -0700 (PDT) Received: from linux.local ([106.208.9.126]) by smtp.gmail.com with ESMTPSA id u17sm33461160pfi.1.2016.10.25.06.07.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 25 Oct 2016 06:07:19 -0700 (PDT) From: Ashijeet Acharya To: kwolf@redhat.com Date: Tue, 25 Oct 2016 18:34:01 +0530 Message-Id: <1477400641-7750-6-git-send-email-ashijeetacharya@gmail.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1477400641-7750-1-git-send-email-ashijeetacharya@gmail.com> References: <1477400641-7750-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::241 Subject: [Qemu-devel] [PATCH v4 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, rjones@redhat.com, mreitz@redhat.com, Ashijeet Acharya , pbonzini@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 Reviewed-by: Kevin Wolf --- qapi/block-core.json | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 9d797b8..689dc0a 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,27 @@ '*vport': 'int', '*segment': 'str' } } +## +# @BlockdevOptionsSsh +# +# @server: host address +# +# @path: path to the image on the host +# +# @user: #optional user as which to connect, defaults to current +# local user name +# +# @host_key_check #optional defines how and what to check the host +# key against, defaults to "yes" +# +# Since 2.8 +## +{ 'struct': 'BlockdevOptionsSsh', + 'data': { 'server': 'InetSocketAddress', + 'path': 'str', + '*user': 'str', + '*host_key_check': 'str' } } + ## # @BlkdebugEvent @@ -2281,7 +2303,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',