diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-11-19 16:54:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-19 16:54:29 +0100 |
commit | e239bfa15ba7e5718b511e0f949679ba5b7037c4 (patch) | |
tree | 0f95118000b8ef5bd4ddb293c9a20b0c4d5f2afa /libpod/events.go | |
parent | 70f91fb96d11adb86be955e8a39f9c9096d48638 (diff) | |
parent | a3e0b7d117251944375fd32449f6b26d65edf367 (diff) | |
download | podman-e239bfa15ba7e5718b511e0f949679ba5b7037c4.tar.gz podman-e239bfa15ba7e5718b511e0f949679ba5b7037c4.tar.bz2 podman-e239bfa15ba7e5718b511e0f949679ba5b7037c4.zip |
Merge pull request #8391 from baude/networkconnectdisconnect
add network connect|disconnect compat endpoints
Diffstat (limited to 'libpod/events.go')
-rw-r--r-- | libpod/events.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libpod/events.go b/libpod/events.go index 95317eb01..e199a3846 100644 --- a/libpod/events.go +++ b/libpod/events.go @@ -50,6 +50,18 @@ func (c *Container) newContainerExitedEvent(exitCode int32) { } } +// netNetworkEvent creates a new event based on a network connect/disconnect +func (c *Container) newNetworkEvent(status events.Status, netName string) { + e := events.NewEvent(status) + e.ID = c.ID() + e.Name = c.Name() + e.Type = events.Network + e.Network = netName + if err := c.runtime.eventer.Write(e); err != nil { + logrus.Errorf("unable to write pod event: %q", err) + } +} + // newPodEvent creates a new event for a libpod pod func (p *Pod) newPodEvent(status events.Status) { e := events.NewEvent(status) |