Skip to content

Commit

Permalink
Merge pull request #7 from Arubacloud/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
nicolaeusebi committed Mar 9, 2017
2 parents c5d0ec9 + d9c7916 commit 3e669e6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 9 additions & 2 deletions arubacloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ type Driver struct {
Username string
Password string
Endpoint string
ConfigureIPv6 bool

// internal ids
ServerId int
Expand Down Expand Up @@ -109,7 +110,11 @@ func (d *Driver) GetCreateFlags() []mcnflag.Flag {
Usage: "Absolute path of the ssh private key",
Value: "",
},

mcnflag.BoolFlag{
EnvVar: "AC_IPV6",
Name: "ac_ipv6",
Usage: "Configure an IPv6 address for the ArubaCloud VM",
},
}
}

Expand Down Expand Up @@ -147,8 +152,8 @@ func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error {
d.SSHKey = flags.String("ac_ssh_key")
d.Action = flags.String("ac_action")
d.IPAddress = flags.String("ac_ip")

d.SSHUser = "root"
d.ConfigureIPv6 = flags.Bool("ac_ipv6")

return nil
}
Expand Down Expand Up @@ -213,6 +218,7 @@ func (d *Driver) CreateSmart() error {
cloudpackage.PackageID,
template.Id,
key,
d.ConfigureIPv6,
)

if err != nil {
Expand Down Expand Up @@ -356,6 +362,7 @@ func (d *Driver) CreatePro() error {
diskSize,
cpuQuantity,
ramQuantity,
d.ConfigureIPv6,
)

if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions arubacloud_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ func TestConfigFlags(t *testing.T) {
"ac_endpoint": "dc1",
"ac_template": "ubuntu_xx_x",
"ac_size": "Large",
"ac_ipv6": "true",
},
CreateFlags: driver.GetCreateFlags(),
}
Expand All @@ -35,6 +36,7 @@ func TestDefaultConfigFlags(t *testing.T) {
"ac_username": "ARU-xxxx",
"ac_password": "xxxx",
"ac_admin_password": "xxxx",
"ac_ipv6": "true",
},
CreateFlags: driver.GetCreateFlags(),
}
Expand Down

0 comments on commit 3e669e6

Please sign in to comment.