Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI:DOCS] Update swagger for inspect network #10607

Merged
merged 1 commit into from
Jun 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkg/api/handlers/libpod/swagger.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"net/http"
"os"

"github.com/containernetworking/cni/libcni"
"github.com/containers/image/v5/manifest"
"github.com/containers/podman/v3/libpod/define"
"github.com/containers/podman/v3/pkg/api/handlers/utils"
Expand Down Expand Up @@ -102,7 +103,7 @@ type swagNetworkRmReport struct {
// swagger:response NetworkInspectReport
type swagNetworkInspectReport struct {
// in:body
Body entities.NetworkInspectReport
Body libcni.NetworkConfigList
}

// Network list
Expand Down
4 changes: 3 additions & 1 deletion pkg/api/server/register_networks.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,9 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// tags:
// - networks
// summary: Inspect a network
// description: Display low level configuration for a CNI network
// description: |
// Display low level configuration for a CNI network.
// - In a 200 response, all of the fields named Bytes are returned as a Base64 encoded string.
// parameters:
// - in: path
// name: name
Expand Down
11 changes: 9 additions & 2 deletions test/apiv2/python/rest_api/test_v2_0_0_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,17 @@ def test_pull(self):
self.assertTrue(keys["id"], "Expected to find id stanza")
self.assertTrue(keys["images"], "Expected to find images stanza")
self.assertTrue(keys["stream"], "Expected to find stream progress stanza's")

def test_create(self):
r = requests.post(self.podman_url + "/v1.40/images/create?fromImage=alpine&platform=linux/amd64/v8", timeout=15)
r = requests.post(
self.podman_url + "/v1.40/images/create?fromImage=alpine&platform=linux/amd64/v8",
timeout=15,
)
self.assertEqual(r.status_code, 200, r.text)
r = requests.post(self.podman_url + "/v1.40/images/create?fromSrc=-&repo=fedora&message=testing123", timeout=15)
r = requests.post(
self.podman_url + "/v1.40/images/create?fromSrc=-&repo=fedora&message=testing123",
timeout=15,
)
self.assertEqual(r.status_code, 200, r.text)

def test_search_compat(self):
Expand Down