From a3e0b7d117251944375fd32449f6b26d65edf367 Mon Sep 17 00:00:00 2001 From: baude Date: Wed, 11 Nov 2020 09:45:07 -0600 Subject: 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 --- pkg/domain/entities/network.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'pkg/domain/entities/network.go') diff --git a/pkg/domain/entities/network.go b/pkg/domain/entities/network.go index 3cc970531..86c2e1bcd 100644 --- a/pkg/domain/entities/network.go +++ b/pkg/domain/entities/network.go @@ -49,3 +49,17 @@ type NetworkCreateOptions struct { type NetworkCreateReport struct { Filename 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 +} -- cgit v1.2.3-54-g00ecf