~rogpeppe/juju-core/azure

« back to all changes in this revision

Viewing changes to environs/cloudinit/cloudinit.go

[r=gz] Check correct info attr in cloudinit.apiHostAddrs

Fixes a copy/paste error in cloudinit.MachineConfig to agent.Conf
conversion helper function. No test as the only codepath that uses
this goes through verifyConfig which already asserts both StateInfo
and APIInfo are not nil, so not possible to write a failing test
using exposed functions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
337
337
        if cfg.StateServer {
338
338
                hosts = append(hosts, fmt.Sprintf("localhost:%d", cfg.APIPort))
339
339
        }
340
 
        if cfg.StateInfo != nil {
 
340
        if cfg.APIInfo != nil {
341
341
                hosts = append(hosts, cfg.APIInfo.Addrs...)
342
342
        }
343
343
        return hosts