Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(77)

Delta Between Two Patch Sets: environs/ec2/ec2.go

Issue 6501106: environs: remove VarDir global
Left Patch Set: Created 11 years, 6 months ago
Right Patch Set: environs: remove VarDir global Created 11 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « environs/cloudinit/cloudinit_test.go ('k') | environs/tools.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 package ec2 1 package ec2
2 2
3 import ( 3 import (
4 "fmt" 4 "fmt"
5 "io/ioutil" 5 "io/ioutil"
6 "launchpad.net/goamz/aws" 6 "launchpad.net/goamz/aws"
7 "launchpad.net/goamz/ec2" 7 "launchpad.net/goamz/ec2"
8 "launchpad.net/goamz/s3" 8 "launchpad.net/goamz/s3"
9 "launchpad.net/juju-core/environs" 9 "launchpad.net/juju-core/environs"
10 "launchpad.net/juju-core/environs/cloudinit" 10 "launchpad.net/juju-core/environs/cloudinit"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 return e.startInstance(machineId, info, tools, false, nil) 297 return e.startInstance(machineId, info, tools, false, nil)
298 } 298 }
299 299
300 func (e *environ) userData(machineId int, info *state.Info, tools *state.Tools, master bool, config *config.Config) ([]byte, error) { 300 func (e *environ) userData(machineId int, info *state.Info, tools *state.Tools, master bool, config *config.Config) ([]byte, error) {
301 cfg := &cloudinit.MachineConfig{ 301 cfg := &cloudinit.MachineConfig{
302 Provisioner: master, 302 Provisioner: master,
303 StateServer: master, 303 StateServer: master,
304 StateInfo: info, 304 StateInfo: info,
305 InstanceIdAccessor: "$(curl http://169.254.169.254/1.0/meta-data /instance-id)", 305 InstanceIdAccessor: "$(curl http://169.254.169.254/1.0/meta-data /instance-id)",
306 ProviderType: "ec2", 306 ProviderType: "ec2",
307 » » VarDir: "/var/lib/juju", 307 » » DataDir: "/var/lib/juju",
308 Tools: tools, 308 Tools: tools,
309 MachineId: machineId, 309 MachineId: machineId,
310 AuthorizedKeys: e.ecfg().AuthorizedKeys(), 310 AuthorizedKeys: e.ecfg().AuthorizedKeys(),
311 Config: config, 311 Config: config,
312 } 312 }
313 cloudcfg, err := cloudinit.New(cfg) 313 cloudcfg, err := cloudinit.New(cfg)
314 if err != nil { 314 if err != nil {
315 return nil, err 315 return nil, err
316 } 316 }
317 return cloudcfg.Render() 317 return cloudcfg.Render()
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 } 821 }
822 var data []byte 822 var data []byte
823 data, err = ioutil.ReadAll(resp.Body) 823 data, err = ioutil.ReadAll(resp.Body)
824 if err != nil { 824 if err != nil {
825 continue 825 continue
826 } 826 }
827 return strings.TrimSpace(string(data)), nil 827 return strings.TrimSpace(string(data)), nil
828 } 828 }
829 return 829 return
830 } 830 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b