From mboxrd@z Thu Jan 1 00:00:00 1970 From: Josh Durgin Subject: Re: [PATCH] rbd: Add --json flag for the showmapped command Date: Mon, 17 Dec 2012 10:35:26 -0800 Message-ID: <50CF65EE.6080606@inktank.com> References: <50A6748C.7040303@inktank.com> <1355413032-18095-1-git-send-email-psomas@grnet.gr> <50CAE9F0.3020607@grnet.gr> <50CF5730.5060507@inktank.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mail-pa0-f46.google.com ([209.85.220.46]:38339 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753336Ab2LQSf3 (ORCPT ); Mon, 17 Dec 2012 13:35:29 -0500 Received: by mail-pa0-f46.google.com with SMTP id bh2so4264237pad.19 for ; Mon, 17 Dec 2012 10:35:29 -0800 (PST) In-Reply-To: Sender: ceph-devel-owner@vger.kernel.org List-ID: To: Yehuda Sadeh Cc: Stratos Psomadakis , ceph-devel@vger.kernel.org, synnefo-devel@googlegroups.com On 12/17/2012 09:35 AM, Yehuda Sadeh wrote: > On Mon, Dec 17, 2012 at 9:32 AM, Josh Durgin wrote: >> On 12/14/2012 12:57 AM, Stratos Psomadakis wrote: >>> >>> On 12/13/2012 07:17 PM, Yehuda Sadeh wrote: >>>> >>>> On Thu, Dec 13, 2012 at 7:37 AM, Stratos Psomadakis >>>> wrote: >>>>> >>>>> Signed-off-by: Stratos Psomadakis >>>>> --- >>>>> Hi Josh, >>>>> >>>>> This patch adds the '--json' flag to enable dumping the showmapped >>>>> output in >>>> >>>> I think that it should be "--format=json" rather than --json. This >>>> will make it more in line with other tools. Also, then you could have >>>> the unpopular --format=xml. >>> >>> >>> Hi, >>> >>> the problem is that --format is arleady used in rbd (to select the rbd >>> image format). So, you could either use --output-format= for >>> plain/json/xml output (but then you would be inconsistent wrt the other >>> tools), or change --format to --image-format (or something like that), >>> and use --format to select the output formatting. >> >> >> We could deprecate --format in favor of --image-format, but maintain >> backwards compatibility by accepting the string 1 or 2 for --format >> still. Maybe not pretty, but it lets us be consistent without changing >> existing usage. >> > That would work, but we should dump a noticeable warning whenever it's > being used. Sounds good to me.