mirror of https://github.com/docker/docs.git
Merge pull request #1100 from hairyhenderson/softlayer-getip-private-fix-1099
Fixing bug in GetIP where Public IP would always be returned
This commit is contained in:
commit
cab881ee16
|
@ -275,8 +275,12 @@ func (d *Driver) GetIP() (string, error) {
|
||||||
if d.IPAddress != "" {
|
if d.IPAddress != "" {
|
||||||
return d.IPAddress, nil
|
return d.IPAddress, nil
|
||||||
}
|
}
|
||||||
|
if d.deviceConfig.PrivateNet {
|
||||||
|
return d.getClient().VirtualGuest().GetPrivateIp(d.Id)
|
||||||
|
} else {
|
||||||
return d.getClient().VirtualGuest().GetPublicIp(d.Id)
|
return d.getClient().VirtualGuest().GetPublicIp(d.Id)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (d *Driver) GetState() (state.State, error) {
|
func (d *Driver) GetState() (state.State, error) {
|
||||||
s, err := d.getClient().VirtualGuest().PowerState(d.Id)
|
s, err := d.getClient().VirtualGuest().PowerState(d.Id)
|
||||||
|
|
Loading…
Reference in New Issue