Merge pull request #50860 from corhere/network-filter-iface

daemon: filter networks before converting to API types
This commit is contained in:
Cory Snider
2025-09-04 13:48:07 -04:00
committed by GitHub
13 changed files with 611 additions and 356 deletions

View File

@@ -2,8 +2,6 @@ package network
import (
"time"
"github.com/moby/moby/api/types/filters"
)
const (
@@ -116,21 +114,6 @@ type ConfigReference struct {
Network string
}
var acceptedFilters = map[string]bool{
"dangling": true,
"driver": true,
"id": true,
"label": true,
"name": true,
"scope": true,
"type": true,
}
// ValidateFilters validates the list of filter args with the available filters.
func ValidateFilters(filter filters.Args) error {
return filter.Validate(acceptedFilters)
}
// PruneReport contains the response for Engine API:
// POST "/networks/prune"
type PruneReport struct {