Documentation ¶
Index ¶
- Variables
- func GetArgumentsFromStdin() []string
- func GetClient(c *cli.Context) (*cloudstack.Client, error)
- func GetConfigFilePath(profile string) string
- func GetProfile(c *cli.Context) string
- func PrettyPrint(b []byte)
- func SetLogLevel(c *cli.Context)
- type AccountConfig
- type CommandConfig
- type Config
- type Lister
- type TabWriter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ConfigDir = expandPath(path.Join("~", ".lg")) ConfigFile = "config.yaml" VirtualMachineKeys = []string{ "id", "name", "displayname", "state", "zonename", "templatename", "serviceofferingname", } DefaultConfig = Config{ Account: AccountConfig{ URL: "http://localhost:8080/client/api", Username: "admin", Password: "password", APIKey: "", SecretKey: "", }, Commands: map[string]CommandConfig{ "vm list": CommandConfig{ Options: map[string]interface{}{}, Keys: VirtualMachineKeys, }, "vm start": CommandConfig{ Options: map[string]interface{}{}, Keys: VirtualMachineKeys, }, "vm stop": CommandConfig{ Options: map[string]interface{}{}, Keys: VirtualMachineKeys, }, "vm deploy": CommandConfig{ Options: map[string]interface{}{}, Keys: VirtualMachineKeys, }, "vm destroy": CommandConfig{ Options: map[string]interface{}{}, Keys: VirtualMachineKeys, }, "network list": CommandConfig{ Options: map[string]interface{}{}, Keys: []string{ "id", "name", "networkofferingname", }, }, "firewallrule list": CommandConfig{ Options: map[string]interface{}{}, Keys: []string{ "id", "cidrlist", "protocol", "startport", "endport", "icmpcode", "icmptype", }, }, "portforwardingrule list": CommandConfig{ Options: map[string]interface{}{}, Keys: []string{ "id", "ipaddress", "virtualmachinename", "protocol", "publicport", "publicendport", "privateport", "privateendport", }, }, "serviceoffering list": CommandConfig{ Options: map[string]interface{}{}, Keys: []string{ "id", "name", "cpunumber", "cpuspeed", "memory", }, }, "template list": CommandConfig{ Options: map[string]interface{}{}, Keys: []string{ "id", "name", "displaytext", }, }, "ip list": CommandConfig{ Options: map[string]interface{}{}, Keys: []string{ "id", "zonename", "issourcenat", "ipaddress", }, }, "zone list": CommandConfig{ Options: map[string]interface{}{}, Keys: []string{ "id", "name", }, }, }, } )
Functions ¶
func GetArgumentsFromStdin ¶
func GetArgumentsFromStdin() []string
func GetConfigFilePath ¶
func GetProfile ¶
func PrettyPrint ¶
func PrettyPrint(b []byte)
func SetLogLevel ¶
Types ¶
type AccountConfig ¶
type CommandConfig ¶
type Config ¶
type Config struct { Account AccountConfig `yaml:"account"` Commands map[string]CommandConfig `yaml:"command"` }
func LoadConfig ¶
Click to show internal directories.
Click to hide internal directories.