cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF Subversion and Git Services" <asf...@urd.zones.apache.org>
Subject Re: Review Request: Improvement CLOUDSTACK-1875: add JSON output to cloudmonkey
Date Tue, 09 Apr 2013 22:48:56 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10275/#review18901
-----------------------------------------------------------


Commit c75b11d13a49065554d492d5ed2fafc6bff9493e in branch refs/heads/affinity_groups from
Rohit Yadav <bhaisaab@apache.org>
[ 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 <grudzien@gmail.com>


- ASF Subversion and Git Services


On April 4, 2013, 2:01 p.m., Justin Grudzien wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/10275/
> -----------------------------------------------------------
> 
> (Updated April 4, 2013, 2:01 p.m.)
> 
> 
> Review request for cloudstack and Rohit Yadav.
> 
> 
> Description
> -------
> 
> 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.
> 
> 
> This addresses bug CLOUDSTACK-1875.
> 
> 
> Diffs
> -----
> 
>   tools/cli/cloudmonkey/cloudmonkey.py 94006c9 
>   tools/cli/cloudmonkey/config.py 75605df 
> 
> Diff: https://reviews.apache.org/r/10275/diff/
> 
> 
> Testing
> -------
> 
> [ui]
> color = true
> prompt = > 
> tabularize = false
> display = json
> 
> $ python cloudmonkey.py list networks filter=name
> 
> tabularize config parameter is deprecated: please switch to display = [default,json,tabularize]
> 
> {
>   "count": 2,
>   "network": [
>     {
>       "name": "admin-network"
>     },
>     {
>       "name": "GuestNetwork82"
>     }
>   ]
> }
> 
> 
> $ python cloudmonkey.py list networkofferings filter=name
> 
> tabularize config parameter is deprecated: please switch to display = [default,json,tabularize]
> 
> {
>   "count": 8,
>   "networkoffering": [
>     {
>       "name": "DefaultSharedNetworkOfferingWithSGService"
>     },
>     {
>       "name": "DefaultSharedNetworkOffering"
>     },
>     {
>       "name": "DefaultIsolatedNetworkOfferingWithSourceNatService"
>     },
>     {
>       "name": "DefaultIsolatedNetworkOffering"
>     },
>     {
>       "name": "DefaultSharedNetscalerEIPandELBNetworkOffering"
>     },
>     {
>       "name": "DefaultIsolatedNetworkOfferingForVpcNetworks"
>     },
>     {
>       "name": "DefaultIsolatedNetworkOfferingForVpcNetworksNoLB"
>     },
>     {
>       "name": "Test Network Offering"
>     }
>   ]
> }
> 
> 
> Thanks,
> 
> Justin Grudzien
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message