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,7 +275,11 @@ func (d *Driver) GetIP() (string, error) {
|
|||
if d.IPAddress != "" {
|
||||
return d.IPAddress, nil
|
||||
}
|
||||
return d.getClient().VirtualGuest().GetPublicIp(d.Id)
|
||||
if d.deviceConfig.PrivateNet {
|
||||
return d.getClient().VirtualGuest().GetPrivateIp(d.Id)
|
||||
} else {
|
||||
return d.getClient().VirtualGuest().GetPublicIp(d.Id)
|
||||
}
|
||||
}
|
||||
|
||||
func (d *Driver) GetState() (state.State, error) {
|
||||
|
|
Loading…
Reference in New Issue