Bug 1295762

Summary: The --xml flag should always output xml
Product: [Community] GlusterFS Reporter: Niels de Vos <ndevos>
Component: cliAssignee: bugs <bugs>
Status: CLOSED DUPLICATE QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs, hgowtham, smohan, vbellur
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1294547 Environment:
Last Closed: 2018-11-19 08:57:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1294547    

Description Niels de Vos 2016-01-05 12:19:12 UTC
+++ This bug was initially created as a clone of Bug #1294547 +++
+++                                                           +++
+++ Use this bug to post a fix in the master branch.          +++

The output of the cli with the --xml flag is inconsistent. Every cli command should output xml if that flag is set.

At the very minimum, a valid xml message could just be the string output wrapped in xml, ie.:

# gluster --xml --version
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cliOutput>
  <opRet>0</opRet>
  <opRetStr>glusterfs 3.7.6 built on Dec 11 2015 22:26:22
Repository revision: git://git.gluster.com/glusterfs.git
Copyright (c) 2006-2011 Gluster Inc. <http://www.gluster.com>
GlusterFS comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GlusterFS under the terms of the GNU General Public License.</opRetStr>
</cliOutput>

This would allow an application to rely on sane input that can always be dom processed.

Comment 1 Vijay Bellur 2018-11-19 08:57:58 UTC

*** This bug has been marked as a duplicate of bug 1294547 ***