mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
Wire network interface into libpod
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>
This commit is contained in:
@ -1223,7 +1223,7 @@ func (s *BoltState) NetworkConnect(ctr *Container, network string, aliases []str
|
||||
}
|
||||
ctrNetworks := ctr.config.Networks
|
||||
if len(ctrNetworks) == 0 {
|
||||
ctrNetworks = []string{ctr.runtime.netPlugin.GetDefaultNetworkName()}
|
||||
ctrNetworks = []string{ctr.runtime.config.Network.DefaultNetwork}
|
||||
}
|
||||
// Copy in all the container's CNI networks
|
||||
for _, net := range ctrNetworks {
|
||||
|
Reference in New Issue
Block a user