You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by sv...@apache.org on 2016/10/25 19:19:14 UTC
[1/2] brooklyn-client git commit: Only output location details when
the app has a location
Repository: brooklyn-client
Updated Branches:
refs/heads/master 5dd174649 -> ba2037e06
Only output location details when the app has a location
Fixes https://issues.apache.org/jira/browse/BROOKLYN-230
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-client/commit/bcc13606
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-client/tree/bcc13606
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-client/diff/bcc13606
Branch: refs/heads/master
Commit: bcc1360690cefb4b677a9556117e6d3400dac71d
Parents: ff8224c
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Authored: Mon Oct 24 17:40:53 2016 +0100
Committer: Sam Corbett <sa...@cloudsoftcorp.com>
Committed: Mon Oct 24 17:40:53 2016 +0100
----------------------------------------------------------------------
cli/commands/application.go | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/bcc13606/cli/commands/application.go
----------------------------------------------------------------------
diff --git a/cli/commands/application.go b/cli/commands/application.go
index c321227..4156cb8 100644
--- a/cli/commands/application.go
+++ b/cli/commands/application.go
@@ -79,10 +79,6 @@ func (cmd *Application) show(appName string) {
if nil != err {
error_handler.ErrorExit(err)
}
- location, err := locations.GetLocation(cmd.network, application.Spec.Locations[0])
- if nil != err {
- error_handler.ErrorExit(err)
- }
table := terminal.NewTable([]string{"Id:", application.Id})
table.Add("Name:", application.Spec.Name)
table.Add("Status:", string(application.Status))
@@ -91,10 +87,16 @@ func (cmd *Application) show(appName string) {
}
table.Add("Type:", application.Spec.Type)
table.Add("CatalogItemId:", entity.CatalogItemId)
- table.Add("LocationId:", strings.Join(application.Spec.Locations, ", "))
- table.Add("LocationName:", location.Name)
- table.Add("LocationSpec:", location.Spec)
- table.Add("LocationType:", location.Type)
+ if len(application.Spec.Locations) > 0 {
+ table.Add("LocationId:", strings.Join(application.Spec.Locations, ", "))
+ location, err := locations.GetLocation(cmd.network, application.Spec.Locations[0])
+ if nil != err {
+ error_handler.ErrorExit(err)
+ }
+ table.Add("LocationName:", location.Name)
+ table.Add("LocationSpec:", location.Spec)
+ table.Add("LocationType:", location.Type)
+ }
table.Print()
}
[2/2] brooklyn-client git commit: Closes #30
Posted by sv...@apache.org.
Closes #30
br app only outputs location details when the app has a location
Fixes https://issues.apache.org/jira/browse/BROOKLYN-230.
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-client/commit/ba2037e0
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-client/tree/ba2037e0
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-client/diff/ba2037e0
Branch: refs/heads/master
Commit: ba2037e067f4b5230c0d5c8a2740df903ad726f5
Parents: 5dd1746 bcc1360
Author: Svetoslav Neykov <sv...@neykov.name>
Authored: Tue Oct 25 22:18:40 2016 +0300
Committer: Svetoslav Neykov <sv...@neykov.name>
Committed: Tue Oct 25 22:18:40 2016 +0300
----------------------------------------------------------------------
cli/commands/application.go | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/ba2037e0/cli/commands/application.go
----------------------------------------------------------------------