~themue/juju-core/053-env-more-script-friendly

« back to all changes in this revision

Viewing changes to state/address.go

  • Committer: Martin Packman
  • Date: 2013-07-19 16:50:01 UTC
  • mto: (1489.2.2 openstack_addresses)
  • mto: This revision was merged to the branch mainline in revision 1534.
  • Revision ID: martin.packman@canonical.com-20130719165001-b1ibitb366jsuk68
Address review comments from dimitern and thumper

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
        "launchpad.net/juju-core/instance"
8
8
)
9
9
 
10
 
// Address represents the location of a machine, including metadata about what
 
10
// address represents the location of a machine, including metadata about what
11
11
// kind of location the address describes.
12
 
type Address struct {
 
12
type address struct {
13
13
        value        string
14
14
        addresstype  instance.AddressType
15
15
        networkname  string                `bson:",omitempty"`
16
16
        networkscope instance.NetworkScope `bson:",omitempty"`
17
17
}
18
18
 
19
 
func NewAddress(addr instance.Address) Address {
20
 
        stateaddr := Address{
 
19
func NewAddress(addr instance.Address) address {
 
20
        stateaddr := address{
21
21
                value:        addr.Value,
22
22
                addresstype:  addr.Type,
23
23
                networkname:  addr.NetworkName,
26
26
        return stateaddr
27
27
}
28
28
 
29
 
func (addr *Address) InstanceAddress() instance.Address {
 
29
func (addr *address) InstanceAddress() instance.Address {
30
30
        instanceaddr := instance.Address{
31
31
                Value:        addr.value,
32
32
                Type:         addr.addresstype,