tsuru/tsuru-client — pull request #3 by msabramo (2014-11-07 20:21:10+00:00)
Title: Add --output-format option to app-info command

E.g.:

$ tsuru app-info --help
Usage of :
-a, --app (= "")
The name of the app.
--output-format (= "")
Output to format (e.g.: "normal", "json", "prettyjson")

$ tsuru app-info --output-format=json
{"cname":[],"deploys":1,"ip":"tsuru-dashboard.10.128.40.70.xip.io",
"name":"tsuru-dashboard","owner":"marca@mycompany.com",
"plan":{"name":"autogenerated","memory":0,"swap":0,"cpushare":100},
"platform":"python","ready":true,
"repository":"git@tsuru.corp.mycompany.com:tsuru-dashboard.git",
"teamowner":"admin","teams":["admin","devops"],
"units":[{"Name":"d0a8595dd4ebbc15558e04fe33a74c9cc462e5551c03981d91a0006ce33f1962",
"AppName":"tsuru-dashboard","Type":"python","Ip":"10.128.40.73",
"Status":"started"}]}

$ tsuru app-info --output-format=prettyjson
{
"Ip": "tsuru-dashboard.10.128.40.70.xip.io",
"CName": [],
"Name": "tsuru-dashboard",
"Platform": "python",
"Repository": "git@tsuru.corp.mycompany.com:tsuru-dashboard.git",
"Teams": [
"admin",
"devops"
],
"Units": [
{
"Name":
"d0a8595dd4ebbc15558e04fe33a74c9cc462e5551c03981d91a0006ce33f1962",
"Ip": "10.128.40.73",
"Status": "started"
}
],
"Ready": true,
"Owner": "marca@mycompany.com",
"TeamOwner": "admin",
"Deploys": 1
}

Cc: @fsouza, @jblancett