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 --- libpod/events/journal_linux.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libpod/events/journal_linux.go') diff --git a/libpod/events/journal_linux.go b/libpod/events/journal_linux.go index 5e3be8009..9a514e302 100644 --- a/libpod/events/journal_linux.go +++ b/libpod/events/journal_linux.go @@ -56,6 +56,9 @@ func (e EventJournalD) Write(ee Event) error { } m["PODMAN_LABELS"] = string(b) } + case Network: + m["PODMAN_ID"] = ee.ID + m["PODMAN_NETWORK_NAME"] = ee.Network case Volume: m["PODMAN_NAME"] = ee.Name } @@ -197,6 +200,9 @@ func newEventFromJournalEntry(entry *sdjournal.JournalEntry) (*Event, error) { / newEvent.Details = Details{Attributes: labels} } } + case Network: + newEvent.ID = entry.Fields["PODMAN_ID"] + newEvent.Network = entry.Fields["PODMAN_NETWORK_NAME"] case Image: newEvent.ID = entry.Fields["PODMAN_ID"] } -- cgit v1.2.3-54-g00ecf