Bug 1460985 - [GSS][RFE] gluster cli command should provide yaml output
Summary: [GSS][RFE] gluster cli command should provide yaml output
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: cli
Version: rhgs-3.2
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: ---
Assignee: Kaushal
QA Contact: Rahul Hinduja
URL:
Whiteboard:
Depends On:
Blocks: 1481177
TreeView+ depends on / blocked
 
Reported: 2017-06-13 10:12 UTC by Prerna Sony
Modified: 2021-12-10 15:05 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-11 03:35:14 UTC
Embargoed:


Attachments (Terms of Use)

Description Prerna Sony 2017-06-13 10:12:04 UTC
Description of problem:
     gluster cli commands should provide yaml output

Version-Release number of selected component (if applicable):
	RHGS 3.2
     
Actual results:
	No yaml output
  
Expected results:
# gluster volume status volname --yaml
 
volume: volname
  gluster_process:
    type: 'Brick'
      path: 'nodename1:/rhgs/volname/brick01/fs'
      ports:
        tcp: 49154
        rdma: 0
      online: 'Y'
      pid: 13422
    type: 'Brick'
      path: 'nodename2:/rhgs/volname/brick01/fs'
      ports:
        tcp: 49154
        rdma: 0
      online: 'Y'
      pid: 13415
    ...
    type: 'Self heal'
      node: nodename1
      online: 'Y'
      pid: 23676
    type: 'Self heal'
      node: localhost
      online: 'Y'
      pid: 21519
  tasks:
    '<<Empty>>
     
     
Additional info:

Customer is asking for yaml output since it is good option for programatic access

Comment 3 Raghavendra Talur 2017-06-13 18:34:34 UTC
We do have xml output for programmatic access today, would that work for the customer right now?

Comment 4 Milan Zink 2017-06-14 08:57:58 UTC
Please check GSS case comments. XML output is there, but it has issues & some gluster commands are not supported (--xml switch is ignored).

YAML or JSON will be very nice addition to XML. Ability to use as a source for Ansible dynamic inventory. Easier integration with CloudForms or other mgmt tools.

Converting XML data to JSON/YAML should be very simple only by choosing and adding and using some converter. You can save sysadmins time whie trying to generate some gluster reports for various external dashboards..etc.

It's completely fine to schedule it for Gluster 4.0+.

Comment 5 Atin Mukherjee 2017-06-14 09:19:00 UTC
GlusterD2 will have the json support.


Note You need to log in before you can comment on or make changes to this bug.