mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-10-24 14:57:35 +00:00
Make use of the new network interface in libpod. This commit contains several breaking changes: - podman network create only outputs the new network name and not file path. - podman network ls shows the network driver instead of the cni version and plugins. - podman network inspect outputs the new network struct and not the cni conflist. - The bindings and libpod api endpoints have been changed to use the new network structure. The container network status is stored in a new field in the state. The status should be received with the new `c.getNetworkStatus`. This will migrate the old status to the new format. Therefore old containers should contine to work correctly in all cases even when network connect/ disconnect is used. New features: - podman network reload keeps the ip and mac for more than one network. - podman container restore keeps the ip and mac for more than one network. - The network create compat endpoint can now use more than one ipam config. The man pages and the swagger doc are updated to reflect the latest changes. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
85 lines
1.8 KiB
Go
85 lines
1.8 KiB
Go
package entities
|
|
|
|
import (
|
|
"net"
|
|
)
|
|
|
|
// 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,golint
|
|
Id string
|
|
Err error
|
|
}
|
|
|
|
// NetworkRmOptions describes options for removing networks
|
|
type NetworkRmOptions struct {
|
|
Force bool
|
|
}
|
|
|
|
//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
|
|
Gateway net.IP
|
|
Internal bool
|
|
Labels map[string]string
|
|
MacVLAN string
|
|
Range net.IPNet
|
|
Subnet net.IPNet
|
|
IPv6 bool
|
|
// Mapping of driver options and values.
|
|
Options map[string]string
|
|
}
|
|
|
|
// 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 {
|
|
Aliases []string
|
|
Container string
|
|
}
|
|
|
|
// 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 cni networks
|
|
type NetworkPruneOptions struct {
|
|
Filters map[string][]string
|
|
}
|