Skip to content

Commit

Permalink
Merge pull request kubernetes#4354 from simon3z/master
Browse files Browse the repository at this point in the history
ovirt: fix IPAddress lookup implementation
  • Loading branch information
roberthbailey committed Feb 11, 2015
2 parents 0194ed8 + 45bc19b commit 4c4b426
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/cloudprovider/ovirt/ovirt.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ func (v *OVirtCloud) Zones() (cloudprovider.Zones, bool) {
// IPAddress returns the address of a particular machine instance
func (v *OVirtCloud) IPAddress(instance string) (net.IP, error) {
// since the instance now is the IP in the ovirt env, this is trivial no-op
return net.ParseIP(instance), nil
ip, err := net.LookupIP(instance)
if err != nil || len(ip) < 1 {
return nil, fmt.Errorf("cannot find ip address for: %s", instance)
}
return ip[0], nil
}

func getInstancesFromXml(body io.Reader) ([]string, error) {
Expand Down

0 comments on commit 4c4b426

Please sign in to comment.