brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [05/19] brooklyn-client git commit: Do add-catalog as catalog add
Date Tue, 25 Oct 2016 19:10:59 GMT
Do add-catalog as catalog add


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-client/commit/26347017
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-client/tree/26347017
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-client/diff/26347017

Branch: refs/heads/master
Commit: 26347017aa2076933da1a32d6be7e3cf7ce4f6ce
Parents: 72355dd
Author: Geoff Macartney <geoff.macartney@cloudsoftcorp.com>
Authored: Thu Oct 13 20:25:56 2016 +0100
Committer: Geoff Macartney <geoff.macartney@cloudsoftcorp.com>
Committed: Thu Oct 13 20:25:56 2016 +0100

----------------------------------------------------------------------
 cli/command_factory/factory.go | 1 -
 cli/commands/add-catalog.go    | 4 ++--
 cli/commands/catalog.go        | 4 ++++
 3 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/26347017/cli/command_factory/factory.go
----------------------------------------------------------------------
diff --git a/cli/command_factory/factory.go b/cli/command_factory/factory.go
index 399014f..b225b2c 100644
--- a/cli/command_factory/factory.go
+++ b/cli/command_factory/factory.go
@@ -51,7 +51,6 @@ func NewFactory(network *net.Network, config *io.Config) (factory concreteFactor
 	factory.simpleCommand(commands.NewActivityStreamStderr(network))
 	factory.simpleCommand(commands.NewActivityStreamStdin(network))
 	factory.simpleCommand(commands.NewActivityStreamStdout(network))
-	factory.simpleCommand(commands.NewAddCatalog(network))
 	factory.simpleCommand(commands.NewAddChildren(network))
 	factory.simpleCommand(commands.NewApplication(network))
 	//factory.simpleCommand(commands.NewApplications(network))

http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/26347017/cli/commands/add-catalog.go
----------------------------------------------------------------------
diff --git a/cli/commands/add-catalog.go b/cli/commands/add-catalog.go
index 9a29328..d6ceba7 100644
--- a/cli/commands/add-catalog.go
+++ b/cli/commands/add-catalog.go
@@ -40,9 +40,9 @@ func NewAddCatalog(network *net.Network) (cmd *AddCatalog) {
 
 func (cmd *AddCatalog) Metadata() command_metadata.CommandMetadata {
 	return command_metadata.CommandMetadata{
-		Name:        "add-catalog",
+		Name:        "add",
 		Description: "* Add a new catalog item from the supplied YAML (a file or http URL)",
-		Usage:       "BROOKLYN_NAME add-catalog ( FILEPATH | URL )",
+		Usage:       "BROOKLYN_NAME catalog add ( FILEPATH | URL )",
 		Flags:       []cli.Flag{},
 	}
 }

http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/26347017/cli/commands/catalog.go
----------------------------------------------------------------------
diff --git a/cli/commands/catalog.go b/cli/commands/catalog.go
index c197c21..1a870b6 100644
--- a/cli/commands/catalog.go
+++ b/cli/commands/catalog.go
@@ -39,16 +39,19 @@ func NewCatalog(network *net.Network) (cmd *Catalog) {
 	cmd.network = network
 	cmd.catalogCommands = map[string]command.Command {
 		ListCatalogCommand: NewCatalogList(cmd.network),
+		AddCatalogCommand: NewAddCatalog(cmd.network),
 		DeleteCatalogCommand: NewDeleteCatalogApplication(cmd.network),
 	}
 	return
 }
 
 const ListCatalogCommand = "list"
+const AddCatalogCommand = "add"
 const DeleteCatalogCommand = "delete"
 
 var catalogCommands = []string{
 	ListCatalogCommand,
+	AddCatalogCommand,
 	DeleteCatalogCommand,
 }
 var catalogCommandsUsage = strings.Join(catalogCommands, " | ")
@@ -69,6 +72,7 @@ func (cmd *Catalog) Metadata() command_metadata.CommandMetadata {
 		Flags:       []cli.Flag{},
 		Operands:    []command_metadata.CommandMetadata{
 			cmd.SubCommand(ListCatalogCommand).Metadata(),
+			cmd.SubCommand(AddCatalogCommand).Metadata(),
 			cmd.SubCommand(DeleteCatalogCommand).Metadata(),
 		},
 	}


Mime
View raw message