Merge lp:~wallyworld/gwacl/cloud-init-fix into lp:gwacl

Proposed by Ian Booth
Status: Merged
Approved by: Ian Booth
Approved revision: 231
Merged at revision: 229
Proposed branch: lp:~wallyworld/gwacl/cloud-init-fix
Merge into: lp:gwacl
Diff against target: 48 lines (+5/-3)
3 files modified
example/management/run.go (+3/-1)
xmlobjects.go (+1/-1)
xmlobjects_test.go (+1/-1)
To merge this branch: bzr merge lp:~wallyworld/gwacl/cloud-init-fix
Reviewer Review Type Date Requested Status
Ian Booth Approve
Review via email: mp+193385@code.launchpad.net

Commit message

This branch tweaks an earlier fix for the Azure API change. It reverts part of that fix and puts a base64 encode operation in the correct place.

Description of the change

This branch tweaks an earlier fix for the Azure API change. It reverts part of that fix and puts a base64 encode operation in the correct place.

To post a comment you must log in.
lp:~wallyworld/gwacl/cloud-init-fix updated
230. By Ian Booth

Reorder import

231. By Ian Booth

Reorder import

Revision history for this message
Ian Booth (wallyworld) wrote :

Self review - revert part of previous fix and add a trivial change to test utility.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'example/management/run.go'
--- example/management/run.go 2013-08-14 13:09:37 +0000
+++ example/management/run.go 2013-10-31 08:08:53 +0000
@@ -10,6 +10,7 @@
10package main10package main
1111
12import (12import (
13 "encoding/base64"
13 "flag"14 "flag"
14 "fmt"15 "fmt"
15 "launchpad.net/gwacl"16 "launchpad.net/gwacl"
@@ -187,8 +188,9 @@
187 password := "Ubuntu123"188 password := "Ubuntu123"
188 username := "ubuntu"189 username := "ubuntu"
189 vhdName := gwacl.MakeRandomDiskName("gwacldisk")190 vhdName := gwacl.MakeRandomDiskName("gwacldisk")
191 userdata := base64.StdEncoding.EncodeToString([]byte("TEST_USER_DATA"))
190 linuxConfigurationSet := gwacl.NewLinuxProvisioningConfigurationSet(192 linuxConfigurationSet := gwacl.NewLinuxProvisioningConfigurationSet(
191 hostname, username, password, "TEST_USER_DATA", "false")193 hostname, username, password, userdata, "false")
192 inputendpoint := gwacl.InputEndpoint{LocalPort: 22, Name: "sshport", Port: 22, Protocol: "TCP"}194 inputendpoint := gwacl.InputEndpoint{LocalPort: 22, Name: "sshport", Port: 22, Protocol: "TCP"}
193 networkConfigurationSet := gwacl.NewNetworkConfigurationSet([]gwacl.InputEndpoint{inputendpoint}, nil)195 networkConfigurationSet := gwacl.NewNetworkConfigurationSet([]gwacl.InputEndpoint{inputendpoint}, nil)
194196
195197
=== modified file 'xmlobjects.go'
--- xmlobjects.go 2013-10-31 02:54:33 +0000
+++ xmlobjects.go 2013-10-31 08:08:53 +0000
@@ -89,7 +89,7 @@
89 Hostname: Hostname,89 Hostname: Hostname,
90 Username: Username,90 Username: Username,
91 Password: Password,91 Password: Password,
92 CustomData: base64.StdEncoding.EncodeToString([]byte(CustomData)),92 CustomData: CustomData,
93 DisableSSHPasswordAuthentication: DisableSSHPasswordAuthentication,93 DisableSSHPasswordAuthentication: DisableSSHPasswordAuthentication,
94 }94 }
95}95}
9696
=== modified file 'xmlobjects_test.go'
--- xmlobjects_test.go 2013-10-31 04:13:46 +0000
+++ xmlobjects_test.go 2013-10-31 08:08:53 +0000
@@ -1322,7 +1322,7 @@
1322 c.Check(config.Hostname, Equals, hostname)1322 c.Check(config.Hostname, Equals, hostname)
1323 c.Check(config.Username, Equals, username)1323 c.Check(config.Username, Equals, username)
1324 c.Check(config.Password, Equals, password)1324 c.Check(config.Password, Equals, password)
1325 c.Check(config.CustomData, Equals, base64.StdEncoding.EncodeToString([]byte(customdata)))1325 c.Check(config.CustomData, Equals, customdata)
1326 c.Check(config.DisableSSHPasswordAuthentication, Equals, disablessh)1326 c.Check(config.DisableSSHPasswordAuthentication, Equals, disablessh)
1327 c.Check(config.ConfigurationSetType, Equals, "LinuxProvisioningConfiguration")1327 c.Check(config.ConfigurationSetType, Equals, "LinuxProvisioningConfiguration")
1328}1328}

Subscribers

People subscribed via source and target branches

to all changes: