func nodeContainerList(w http.ResponseWriter, r *http.Request, t auth.Token) error {
	pools, err := permission.ListContextValues(t, permission.PermNodecontainerRead, true)
	if err != nil {
		return err
	}
	lst, err := nodecontainer.AllNodeContainers()
	if err != nil {
		return err
	}
	if pools != nil {
		poolMap := map[string]struct{}{}
		for _, p := range pools {
			poolMap[p] = struct{}{}
		}
		for i, entry := range lst {
			for poolName := range entry.ConfigPools {
				if poolName == "" {
					continue
				}
				if _, ok := poolMap[poolName]; !ok {
					delete(entry.ConfigPools, poolName)
				}
			}
			lst[i] = entry
		}
	}
	w.Header().Set("Content-Type", "application/json")
	return json.NewEncoder(w).Encode(lst)
}
func nodeContainerList(w http.ResponseWriter, r *http.Request, t auth.Token) error {
	pools, err := permission.ListContextValues(t, permission.PermNodecontainerRead, true)
	if err != nil {
		return err
	}
	lst, err := nodecontainer.AllNodeContainers()
	if err != nil {
		return err
	}
	if pools != nil {
		poolMap := map[string]struct{}{}
		for _, p := range pools {
			poolMap[p] = struct{}{}
		}
		for i, entry := range lst {
			for poolName := range entry.ConfigPools {
				if poolName == "" {
					continue
				}
				if _, ok := poolMap[poolName]; !ok {
					delete(entry.ConfigPools, poolName)
				}
			}
			lst[i] = entry
		}
	}
	w.Header().Set("Content-Type", "application/json")
	return json.NewEncoder(w).Encode(lst)
}
func nodeContainerList ( w http . ResponseWriter , r * http . Request , t auth . Token ) error { pools , err := permission . ListContextValues ( t , permission . PermNodecontainerRead , true ) if err != nil { return err } lst , err := nodecontainer . AllNodeContainers ( ) if err != nil { return err } if pools != nil { poolMap := map [ string ] struct { } { } for _ , p := range pools { poolMap [ p ] = struct { } { } } for i , entry := range lst { for poolName := range entry . ConfigPools { if poolName == " " { continue } if _ , ok := poolMap [ poolName ] ; ! ok { delete ( entry . ConfigPools , poolName ) } } lst [ i ] = entry } } w . Header ( ) . Set ( " " , " " ) return json . NewEncoder ( w ) . Encode ( lst ) }
// title: remove node container list
// path: /docker/nodecontainers
// method: GET
// produce: application/json
// responses:
//   200: Ok
//   401: Unauthorized
title : remove node container list path : / docker / nodecontainers method : GET produce : application / json responses : 200 : Ok 401 : Unauthorized