mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-24 08:51:40 -04:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
## 0.3.7 (unreleased)
|
||||
|
||||
IMPROVEMENTS:
|
||||
|
||||
* builder/openstack: Can now specify a project. [GH-382]
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
* command/inspect: Fix weird output for default values for optional vars.
|
||||
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
type AccessConfig struct {
|
||||
Username string `mapstructure:"username"`
|
||||
Password string `mapstructure:"password"`
|
||||
Project string `mapstructure:"project"`
|
||||
Provider string `mapstructure:"provider"`
|
||||
RawRegion string `mapstructure:"region"`
|
||||
}
|
||||
@@ -20,6 +21,7 @@ type AccessConfig struct {
|
||||
func (c *AccessConfig) Auth() (gophercloud.AccessProvider, error) {
|
||||
username := c.Username
|
||||
password := c.Password
|
||||
project := c.Project
|
||||
provider := c.Provider
|
||||
|
||||
if username == "" {
|
||||
@@ -28,6 +30,9 @@ func (c *AccessConfig) Auth() (gophercloud.AccessProvider, error) {
|
||||
if password == "" {
|
||||
password = os.Getenv("SDK_PASSWORD")
|
||||
}
|
||||
if project == "" {
|
||||
project = os.Getenv("SDK_PROJECT")
|
||||
}
|
||||
if provider == "" {
|
||||
provider = os.Getenv("SDK_PROVIDER")
|
||||
}
|
||||
@@ -38,6 +43,10 @@ func (c *AccessConfig) Auth() (gophercloud.AccessProvider, error) {
|
||||
AllowReauth: true,
|
||||
}
|
||||
|
||||
if project != "" {
|
||||
authoptions.TenantName = project
|
||||
}
|
||||
|
||||
return gophercloud.Authenticate(provider, authoptions)
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,9 @@ Required:
|
||||
|
||||
Optional:
|
||||
|
||||
* `project` (string) - The project name to boot the instance into. Some
|
||||
OpenStack installations require this. By default this is empty.
|
||||
|
||||
* `ssh_port` (int) - The port that SSH will be available on. Defaults to port
|
||||
22.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user