/* Copyright 2015 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package main import ( "github.com/ghodss/yaml" "github.com/kubernetes/deployment-manager/expandybird/expander" "github.com/kubernetes/deployment-manager/manager/manager" "github.com/kubernetes/deployment-manager/registry" "bytes" "encoding/json" "flag" "fmt" "io" "io/ioutil" "log" "net/http" "net/url" "os" "strconv" "strings" "time" ) var ( // 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") binary = flag.String("binary", "../expandybird/expansion/expansion.py", "Path to template expansion binary") ) 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 [] ( | | (