mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Merge pull request #50860 from corhere/network-filter-iface
daemon: filter networks before converting to API types
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user