From patchwork Sat Oct 8 10:44:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashijeet Acharya X-Patchwork-Id: 9368105 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 79AC26075E for ; Sat, 8 Oct 2016 10:47:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C51A29553 for ; Sat, 8 Oct 2016 10:47:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5FEFF2965C; Sat, 8 Oct 2016 10:47:17 +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 E368B29553 for ; Sat, 8 Oct 2016 10:47:15 +0000 (UTC) Received: from localhost ([::1]:40396 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsp9u-0001cp-G5 for patchwork-qemu-devel@patchwork.kernel.org; Sat, 08 Oct 2016 06:47:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsp9f-0001cY-Ss for qemu-devel@nongnu.org; Sat, 08 Oct 2016 06:47:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsp9c-0007Ux-Pw for qemu-devel@nongnu.org; Sat, 08 Oct 2016 06:46:59 -0400 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:35646) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsp9c-0007U1-J7; Sat, 08 Oct 2016 06:46:56 -0400 Received: by mail-pf0-x242.google.com with SMTP id t25so4257065pfg.2; Sat, 08 Oct 2016 03:46:56 -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; bh=aFJ0hMTqyVobrZHwDwgeUar7KoxjW8U1JRXXDBMn0pU=; b=Goc3tc+iHnIxQCos5EW2IfNVknO18LaUeq3Bu5GvjCB3U9Ee3ERcBE+YElvmdvm1jz UZ7CgRs/TAJ5lWdd0DXpfEJV3haSdHprF9c3ZoMm2hyofTeb4Sy6x4mldwfTRvL5TNrl 23CcM0YZJU++6wkpBE6uUXiy2Tnjxg8Eyh++Wq6sO/VSbkvRMeM7ea2GHcAK09nJozDj 7J/yQulJMuNc3pjhc/Vqac9ewwAGPLz8mt/NZ44aFSS8yM8XZ1LvxWNqgSVXiQPM/vGV WP4xkWWjCiaJY3PZ2RVmm/OldqTZ1Kvzm9huhxT87SWhjAkWeU3LB/CLtsMxRT7jmPdy nBkw== 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; bh=aFJ0hMTqyVobrZHwDwgeUar7KoxjW8U1JRXXDBMn0pU=; b=DNW5CXvn3CyKJeFjd9nAJnbc51Slwwq5mz+Hu4tgRUu4j5XZU6iYT22z5EVAntf7W/ hiWOu3fNHdBuudqh25HJAULekOtbR2kvSmvdY/ZI/d7yI+BPWa1xjF0rrBJhSk4g4m+X gbasRZG5oOSQbs8AaynaxMdLlF6qHOcP6is+A8Wt1NX8i5hgQicoSeWt7cCUgBTPCp4S pbF1W71q9wQQxm1iKxlTy2+0IfS1RyKfsJD2X3GFhZcanaFLMz/RSVtZ7+mrfnAz1gGc uBF3F2aB+OzQY2rfYMjBFnvT3DpIDt18dTCPnNBVB1bWcoevGFSQLe0hV6ywDWtPCX8o si/Q== X-Gm-Message-State: AA6/9RnPnWrzT21wdeBn06q6jm5FJPTtz4ovvsXFChCCbLpjEmar8oAJGpeCjudiQyvuEw== X-Received: by 10.98.3.67 with SMTP id 64mr35654678pfd.14.1475923615199; Sat, 08 Oct 2016 03:46:55 -0700 (PDT) Received: from linux.local ([27.251.197.196]) by smtp.gmail.com with ESMTPSA id v65sm14403168pfi.42.2016.10.08.03.46.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 08 Oct 2016 03:46:54 -0700 (PDT) From: Ashijeet Acharya To: eblake@redhat.com Date: Sat, 8 Oct 2016 16:14:06 +0530 Message-Id: <1475923446-29428-1-git-send-email-ashijeetacharya@gmail.com> X-Mailer: git-send-email 2.6.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::242 Subject: [Qemu-devel] [PATCH] 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: kwolf@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org, rjones@redhat.com, armbru@redhat.com, Ashijeet Acharya 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..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' } } + ## # @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',