diff options
author | baude <bbaude@redhat.com> | 2020-11-11 09:45:07 -0600 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2020-11-19 08:16:19 -0600 |
commit | a3e0b7d117251944375fd32449f6b26d65edf367 (patch) | |
tree | 824e4acb1529fb72276630fdd4d57127c07aadc8 /libpod/events/events.go | |
parent | 286d356db03a2511722155022c19855f8aee73cf (diff) | |
download | podman-a3e0b7d117251944375fd32449f6b26d65edf367.tar.gz podman-a3e0b7d117251944375fd32449f6b26d65edf367.tar.bz2 podman-a3e0b7d117251944375fd32449f6b26d65edf367.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 'libpod/events/events.go')
-rw-r--r-- | libpod/events/events.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libpod/events/events.go b/libpod/events/events.go index 42939d64c..4e7267af3 100644 --- a/libpod/events/events.go +++ b/libpod/events/events.go @@ -77,6 +77,8 @@ func (e *Event) ToHumanReadable() string { } } humanFormat += ")" + case Network: + humanFormat = fmt.Sprintf("%s %s %s %s (container=%s, name=%s)", e.Time, e.Type, e.Status, e.ID, e.ID, e.Network) case Image: humanFormat = fmt.Sprintf("%s %s %s %s %s", e.Time, e.Type, e.Status, e.ID, e.Name) case System: @@ -115,6 +117,8 @@ func StringToType(name string) (Type, error) { return Container, nil case Image.String(): return Image, nil + case Network.String(): + return Network, nil case Pod.String(): return Pod, nil case System.String(): @@ -162,6 +166,10 @@ func StringToStatus(name string) (Status, error) { return LoadFromArchive, nil case Mount.String(): return Mount, nil + case NetworkConnect.String(): + return NetworkConnect, nil + case NetworkDisconnect.String(): + return NetworkDisconnect, nil case Pause.String(): return Pause, nil case Prune.String(): |