code: func (n *network) convertToOverlayEndpoint(v *hcsshim.HNSEndpoint) *endpoint {
  	ep := &endpoint{
  		id:        v.Name,
  		profileID: v.Id,
  		nid:       n.id,
  		remote:    v.IsRemoteEndpoint,
  	}
  
  	mac, err := net.ParseMAC(v.MacAddress)
  
  	if err != nil {
  		return nil
  	}
  
  	ep.mac = mac
  	ep.addr = &net.IPNet{
  		IP:   v.IPAddress,
  		Mask: net.CIDRMask(32, 32),
  	}
  
  	return ep
  }
docs: // func (n *network) restoreNetworkEndpoints() error {
  // 	logrus.Infof("Restoring endpoints for overlay network: %s", n.id)
  // 	hnsresponse, err := hcsshim.HNSListEndpointRequest("GET", "", "")
  // 	if err != nil {
  // 		return err
  // 	}
  // 	for _, endpoint := range hnsresponse {
  // 		if endpoint.VirtualNetwork != n.hnsID {
  // 			continue
  // 		}
  // 		ep := n.convertToOverlayEndpoint(&endpoint)
  // 		if ep != nil {
  // 			logrus.Debugf("Restored endpoint:%s Remote:%t", ep.id, ep.remote)
  // 			n.addEndpoint(ep)
  // 		}
  // 	}
  // 	return nil
  // }