[
https://issues.apache.org/jira/browse/CLOUDSTACK-1875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13627218#comment-13627218
]
ASF subversion and git services commented on CLOUDSTACK-1875:
-------------------------------------------------------------
Commit c75b11d13a49065554d492d5ed2fafc6bff9493e in branch
refs/heads/affinity_groups from [~grudzien]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=c75b11d ]
CLOUDSTACK-1875: add JSON output to cloudmonkey
Added
1. display = [default|json|tabularize] has been added in the config to replace
tabularize = [true|false]
2. tabularize is deprecated but we will still set it as "false" once the user
removes it out of their config to avoid throwing an error. This will be removed
in the next major version.
3. display = "default" is added to the [ui] section of the config if it is not
present.
4. You can now output JSON formatted text by setting the config display = json
5. You can now filter text in JSON output mode. (i.e. list users
account=grudzien filter=account,id,email). Filtered output returns a properly
formatted JSON document.
Removed
1. Removed the printing of attr keys in read_config().
Deprecated
1. tabularize = [true|false] is now messaged as deprecated.
Signed-off-by: Justin Grudzien <[email protected]>
> Add JSON output into cloudmonkey
> --------------------------------
>
> Key: CLOUDSTACK-1875
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-1875
> Project: CloudStack
> Issue Type: Improvement
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Cloudmonkey
> Affects Versions: 4.1.0, Future
> Reporter: Justin Grudzien
> Assignee: Justin Grudzien
> Priority: Minor
> Labels: newbie, patch
> Original Estimate: 504h
> Remaining Estimate: 504h
>
> Data in JSON format is very easy to read for large data sets. Presently,
> cloudmonkey supports tabular or line based output and looking at large output
> tends to be problematic. By adding JSON output with filtering, a user can
> more easily process and consume data. The following items should make
> cloudmonkey data more easily consumable:
> 1. Need to format empty return messages with proper JSON messaging.
> 2. Need to standardize JSON output messaging.
> A. Add return code [Error|Success] to all calls.
> B. Add called API verb.
> 3. Count is not decreased in output set when filtering completely eliminates
> a result.
> 4. JSON printing needs to be implemented manually to support colors. Right
> now json.dumps() pretty prints the output and changing the keys to support
> colors is problematic.
> 5. Color tagging needs to be added to JSON printing.
> 6. Error messages need to have proper JSON formatting.
> 7. Make color a passable option to a command instead of a config parameter.
> (i.e. list users account=grudzien color=true)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira