From patchwork Mon Oct 17 17:32:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashijeet Acharya X-Patchwork-Id: 9380071 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 CA23C60487 for ; Mon, 17 Oct 2016 17:40:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3F3828FF7 for ; Mon, 17 Oct 2016 17:40:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B85FC29141; Mon, 17 Oct 2016 17:40:37 +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.3 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 57E4D28FF7 for ; Mon, 17 Oct 2016 17:40:37 +0000 (UTC) Received: from localhost ([::1]:34710 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwBts-0001at-Go for patchwork-qemu-devel@patchwork.kernel.org; Mon, 17 Oct 2016 13:40:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwBp8-0005xp-Dx for qemu-devel@nongnu.org; Mon, 17 Oct 2016 13:35:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwBp7-0006gH-Hv for qemu-devel@nongnu.org; Mon, 17 Oct 2016 13:35:42 -0400 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]:33276) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bwBp7-0006fz-Cq; Mon, 17 Oct 2016 13:35:41 -0400 Received: by mail-pf0-x244.google.com with SMTP id i85so9758195pfa.0; Mon, 17 Oct 2016 10:35:41 -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=BNSOL74j3uVZyv8FA7H70nSewvIqOnPOBZ0YXJaOTVY=; b=Cd09iY7D3sIO6idBaKlWVg6o3qJxAxWiDPsVGU6+kCQocD3putvVq6olMqXm/I82Sf btChtVxxIMKUnubpz73mTlVPiyhqilxbUY6vGzLU/Sl3Y5y2PbnFrQ+Q8mRPzmusBXqS QztMFse11F3OSsELPCITYbTFRkVPNN0asuwyPJ+8VzLQdbvUaK3SgmGErXJrj9MCFP5H xNrjIelMRHgCoN5mOdYzTpLMdfgoA6jEbv+AtyObihw0uwfV/qRUs1MZp/3wBWj3Ch/c Fs7WLOl4ePx7RxrfPbyjr3mMwiigpMHCjT8RCbFpElTriW5Rxh8TAiMjFsHFhcKvN6q2 ZMOA== 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=BNSOL74j3uVZyv8FA7H70nSewvIqOnPOBZ0YXJaOTVY=; b=dZaDX8fhze+soQWrMJ9QVRtXeDwYBvH7P30j5CroChjxNAF4FsQRSa0bLeHEJWHRkz 9Z680cQPFCJwgSaW+Wqz80EmXxDzuGk+t9+TEnc9Gc4DxMQaTsWG4QjoWBqkqwDsTixk dIB1HprusRaqZ6C/hN7amBkirnI7OmMFGJkUQEZpgd+9oyN1bhs9W2+IBcsvMBql4H3t Vjbf73aRUI/pusUM6ofE8p+FaYWQ2W5ZDi1XpLPTULcy6q2OnVUu8NaZ1zIoQrxGUnPc JUpdHkY/+XsD14LSs1uu4NfmKLLb2W4YUmYmTby4GNuvKk5zTZg5CPjmKg/Y0K1nKC61 YnvA== X-Gm-Message-State: AA6/9RlftvgxXui1fxoDkEgCNMvqt9qbE7N6VeXq+ogZhvfWGoq1HtbYWQal7wfxfpGkNg== X-Received: by 10.98.72.221 with SMTP id q90mr39109582pfi.34.1476725740520; Mon, 17 Oct 2016 10:35:40 -0700 (PDT) Received: from linux.local ([27.251.197.196]) by smtp.gmail.com with ESMTPSA id 188sm49641264pfz.2.2016.10.17.10.35.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Oct 2016 10:35:40 -0700 (PDT) From: Ashijeet Acharya To: kwolf@redhat.com Date: Mon, 17 Oct 2016 23:02:15 +0530 Message-Id: <1476725535-3350-6-git-send-email-ashijeetacharya@gmail.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1476725535-3350-1-git-send-email-ashijeetacharya@gmail.com> References: <1476725535-3350-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] [PATCH v3 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',