Skip to content

Commit

Permalink
Merge pull request #25604 from allencloud/add-missing-fields-in-volum…
Browse files Browse the repository at this point in the history
…e-api

add fields in volume api for 1.24, 1.25
(cherry picked from commit a3432c2)

Signed-off-by: Sven Dowideit <[email protected]>

Conflicts:
	docs/reference/api/docker_remote_api_v1.25.md
  • Loading branch information
vdemeester authored and SvenDowideit committed Aug 11, 2016
1 parent 61fe5da commit 151b799
Showing 1 changed file with 38 additions and 6 deletions.
44 changes: 38 additions & 6 deletions docs/reference/api/docker_remote_api_v1.24.md
Original file line number Diff line number Diff line change
Expand Up @@ -2906,7 +2906,9 @@ Return low-level information about the `exec` command `id`.
{
"Name": "tardis",
"Driver": "local",
"Mountpoint": "/var/lib/docker/volumes/tardis"
"Mountpoint": "/var/lib/docker/volumes/tardis",
"Labels": null,
"Scope": "local"
}
],
"Warnings": []
Expand Down Expand Up @@ -2941,6 +2943,7 @@ Create a volume
"com.example.some-label": "some-value",
"com.example.some-other-label": "some-other-value"
},
"Driver": "custom"
}
**Example response**:
Expand All @@ -2950,13 +2953,16 @@ Create a volume
{
"Name": "tardis",
"Driver": "local",
"Driver": "custom",
"Mountpoint": "/var/lib/docker/volumes/tardis",
"Status": null,
"Status": {
"hello": "world"
},
"Labels": {
"com.example.some-label": "some-value",
"com.example.some-other-label": "some-other-value"
},
"Scope": "local"
}
**Status codes**:
Expand All @@ -2970,8 +2976,13 @@ Create a volume
- **Driver** - Name of the volume driver to use. Defaults to `local` for the name.
- **DriverOpts** - A mapping of driver options and values. These options are
passed directly to the driver and are driver specific.
- **Labels** - Labels to set on the volume, specified as a map: `{"key":"value" [,"key2":"value2"]}`
- **Labels** - Labels to set on the volume, specified as a map: `{"key":"value","key2":"value2"}`
**JSON fields in response**:
Refer to the [inspect a volume](#inspect-a-volume) section or details about the
JSON fields returned in the response.
### Inspect a volume
`GET /volumes/(name)`
Expand All @@ -2989,12 +3000,16 @@ Return low-level information on the volume `name`
{
"Name": "tardis",
"Driver": "local",
"Driver": "custom",
"Mountpoint": "/var/lib/docker/volumes/tardis/_data",
"Status": {
"hello": "world"
},
"Labels": {
"com.example.some-label": "some-value",
"com.example.some-other-label": "some-other-value"
}
},
"Scope": "local"
}
**Status codes**:
Expand All @@ -3003,6 +3018,23 @@ Return low-level information on the volume `name`
- **404** - no such volume
- **500** - server error
**JSON fields in response**:
The following fields can be returned in the API response. Empty fields, or
fields that are not supported by the volume's driver may be omitted in the
response.
- **Name** - Name of the volume.
- **Driver** - Name of the volume driver used by the volume.
- **Mountpoint** - Mount path of the volume on the host.
- **Status** - Low-level details about the volume, provided by the volume driver.
Details are returned as a map with key/value pairs: `{"key":"value","key2":"value2"}`.
The `Status` field is optional, and is omitted if the volume driver does not
support this feature.
- **Labels** - Labels set on the volume, specified as a map: `{"key":"value","key2":"value2"}`.
- **Scope** - Scope describes the level at which the volume exists, can be one of
`global` for cluster-wide or `local` for machine level. The default is `local`.
### Remove a volume
`DELETE /volumes/(name)`
Expand Down

0 comments on commit 151b799

Please sign in to comment.