diff options
author | baude <bbaude@redhat.com> | 2020-11-11 09:45:07 -0600 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2020-11-17 14:22:39 -0600 |
commit | d3e794bda39167b15c5dc14d83333d1306316b11 (patch) | |
tree | 734cda964a2d46316f6aeb279be28fea541b32f5 /pkg/domain/infra/abi/network.go | |
parent | 3a172c5999706e4493824c436bd7e2e8ea7b3d59 (diff) | |
download | podman-d3e794bda39167b15c5dc14d83333d1306316b11.tar.gz podman-d3e794bda39167b15c5dc14d83333d1306316b11.tar.bz2 podman-d3e794bda39167b15c5dc14d83333d1306316b11.zip |
add network connect|disconnect compat endpoints
this enables the ability to connect and disconnect a container from a
given network. it is only for the compatibility layer. some code had to
be refactored to avoid circular imports.
additionally, tests are being deferred temporarily due to some
incompatibility/bug in either docker-py or our stack.
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/domain/infra/abi/network.go')
-rw-r--r-- | pkg/domain/infra/abi/network.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/domain/infra/abi/network.go b/pkg/domain/infra/abi/network.go index 4f572fb88..06941f8d0 100644 --- a/pkg/domain/infra/abi/network.go +++ b/pkg/domain/infra/abi/network.go @@ -110,7 +110,11 @@ func (ic *ContainerEngine) NetworkRm(ctx context.Context, namesOrIds []string, o } func (ic *ContainerEngine) NetworkCreate(ctx context.Context, name string, options entities.NetworkCreateOptions) (*entities.NetworkCreateReport, error) { - return network.Create(name, options, ic.Libpod) + runtimeConfig, err := ic.Libpod.GetConfig() + if err != nil { + return nil, err + } + return network.Create(name, options, runtimeConfig) } func ifPassesFilterTest(netconf *libcni.NetworkConfigList, filter []string) bool { |