Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
Update etcd-manager/pkg/volumes/openstack/util.go
Browse files Browse the repository at this point in the history
cleverer

Co-authored-by: Ciprian Hacman <[email protected]>
  • Loading branch information
ederst and hakman authored Mar 14, 2023
1 parent 53b8d17 commit 736f4b6
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions etcd-manager/pkg/volumes/openstack/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,10 @@ func GetServerFixedIP(addrs map[string]interface{}, name string, networkCIDR *ne
if addrType, ok := addrMap[openstackExternalIPType]; ok && addrType == openstackAddressFixed {
if fixedIP, ok := addrMap[openstackAddress]; ok {
if fixedIPStr, ok := fixedIP.(string); ok {
if networkCIDR != nil {
if networkCIDR.Contains(net.ParseIP(fixedIPStr)) {
return fixedIPStr, nil
}
} else {
return fixedIPStr, nil
if networkCIDR != nil && !networkCIDR.Contains(net.ParseIP(fixedIPStr)) {
continue
}
return fixedIPStr, nil
}
}
}
Expand Down

0 comments on commit 736f4b6

Please sign in to comment.