From 2999bb9b4cee54a921a3e64eb08d5d419ce2399d Mon Sep 17 00:00:00 2001 From: jackgr Date: Sun, 8 Nov 2015 17:08:44 -0800 Subject: [PATCH] Final changes for porcelain client. --- dm/dm.go | 163 +++++++++++++++++++++-------------- examples/bootstrap/README.md | 7 +- examples/guestbook/README.md | 8 +- 3 files changed, 109 insertions(+), 69 deletions(-) diff --git a/dm/dm.go b/dm/dm.go index ac13237b0..812a40e56 100644 --- a/dm/dm.go +++ b/dm/dm.go @@ -36,18 +36,39 @@ import ( ) var ( - action = flag.String("action", "deploy", "expand | deploy | list | get | delete | update | list-types | list-instances | types") - name = flag.String("name", "", "Name of template or deployment") + // TODO(jackgr): Implement reading a template from stdin + //stdin = flag.Bool("stdin", false, "Reads a template from the standard input") + properties = flag.String("properties", "", "Properties to use when deploying a type (e.g., --properties k1=v1,k2=v2)") + type_registry = flag.String("registry", "kubernetes/deployment-manager", "Github based type registry [owner/repo]") service = flag.String("service", "http://localhost:8001/api/v1/proxy/namespaces/default/services/manager-service:manager", "URL for deployment manager") - type_registry = flag.String("registry", "kubernetes/deployment-manager", "Type registry [owner/repo], defaults to kubernetes/deployment-manager") binary = flag.String("binary", "../expandybird/expansion/expansion.py", "Path to template expansion binary") - properties = flag.String("properties", "", "Properties to use when deploying a type (e.g., --properties k1=v1,k2=v2)") ) +var commands = []string{ + "expand \t\t\t Expands the supplied template(s)", + "deploy \t\t\t Deploys the supplied type or template(s)", + "list \t\t\t Lists the deployments in the cluster", + "get \t\t\t Retrieves the supplied deployment", + "delete \t\t\t Deletes the supplied deployment", + "update \t\t\t Updates a deployment using the supplied template(s)", + "deployed-types \t\t Lists the types deployed in the cluster", + "deployed-instances \t Lists the instances of the supplied type deployed in the cluster", + "types \t\t\t Lists the types in the current registry", + "describe \t\t Describes the supplied type in the current registry", +} + var usage = func() { - message := "usage: %s [] (name | (