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
1=== modified file 'example/management/run.go'
2--- example/management/run.go 2013-08-14 13:09:37 +0000
3+++ example/management/run.go 2013-10-31 08:08:53 +0000
4@@ -10,6 +10,7 @@
5 package main
6
7 import (
8+ "encoding/base64"
9 "flag"
10 "fmt"
11 "launchpad.net/gwacl"
12@@ -187,8 +188,9 @@
13 password := "Ubuntu123"
14 username := "ubuntu"
15 vhdName := gwacl.MakeRandomDiskName("gwacldisk")
16+ userdata := base64.StdEncoding.EncodeToString([]byte("TEST_USER_DATA"))
17 linuxConfigurationSet := gwacl.NewLinuxProvisioningConfigurationSet(
18- hostname, username, password, "TEST_USER_DATA", "false")
19+ hostname, username, password, userdata, "false")
20 inputendpoint := gwacl.InputEndpoint{LocalPort: 22, Name: "sshport", Port: 22, Protocol: "TCP"}
21 networkConfigurationSet := gwacl.NewNetworkConfigurationSet([]gwacl.InputEndpoint{inputendpoint}, nil)
22
23
24=== modified file 'xmlobjects.go'
25--- xmlobjects.go 2013-10-31 02:54:33 +0000
26+++ xmlobjects.go 2013-10-31 08:08:53 +0000
27@@ -89,7 +89,7 @@
28 Hostname: Hostname,
29 Username: Username,
30 Password: Password,
31- CustomData: base64.StdEncoding.EncodeToString([]byte(CustomData)),
32+ CustomData: CustomData,
33 DisableSSHPasswordAuthentication: DisableSSHPasswordAuthentication,
34 }
35 }
36
37=== modified file 'xmlobjects_test.go'
38--- xmlobjects_test.go 2013-10-31 04:13:46 +0000
39+++ xmlobjects_test.go 2013-10-31 08:08:53 +0000
40@@ -1322,7 +1322,7 @@
41 c.Check(config.Hostname, Equals, hostname)
42 c.Check(config.Username, Equals, username)
43 c.Check(config.Password, Equals, password)
44- c.Check(config.CustomData, Equals, base64.StdEncoding.EncodeToString([]byte(customdata)))
45+ c.Check(config.CustomData, Equals, customdata)
46 c.Check(config.DisableSSHPasswordAuthentication, Equals, disablessh)
47 c.Check(config.ConfigurationSetType, Equals, "LinuxProvisioningConfiguration")
48 }

Subscribers

People subscribed via source and target branches

to all changes: