On 12/19/2012 04:17 AM, Stratos Psomadakis wrote:
This patch renames the --format option to --image-format, for specyfing the RBD image format, and uses --format to specify the output formating (to be consistent with the other ceph tools). To avoid breaking backwards compatibility with existing scripts, rbd will still accept --format [1|2] for the image format, but will print a warning message, noting its use is deprecated. The rbd subcommands that support the new --format option are : ls, info, snap list, children, showmapped, lock list. Signed-off-by: Stratos Psomadakis <psomas@xxxxxxxx> --- Hi, this is the updated version of the patch. I renamed --format option to --image-format, and used --format to specify the output formatting, as you suggested. I also implemented some basic error checking on the --format input, and modified the rbd subcommands you mentioned, to support plain/json/xml output formatting. Although, I'm not sure if the json and xml output of those commands is what you'd want. The style issues should also be resolved now. Let me know what you think.
There were still some style issues (missing braces, long lines, and spaces instead of tabs), but I squashed fixes to those into the wip-rbd-formatted-output branch. I changed the output a bit to uses ints, arrays, etc. where it seemed appropriate. The tests aren't quite done yet, but does this new json output look good to you? Josh -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html