Skip to content

Commit cec812a

Browse files
Merge pull request docker-archive-public#3215 from sivel/rackspace-active-timeout
Add --rackspace-active-timeout argument to rackspace driver
2 parents c390ecd + bd5ea7c commit cec812a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

drivers/rackspace/rackspace.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const (
2222
defaultSSHUser = "root"
2323
defaultSSHPort = 22
2424
defaultDockerInstall = "true"
25+
defaultActiveTimeout = 300
2526
)
2627

2728
// GetCreateFlags registers the "machine create" flags recognized by this driver, including
@@ -54,7 +55,7 @@ func (d *Driver) GetCreateFlags() []mcnflag.Flag {
5455
},
5556
mcnflag.StringFlag{
5657
Name: "rackspace-image-id",
57-
Usage: "Rackspace image ID. Default: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)",
58+
Usage: "Rackspace image ID. Default: Ubuntu 15.10 (Wily Werewolf) (PVHVM)",
5859
},
5960
mcnflag.StringFlag{
6061
Name: "rackspace-flavor-id",
@@ -77,6 +78,12 @@ func (d *Driver) GetCreateFlags() []mcnflag.Flag {
7778
Usage: "Set if docker have to be installed on the machine",
7879
Value: defaultDockerInstall,
7980
},
81+
mcnflag.IntFlag{
82+
EnvVar: "OS_ACTIVE_TIMEOUT",
83+
Name: "rackspace-active-timeout",
84+
Usage: "Rackspace active timeout",
85+
Value: defaultActiveTimeout,
86+
},
8087
}
8188
}
8289

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

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

0 commit comments

Comments
 (0)