func FindAvailableHostFromCidr(namespace, cidr string) (string, error) {
	for x := range Manager {
		if Manager[x].namespace == namespace {
			if Manager[x].cidr != cidr {
				ah, err := buildHostsFromCidr(cidr)
				if err != nil {
					return "", err
				}
				Manager[x].hosts = ah
			}
			for y := range Manager[x].hosts {
				if Manager[x].addressManager[Manager[x].hosts[y]] == false {
					Manager[x].addressManager[Manager[x].hosts[y]] = true
					return Manager[x].hosts[y], nil
				}
			}
			return "", fmt.Errorf("No addresses available in [%s] range [%s]", namespace, cidr)
		}
	}
	ah, err := buildHostsFromCidr(cidr)
	if err != nil {
		return "", err
	}
	newManager := ipManager{
		namespace:      namespace,
		addressManager: make(map[string]bool),
		hosts:          ah,
		cidr:           cidr,
	}
	Manager = append(Manager, newManager)
	for x := range newManager.hosts {
		if Manager[x].addressManager[newManager.hosts[x]] == false {
			Manager[x].addressManager[newManager.hosts[x]] = true
			return newManager.hosts[x], nil
		}
	}
	return "", fmt.Errorf("No addresses available in [%s] range [%s]", namespace, cidr)
}
FindAvailableHostFromCidr - will look through the cidr and the address Manager and find a free address (if possible)
package ipam
import (
	"fmt"
	"net"
	"strings"
	"k8s.io/klog"
)
var Manager []ipManager
type ipManager struct {
	namespace      string
	cidr           string
	ipRange        string
	addressManager map[string]bool
	hosts          []string
}
func FindAvailableHostFromRange(namespace, ipRange string) (string, error) {
	for x := range Manager {
		if Manager[x].namespace == namespace {
			if Manager[x].ipRange != ipRange {
				ah, err := buildHostsFromRange(ipRange)
				if err != nil {
					return "", err
				}
				Manager[x].hosts = ah
			}
			for y := range Manager[x].hosts {
				if Manager[x].addressManager[Manager[x].hosts[y]] == false {
					Manager[x].addressManager[Manager[x].hosts[y]] = true
					return Manager[x].hosts[y], nil
				}
			}
			return "", fmt.Errorf("No addresses available in [%s] range [%s]", namespace, ipRange)
		}
	}
	ah, err := buildHostsFromRange(ipRange)
	if err != nil {
		return "", err
	}
	newManager := ipManager{
		namespace:      namespace,
		addressManager: make(map[string]bool),
		hosts:          ah,
		ipRange:        ipRange,
	}
	Manager = append(Manager, newManager)
	for x := range newManager.hosts {
		if Manager[x].addressManager[newManager.hosts[x]] == false {
			Manager[x].addressManager[newManager.hosts[x]] = true
			return newManager.hosts[x], nil
		}
	}
	return "", fmt.Errorf("No addresses available in [%s] range [%s]", namespace, ipRange)
}