Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Commit

Permalink
Add several EnvVars and a default region for Rackspace driver
Browse files Browse the repository at this point in the history
Signed-off-by: Tao Wang <twang2218@gmail.com>
  • Loading branch information
twang2218 committed Nov 24, 2016
1 parent bb37dc7 commit f5e9381
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions drivers/rackspace/rackspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type Driver struct {
}

const (
defaultRegionName = "IAD"
defaultEndpointType = "publicURL"
defaultFlavorID = "general1-1"
defaultSSHUser = "root"
Expand Down Expand Up @@ -45,7 +46,7 @@ func (d *Driver) GetCreateFlags() []mcnflag.Flag {
EnvVar: "OS_REGION_NAME",
Name: "rackspace-region",
Usage: "Rackspace region name",
Value: "",
Value: defaultRegionName,
},
mcnflag.StringFlag{
EnvVar: "OS_ENDPOINT_TYPE",
Expand All @@ -54,24 +55,27 @@ func (d *Driver) GetCreateFlags() []mcnflag.Flag {
Value: defaultEndpointType,
},
mcnflag.StringFlag{
Name: "rackspace-image-id",
Usage: "Rackspace image ID. Default: Ubuntu 15.10 (Wily Werewolf) (PVHVM)",
EnvVar: "OS_IMAGE_ID",
Name: "rackspace-image-id",
Usage: "Rackspace image ID. Default: Ubuntu 15.10 (Wily Werewolf) (PVHVM)",
},
mcnflag.StringFlag{
EnvVar: "OS_FLAVOR_ID",
Name: "rackspace-flavor-id",
Usage: "Rackspace flavor ID. Default: General Purpose 1GB",
Value: defaultFlavorID,
EnvVar: "OS_FLAVOR_ID",
},
mcnflag.StringFlag{
Name: "rackspace-ssh-user",
Usage: "SSH user for the newly booted machine. Set to root by default",
Value: defaultSSHUser,
EnvVar: "OS_SSH_USER",
Name: "rackspace-ssh-user",
Usage: "SSH user for the newly booted machine. Set to root by default",
Value: defaultSSHUser,
},
mcnflag.IntFlag{
Name: "rackspace-ssh-port",
Usage: "SSH port for the newly booted machine. Set to 22 by default",
Value: defaultSSHPort,
EnvVar: "OS_SSH_PORT",
Name: "rackspace-ssh-port",
Usage: "SSH port for the newly booted machine. Set to 22 by default",
Value: defaultSSHPort,
},
mcnflag.StringFlag{
Name: "rackspace-docker-install",
Expand Down

0 comments on commit f5e9381

Please sign in to comment.