Skip to content

Commit

Permalink
Merge pull request openshift#143 from pravisankar/expose-node-ip
Browse files Browse the repository at this point in the history
Expose method for getting node IP
  • Loading branch information
Ravi Sankar Penta committed Aug 28, 2015
2 parents 0aa50d6 + 44ed8f6 commit 4fc1cd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ovssubnet/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func NewDefaultController(sub api.SubnetRegistry, hostname string, selfIP string
func NewController(sub api.SubnetRegistry, hostname string, selfIP string, ready chan struct{}) (*OvsController, error) {
if selfIP == "" {
var err error
selfIP, err = getNodeIP(hostname)
selfIP, err = GetNodeIP(hostname)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -507,7 +507,7 @@ func (oc *OvsController) Stop() {
//oc.sig <- struct{}{}
}

func getNodeIP(nodeName string) (string, error) {
func GetNodeIP(nodeName string) (string, error) {
ip := net.ParseIP(nodeName)
if ip == nil {
addrs, err := net.LookupIP(nodeName)
Expand Down

0 comments on commit 4fc1cd1

Please sign in to comment.