summaryrefslogtreecommitdiff
path: root/test/apiv2/35-networks.at
Commit message (Collapse)AuthorAge
* Fix some network compat api problemsPaul Holzinger2020-12-11
| | | | | | | | | | | Network create could panic when used with a json body like this: `{"Name":"net","IPAM":{"Config":[]}}` The network scope for list and inspect should not be empty. It can be swarm, global or local. We only support local networks so hardcode this field to local. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* Add support for network idsPaul Holzinger2020-12-02
| | | | | | | | | | | | | | | | | | | The network ID is not stored. It is just the sha256 hash from the network name. There is a risk of a potential hash collision. However it's very unlikely and even if we hit this it will complain that more than network with this ID exists. The main benefit is that the compat api can have proper network ID support. Also this adds the support for `podman network ls --format "{{.ID}}"` and `--filter id=<ID>`. It also ensures that we can do network rm <ID> and network inspect <ID>. Since we use a hash this commit is backwards compatible even for already existing networks. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* podman network label supportPaul Holzinger2020-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add label support for podman network create. Use the `args` field in the cni config file to store the podman labels. Use `podman_labels` as key name and store the labels as map[string]string. For reference: https://github.com/containernetworking/cni/blob/master/CONVENTIONS.md#args-in-network-config https://github.com/containernetworking/cni/blob/spec-v0.4.0/SPEC.md#network-configuration Example snippet: ``` ... "args": { "podman_labels": { "key1":"value1", "key2":"value2" } } ... ``` Make podman network list support several filters. Supported filters are name, plugin, driver and label. Filters with different keys work exclusive. Several label filters work exclusive and the other filter keys are working inclusive. Also adjust the compat api to support labels in network create and list. Breaking changes: - podman network ls -f shortform is used for --filter instead --format This matches docker and other podman commands (container ps, volume ps) - libpod network list endpoint filter parameter is removed. Instead the filters paramter should be used as json encoded map[string][]string. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* Set default network driver for APIv2 networksbaude2020-11-10
| | | | | | | | | | Recent changes in networking require that the cni network driver be set. If the user provides no driver, we set the driver to the defaultnetworkdriver which currently is "bridge". Fixes: #8294 Signed-off-by: baude <bbaude@redhat.com>
* APIv2 tests: try again to fix themEd Santiago2020-10-12
| | | | | | | | | | | | | | | | CI discovered that a lot of networking tests are failing; my fault, for not having run my tests as root on my laptop. Disable those. Also: bump up the ten-request time limit, from 5 to 7 seconds. Looks like something keeps getting slower and slower, but I guess there's not much we can do about it. Also: when we get a mismatch response code (e.g. 500 when we expect 200), dump the response body and skip any subsequent response checks. Signed-off-by: Ed Santiago <santiago@redhat.com>
* APIv2 Add network list filteringPaul Holzinger2020-09-07
| | | | | | | | | | Add the filter option to the libpod endpoint. Add support for the name filter on the docker endpoint. Add apiv2 tests for the network list endpoints. Enable podman network integration tests for remote. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* Add parameter verification for api creation networkzhangguanzhang2020-08-12
| | | | Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
* API returns 500 in case network is not found instead of 404zhangguanzhang2020-08-02
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>