brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [11/19] brooklyn-client git commit: Make args singular for nicer syntax of delete command.
Date Tue, 25 Oct 2016 19:11:05 GMT
Make args singular for nicer syntax of delete command.


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

Branch: refs/heads/master
Commit: 38083744ffed5b875881484c8a25d7a882de7d6f
Parents: baa2801
Author: Geoff Macartney <geoff.macartney@cloudsoftcorp.com>
Authored: Mon Oct 24 14:35:27 2016 +0100
Committer: Geoff Macartney <geoff.macartney@cloudsoftcorp.com>
Committed: Mon Oct 24 14:35:27 2016 +0100

----------------------------------------------------------------------
 cli/commands/catalog-delete.go |  2 +-
 cli/commands/catalog.go        | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/38083744/cli/commands/catalog-delete.go
----------------------------------------------------------------------
diff --git a/cli/commands/catalog-delete.go b/cli/commands/catalog-delete.go
index 443f550..77bb078 100644
--- a/cli/commands/catalog-delete.go
+++ b/cli/commands/catalog-delete.go
@@ -44,7 +44,7 @@ func (cmd *DeleteCatalogItem) Metadata() command_metadata.CommandMetadata
{
 		Name:        "delete",
 		Description: "delete the given catalog item",
 		Usage:       "BROOKLYN_NAME catalog  " + deleteCommandName +
-			" TYPE [ITEM_ID:VERSION] (where TYPE is one of applications, locations, entities, policies,
may be abbreviated)",
+			" TYPE [ITEM_ID:VERSION] (where TYPE is one of application, location, entity, policy,
may be abbreviated)",
 	}
 }
 

http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/38083744/cli/commands/catalog.go
----------------------------------------------------------------------
diff --git a/cli/commands/catalog.go b/cli/commands/catalog.go
index 86073a6..117dcb7 100644
--- a/cli/commands/catalog.go
+++ b/cli/commands/catalog.go
@@ -65,17 +65,17 @@ const  (
 	LocationsItemType
 	PoliciesItemType
 )
-const catalogItemTypesUsage = " ( applications | entities | locations | policies )"
+const catalogItemTypesUsage = " ( application | entity | location | policy )"
 
 func GetCatalogType(c *cli.Context) (CatalogItemType, error) {
 	commandType := c.Args().First()
-	if strings.HasPrefix("entities", commandType) {
+	if strings.HasPrefix("entity", commandType) {
 		return EntitiesItemType, nil
-	} else if strings.HasPrefix("locations", commandType) {
+	} else if strings.HasPrefix("location", commandType) {
 		return LocationsItemType, nil
-	} else if strings.HasPrefix("policies", commandType) {
+	} else if strings.HasPrefix("policy", commandType) {
 		return PoliciesItemType, nil
-	} else if strings.HasPrefix("applications", commandType) {
+	} else if strings.HasPrefix("application", commandType) {
 		return ApplicationsItemType, nil
 	}
 	return Unknown, errors.New("Unknown type: " + commandType)


Mime
View raw message