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

Commit

Permalink
Add --rackspace-active-timeout argument to rackspace driver
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Martz <matt@sivel.net>
  • Loading branch information
sivel committed Mar 21, 2016
1 parent e536ed6 commit bd5ea7c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion drivers/rackspace/rackspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const (
defaultSSHUser = "root"
defaultSSHPort = 22
defaultDockerInstall = "true"
defaultActiveTimeout = 300
)

// GetCreateFlags registers the "machine create" flags recognized by this driver, including
Expand Down Expand Up @@ -54,7 +55,7 @@ func (d *Driver) GetCreateFlags() []mcnflag.Flag {
},
mcnflag.StringFlag{
Name: "rackspace-image-id",
Usage: "Rackspace image ID. Default: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)",
Usage: "Rackspace image ID. Default: Ubuntu 15.10 (Wily Werewolf) (PVHVM)",
},
mcnflag.StringFlag{
Name: "rackspace-flavor-id",
Expand All @@ -77,6 +78,12 @@ func (d *Driver) GetCreateFlags() []mcnflag.Flag {
Usage: "Set if docker have to be installed on the machine",
Value: defaultDockerInstall,
},
mcnflag.IntFlag{
EnvVar: "OS_ACTIVE_TIMEOUT",
Name: "rackspace-active-timeout",
Usage: "Rackspace active timeout",
Value: defaultActiveTimeout,
},
}
}

Expand Down Expand Up @@ -111,6 +118,7 @@ func missingEnvOrOption(setting, envVar, opt string) error {

// SetConfigFromFlags assigns and verifies the command-line arguments presented to the driver.
func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error {
d.ActiveTimeout = flags.Int("rackspace-active-timeout")
d.Username = flags.String("rackspace-username")
d.APIKey = flags.String("rackspace-api-key")
d.Region = flags.String("rackspace-region")
Expand Down

0 comments on commit bd5ea7c

Please sign in to comment.