~rogpeppe/juju-core/438-local-instance-Addresses

« back to all changes in this revision

Viewing changes to provider/local/instance.go

  • Committer: Roger Peppe
  • Date: 2013-10-03 12:13:10 UTC
  • Revision ID: roger.peppe@canonical.com-20131003121310-k8i39mtvc5ch838p
local: implement Instance.Addresses

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
}
29
29
 
30
30
func (inst *localInstance) Addresses() ([]instance.Address, error) {
31
 
        logger.Errorf("localInstance.Addresses not implemented")
32
 
        return nil, nil
 
31
        dnsName, err := inst.DNSName()
 
32
        if err != nil {
 
33
                return nil, err
 
34
        }
 
35
        return []instance.Address{{
 
36
                Type:         instance.HostName,
 
37
                Value:        dnsName,
 
38
                NetworkScope: instance.NetworkCloudLocal,
 
39
        }}, nil
33
40
}
34
41
 
35
42
// DNSName implements instance.Instance.DNSName.