From patchwork Thu Feb 18 20:24:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 45805 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 98D41B7E3B for ; Fri, 19 Feb 2010 07:25:49 +1100 (EST) Received: from localhost ([127.0.0.1]:45122 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NiCwU-0000B2-7i for incoming@patchwork.ozlabs.org; Thu, 18 Feb 2010 15:25:46 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NiCvr-00009D-Vt for qemu-devel@nongnu.org; Thu, 18 Feb 2010 15:25:08 -0500 Received: from [199.232.76.173] (port=50412 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NiCvr-00008p-Jk for qemu-devel@nongnu.org; Thu, 18 Feb 2010 15:25:07 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NiCvq-0001K6-8W for qemu-devel@nongnu.org; Thu, 18 Feb 2010 15:25:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:9642) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NiCvp-0001K0-Rs for qemu-devel@nongnu.org; Thu, 18 Feb 2010 15:25:06 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o1IKP4Zs004788 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 18 Feb 2010 15:25:04 -0500 Received: from localhost (vpn-8-9.rdu.redhat.com [10.11.8.9]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o1IKP05Z021798 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Thu, 18 Feb 2010 15:25:03 -0500 Date: Thu, 18 Feb 2010 18:24:58 -0200 From: Luiz Capitulino To: qemu-devel@nongnu.org Message-ID: <20100218182458.07c3be6c@redhat.com> Organization: Red Hat Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH] QMP: Spec: Private Extensions support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Vendors might want to add their own extensions to QMP, as JSON itself (and several other protocols) allow this someway, I think QMP should allow too. We just have to choose a naming convention that is guaranteed not to clash with any future new commands, arguments, parameters and event names. Signed-off-by: Luiz Capitulino --- QMP/qmp-spec.txt | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/QMP/qmp-spec.txt b/QMP/qmp-spec.txt index f3c0327..bc92c7e 100644 --- a/QMP/qmp-spec.txt +++ b/QMP/qmp-spec.txt @@ -215,3 +215,26 @@ Additionally, Clients must not assume any particular: - Order of json-object members or json-array elements - Amount of errors generated by a command, that is, new errors can be added to any existing command in newer versions of the Server + +6 Private Extensions +-------------------- + +QMP provides a special naming convention to allow the creation of independent +namespaces, which allows vendors to introduce private extensions to the +protocol. It is guaranteed that no future QMP version will expose any name +that follows this convention. + +Private extensions must be in the following format: + +v_NAMESPACE__NAME + + Where, + +- NAME is any argument, command, event or parameter name +- NAMESPACE is the namespace that NAME belongs to + +For example, the following command: + +v_ABC__insert + +Is called 'insert' and is part of the 'ABC' namespace.