mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-09-08 00:27:54 +00:00
* Add support for `podman network update <>`
```console
network update
Description:
update networks for containers and pods
Usage:
podman network update [options] NAME
Examples:
podman network update podman1
Options:
--dns-add stringArray add network level nameservers
--dns-drop stringArray remove network level nameservers
```
* Add support for `--network-dns-server` to `podman network create`
Extends podman to support recently added features in `netavark` and
`aardvark-dns`
* https://github.com/containers/netavark/pull/497
* https://github.com/containers/aardvark-dns/pull/252
* https://github.com/containers/netavark/pull/503
[NO NEW TESTS NEEDED]
[NO TESTS NEEDED]
Signed-off-by: Aditya R <arajan@redhat.com>
96 lines
2.3 KiB
Go
96 lines
2.3 KiB
Go
package entities
|
|
|
|
import (
|
|
"net"
|
|
|
|
"github.com/containers/common/libnetwork/types"
|
|
)
|
|
|
|
// NetworkListOptions describes options for listing networks in cli
|
|
type NetworkListOptions struct {
|
|
Format string
|
|
Quiet bool
|
|
Filters map[string][]string
|
|
}
|
|
|
|
// NetworkReloadOptions describes options for reloading container network
|
|
// configuration.
|
|
type NetworkReloadOptions struct {
|
|
All bool
|
|
Latest bool
|
|
}
|
|
|
|
// NetworkReloadReport describes the results of reloading a container network.
|
|
type NetworkReloadReport struct {
|
|
//nolint:stylecheck,revive
|
|
Id string
|
|
Err error
|
|
}
|
|
|
|
// NetworkRmOptions describes options for removing networks
|
|
type NetworkRmOptions struct {
|
|
Force bool
|
|
Timeout *uint
|
|
}
|
|
|
|
// NetworkRmReport describes the results of network removal
|
|
type NetworkRmReport struct {
|
|
Name string
|
|
Err error
|
|
}
|
|
|
|
// NetworkCreateOptions describes options to create a network
|
|
type NetworkCreateOptions struct {
|
|
DisableDNS bool
|
|
Driver string
|
|
Gateways []net.IP
|
|
Internal bool
|
|
Labels map[string]string
|
|
MacVLAN string
|
|
NetworkDNSServers []string
|
|
Ranges []string
|
|
Subnets []string
|
|
IPv6 bool
|
|
// Mapping of driver options and values.
|
|
Options map[string]string
|
|
// IgnoreIfExists if true, do not fail if the network already exists
|
|
IgnoreIfExists bool
|
|
}
|
|
|
|
// NetworkUpdateOptions describes options to update a network
|
|
type NetworkUpdateOptions struct {
|
|
AddDNSServers []string `json:"adddnsservers"`
|
|
RemoveDNSServers []string `json:"removednsservers"`
|
|
}
|
|
|
|
// NetworkCreateReport describes a created network for the cli
|
|
type NetworkCreateReport struct {
|
|
Name string
|
|
}
|
|
|
|
// NetworkDisconnectOptions describes options for disconnecting
|
|
// containers from networks
|
|
type NetworkDisconnectOptions struct {
|
|
Container string
|
|
Force bool
|
|
}
|
|
|
|
// NetworkConnectOptions describes options for connecting
|
|
// a container to a network
|
|
type NetworkConnectOptions struct {
|
|
Container string `json:"container"`
|
|
types.PerNetworkOptions
|
|
}
|
|
|
|
// NetworkPruneReport containers the name of network and an error
|
|
// associated in its pruning (removal)
|
|
// swagger:model NetworkPruneReport
|
|
type NetworkPruneReport struct {
|
|
Name string
|
|
Error error
|
|
}
|
|
|
|
// NetworkPruneOptions describes options for pruning unused networks
|
|
type NetworkPruneOptions struct {
|
|
Filters map[string][]string
|
|
}
|