mirror of
https://github.com/containers/podman.git
synced 2025-06-24 11:28:24 +08:00
docs(API): Fix compat network (dis-)connect
The endpoints to (dis-)connect networks from/to a container are no longer no-ops. Furthermore, the 403 error handled since #20365 has been documented Signed-off-by: Philipp Fruck <dev@p-fruck.de>
This commit is contained in:
@ -28,6 +28,13 @@ type networkNotFound struct {
|
|||||||
Body errorhandling.ErrorModel
|
Body errorhandling.ErrorModel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Network is already connected and container is running or transitioning to the running state ('initialized')
|
||||||
|
// swagger:response
|
||||||
|
type networkConnectedError struct {
|
||||||
|
// in:body
|
||||||
|
Body errorhandling.ErrorModel
|
||||||
|
}
|
||||||
|
|
||||||
// No such exec instance
|
// No such exec instance
|
||||||
// swagger:response
|
// swagger:response
|
||||||
type execSessionNotFound struct {
|
type execSessionNotFound struct {
|
||||||
|
@ -125,7 +125,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
|
|||||||
// tags:
|
// tags:
|
||||||
// - networks (compat)
|
// - networks (compat)
|
||||||
// summary: Connect container to network
|
// summary: Connect container to network
|
||||||
// description: Connect a container to a network. This endpoint is current a no-op
|
// description: Connect a container to a network
|
||||||
// produces:
|
// produces:
|
||||||
// - application/json
|
// - application/json
|
||||||
// parameters:
|
// parameters:
|
||||||
@ -144,6 +144,8 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
|
|||||||
// description: OK
|
// description: OK
|
||||||
// 400:
|
// 400:
|
||||||
// $ref: "#/responses/badParamError"
|
// $ref: "#/responses/badParamError"
|
||||||
|
// 403:
|
||||||
|
// $ref: "#/responses/networkConnectedError"
|
||||||
// 500:
|
// 500:
|
||||||
// $ref: "#/responses/internalError"
|
// $ref: "#/responses/internalError"
|
||||||
r.HandleFunc(VersionedPath("/networks/{name}/connect"), s.APIHandler(compat.Connect)).Methods(http.MethodPost)
|
r.HandleFunc(VersionedPath("/networks/{name}/connect"), s.APIHandler(compat.Connect)).Methods(http.MethodPost)
|
||||||
@ -153,7 +155,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
|
|||||||
// tags:
|
// tags:
|
||||||
// - networks (compat)
|
// - networks (compat)
|
||||||
// summary: Disconnect container from network
|
// summary: Disconnect container from network
|
||||||
// description: Disconnect a container from a network. This endpoint is current a no-op
|
// description: Disconnect a container from a network
|
||||||
// produces:
|
// produces:
|
||||||
// - application/json
|
// - application/json
|
||||||
// parameters:
|
// parameters:
|
||||||
|
Reference in New Issue
Block a user