aboutsummaryrefslogtreecommitdiff
path: root/libpod/events
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2020-10-20 12:10:58 -0500
committerbaude <bbaude@redhat.com>2020-10-22 08:20:28 -0500
commit68419365257f1fcaa638605576a0583ef282a5a5 (patch)
treec2020528598b5cbff0ac22f71d392af9c9f4112e /libpod/events
parent2cd2359a6d9ba4135495dc9be616bb1edebb170d (diff)
downloadpodman-68419365257f1fcaa638605576a0583ef282a5a5.tar.gz
podman-68419365257f1fcaa638605576a0583ef282a5a5.tar.bz2
podman-68419365257f1fcaa638605576a0583ef282a5a5.zip
APIv2 compatibility network connect|disconnect
Add endpoints for the compat layer for network connect and disconnect. As of now, these two endpoints do nothing to change the network state of a container. They do some basic data verification and return the proper 200 response. This at least allows for scripts to work on the compatibility layer instead of getting 404s. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/events')
-rw-r--r--libpod/events/filters.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/events/filters.go b/libpod/events/filters.go
index c50474007..171e2237f 100644
--- a/libpod/events/filters.go
+++ b/libpod/events/filters.go
@@ -73,8 +73,8 @@ func generateEventUntilOption(timeUntil time.Time) func(e *Event) bool {
}
func parseFilter(filter string) (string, string, error) {
- filterSplit := strings.Split(filter, "=")
- if len(filterSplit) != 2 {
+ filterSplit := strings.SplitN(filter, "=", 2)
+ if len(filterSplit) == 1 {
return "", "", errors.Errorf("%s is an invalid filter", filter)
}
return filterSplit[0], filterSplit[1], nil