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

update status code for network api #30699

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions api/swagger.yaml
Expand Up @@ -6320,6 +6320,10 @@ paths:
description: "Network not found"
schema:
$ref: "#/definitions/ErrorResponse"
500:
description: "Server error"
schema:
$ref: "#/definitions/ErrorResponse"
parameters:
- name: "id"
in: "path"
Expand All @@ -6339,6 +6343,10 @@ paths:
responses:
204:
description: "No error"
403:
description: "operation not supported for pre-defined networks"
schema:
$ref: "#/definitions/ErrorResponse"
404:
description: "no such network"
schema:
Expand Down
12 changes: 8 additions & 4 deletions docs/api/v1.21.md
Expand Up @@ -2739,7 +2739,9 @@ Content-Type: application/json

#### Inspect network

`GET /networks/<network-id>`
`GET /networks/(id or name)`

Return low-level information on the network `id`

**Example request**:

Expand Down Expand Up @@ -2787,6 +2789,7 @@ Content-Type: application/json

- **200** - no error
- **404** - network not found
- **500** - server error

#### Create a network

Expand Down Expand Up @@ -2853,7 +2856,7 @@ Content-Type: application/json

#### Connect a container to a network

`POST /networks/(id)/connect`
`POST /networks/(id or name)/connect`

Connect a container to a network

Expand Down Expand Up @@ -2884,7 +2887,7 @@ Content-Type: application/json

#### Disconnect a container from a network

`POST /networks/(id)/disconnect`
`POST /networks/(id or name)/disconnect`

Disconnect a container from a network

Expand Down Expand Up @@ -2915,7 +2918,7 @@ Content-Type: application/json

#### Remove a network

`DELETE /networks/(id)`
`DELETE /networks/(id or name)`

Instruct the driver to remove the network (`id`).

Expand All @@ -2930,6 +2933,7 @@ Instruct the driver to remove the network (`id`).
**Status codes**:

- **200** - no error
- **403** - operation not supported for pre-defined networks
- **404** - no such network
- **500** - server error

Expand Down
12 changes: 8 additions & 4 deletions docs/api/v1.22.md
Expand Up @@ -3055,7 +3055,9 @@ Content-Type: application/json

#### Inspect network

`GET /networks/<network-id>`
`GET /networks/(id or name)`

Return low-level information on the network `id`

**Example request**:

Expand Down Expand Up @@ -3108,6 +3110,7 @@ Content-Type: application/json

- **200** - no error
- **404** - network not found
- **500** - server error

#### Create a network

Expand Down Expand Up @@ -3183,7 +3186,7 @@ Content-Type: application/json

#### Connect a container to a network

`POST /networks/(id)/connect`
`POST /networks/(id or name)/connect`

Connect a container to a network

Expand Down Expand Up @@ -3220,7 +3223,7 @@ Content-Type: application/json

#### Disconnect a container from a network

`POST /networks/(id)/disconnect`
`POST /networks/(id or name)/disconnect`

Disconnect a container from a network

Expand Down Expand Up @@ -3253,7 +3256,7 @@ Content-Type: application/json

#### Remove a network

`DELETE /networks/(id)`
`DELETE /networks/(id or name)`

Instruct the driver to remove the network (`id`).

Expand All @@ -3268,6 +3271,7 @@ Instruct the driver to remove the network (`id`).
**Status codes**:

- **200** - no error
- **403** - operation not supported for pre-defined networks
- **404** - no such network
- **500** - server error

Expand Down
12 changes: 8 additions & 4 deletions docs/api/v1.23.md
Expand Up @@ -3150,7 +3150,9 @@ Content-Type: application/json

#### Inspect network

`GET /networks/<network-id>`
`GET /networks/(id or name)`

Return low-level information on the network `id`

**Example request**:

Expand Down Expand Up @@ -3209,6 +3211,7 @@ Content-Type: application/json

- **200** - no error
- **404** - network not found
- **500** - server error

#### Create a network

Expand Down Expand Up @@ -3300,7 +3303,7 @@ Content-Type: application/json

#### Connect a container to a network

`POST /networks/(id)/connect`
`POST /networks/(id or name)/connect`

Connect a container to a network

Expand Down Expand Up @@ -3337,7 +3340,7 @@ Content-Type: application/json

#### Disconnect a container from a network

`POST /networks/(id)/disconnect`
`POST /networks/(id or name)/disconnect`

Disconnect a container from a network

Expand Down Expand Up @@ -3370,7 +3373,7 @@ Content-Type: application/json

#### Remove a network

`DELETE /networks/(id)`
`DELETE /networks/(id or name)`

Instruct the driver to remove the network (`id`).

Expand All @@ -3385,6 +3388,7 @@ Instruct the driver to remove the network (`id`).
**Status codes**:

- **204** - no error
- **403** - operation not supported for pre-defined networks
- **404** - no such network
- **500** - server error

Expand Down
12 changes: 8 additions & 4 deletions docs/api/v1.24.md
Expand Up @@ -3214,7 +3214,9 @@ Content-Type: application/json

#### Inspect network

`GET /networks/<network-id>`
`GET /networks/(id or name)`

Return low-level information on the network `id`

**Example request**:

Expand Down Expand Up @@ -3273,6 +3275,7 @@ Content-Type: application/json

- **200** - no error
- **404** - network not found
- **500** - server error

#### Create a network

Expand Down Expand Up @@ -3365,7 +3368,7 @@ Content-Type: application/json

#### Connect a container to a network

`POST /networks/(id)/connect`
`POST /networks/(id or name)/connect`

Connect a container to a network

Expand Down Expand Up @@ -3403,7 +3406,7 @@ Content-Type: application/json

#### Disconnect a container from a network

`POST /networks/(id)/disconnect`
`POST /networks/(id or name)/disconnect`

Disconnect a container from a network

Expand Down Expand Up @@ -3437,7 +3440,7 @@ Content-Type: application/json

#### Remove a network

`DELETE /networks/(id)`
`DELETE /networks/(id or name)`

Instruct the driver to remove the network (`id`).

Expand All @@ -3452,6 +3455,7 @@ Instruct the driver to remove the network (`id`).
**Status codes**:

- **204** - no error
- **403** - operation not supported for pre-defined networks
- **404** - no such network
- **500** - server error

Expand Down