add fields in volume api for 1.24, 1.25
Signed-off-by: allencloud <allen.sun@daocloud.io>
This commit is contained in:
parent
2a540c18b6
commit
b015fd4fb3
|
@ -2906,7 +2906,9 @@ Return low-level information about the `exec` command `id`.
|
||||||
{
|
{
|
||||||
"Name": "tardis",
|
"Name": "tardis",
|
||||||
"Driver": "local",
|
"Driver": "local",
|
||||||
"Mountpoint": "/var/lib/docker/volumes/tardis"
|
"Mountpoint": "/var/lib/docker/volumes/tardis",
|
||||||
|
"Labels": null,
|
||||||
|
"Scope": "local"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"Warnings": []
|
"Warnings": []
|
||||||
|
@ -2941,6 +2943,7 @@ Create a volume
|
||||||
"com.example.some-label": "some-value",
|
"com.example.some-label": "some-value",
|
||||||
"com.example.some-other-label": "some-other-value"
|
"com.example.some-other-label": "some-other-value"
|
||||||
},
|
},
|
||||||
|
"Driver": "custom"
|
||||||
}
|
}
|
||||||
|
|
||||||
**Example response**:
|
**Example response**:
|
||||||
|
@ -2950,13 +2953,16 @@ Create a volume
|
||||||
|
|
||||||
{
|
{
|
||||||
"Name": "tardis",
|
"Name": "tardis",
|
||||||
"Driver": "local",
|
"Driver": "custom",
|
||||||
"Mountpoint": "/var/lib/docker/volumes/tardis",
|
"Mountpoint": "/var/lib/docker/volumes/tardis",
|
||||||
"Status": null,
|
"Status": {
|
||||||
|
"hello": "world"
|
||||||
|
},
|
||||||
"Labels": {
|
"Labels": {
|
||||||
"com.example.some-label": "some-value",
|
"com.example.some-label": "some-value",
|
||||||
"com.example.some-other-label": "some-other-value"
|
"com.example.some-other-label": "some-other-value"
|
||||||
},
|
},
|
||||||
|
"Scope": "local"
|
||||||
}
|
}
|
||||||
|
|
||||||
**Status codes**:
|
**Status codes**:
|
||||||
|
@ -2970,8 +2976,13 @@ Create a volume
|
||||||
- **Driver** - Name of the volume driver to use. Defaults to `local` for the name.
|
- **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
|
- **DriverOpts** - A mapping of driver options and values. These options are
|
||||||
passed directly to the driver and are driver specific.
|
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
|
### Inspect a volume
|
||||||
|
|
||||||
`GET /volumes/(name)`
|
`GET /volumes/(name)`
|
||||||
|
@ -2989,12 +3000,16 @@ Return low-level information on the volume `name`
|
||||||
|
|
||||||
{
|
{
|
||||||
"Name": "tardis",
|
"Name": "tardis",
|
||||||
"Driver": "local",
|
"Driver": "custom",
|
||||||
"Mountpoint": "/var/lib/docker/volumes/tardis/_data",
|
"Mountpoint": "/var/lib/docker/volumes/tardis/_data",
|
||||||
|
"Status": {
|
||||||
|
"hello": "world"
|
||||||
|
},
|
||||||
"Labels": {
|
"Labels": {
|
||||||
"com.example.some-label": "some-value",
|
"com.example.some-label": "some-value",
|
||||||
"com.example.some-other-label": "some-other-value"
|
"com.example.some-other-label": "some-other-value"
|
||||||
}
|
},
|
||||||
|
"Scope": "local"
|
||||||
}
|
}
|
||||||
|
|
||||||
**Status codes**:
|
**Status codes**:
|
||||||
|
@ -3003,6 +3018,23 @@ Return low-level information on the volume `name`
|
||||||
- **404** - no such volume
|
- **404** - no such volume
|
||||||
- **500** - server error
|
- **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
|
### Remove a volume
|
||||||
|
|
||||||
`DELETE /volumes/(name)`
|
`DELETE /volumes/(name)`
|
||||||
|
|
|
@ -2912,7 +2912,12 @@ Return low-level information about the `exec` command `id`.
|
||||||
{
|
{
|
||||||
"Name": "tardis",
|
"Name": "tardis",
|
||||||
"Driver": "local",
|
"Driver": "local",
|
||||||
"Mountpoint": "/var/lib/docker/volumes/tardis"
|
"Mountpoint": "/var/lib/docker/volumes/tardis",
|
||||||
|
"Labels":{
|
||||||
|
"com.example.some-label": "some-value",
|
||||||
|
"com.example.some-other-label": "some-other-value"
|
||||||
|
},
|
||||||
|
"Scope": "local"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"Warnings": []
|
"Warnings": []
|
||||||
|
@ -2956,13 +2961,16 @@ Create a volume
|
||||||
|
|
||||||
{
|
{
|
||||||
"Name": "tardis",
|
"Name": "tardis",
|
||||||
"Driver": "local",
|
"Driver": "custom",
|
||||||
"Mountpoint": "/var/lib/docker/volumes/tardis",
|
"Mountpoint": "/var/lib/docker/volumes/tardis",
|
||||||
"Status": null,
|
"Status": {
|
||||||
|
"hello": "world"
|
||||||
|
},
|
||||||
"Labels": {
|
"Labels": {
|
||||||
"com.example.some-label": "some-value",
|
"com.example.some-label": "some-value",
|
||||||
"com.example.some-other-label": "some-other-value"
|
"com.example.some-other-label": "some-other-value"
|
||||||
},
|
},
|
||||||
|
"Scope": "local"
|
||||||
}
|
}
|
||||||
|
|
||||||
**Status codes**:
|
**Status codes**:
|
||||||
|
@ -2976,7 +2984,12 @@ Create a volume
|
||||||
- **Driver** - Name of the volume driver to use. Defaults to `local` for the name.
|
- **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
|
- **DriverOpts** - A mapping of driver options and values. These options are
|
||||||
passed directly to the driver and are driver specific.
|
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
|
### Inspect a volume
|
||||||
|
|
||||||
|
@ -2995,12 +3008,16 @@ Return low-level information on the volume `name`
|
||||||
|
|
||||||
{
|
{
|
||||||
"Name": "tardis",
|
"Name": "tardis",
|
||||||
"Driver": "local",
|
"Driver": "custom",
|
||||||
|
"Status": {
|
||||||
|
"hello": "world"
|
||||||
|
},
|
||||||
"Mountpoint": "/var/lib/docker/volumes/tardis/_data",
|
"Mountpoint": "/var/lib/docker/volumes/tardis/_data",
|
||||||
"Labels": {
|
"Labels": {
|
||||||
"com.example.some-label": "some-value",
|
"com.example.some-label": "some-value",
|
||||||
"com.example.some-other-label": "some-other-value"
|
"com.example.some-other-label": "some-other-value"
|
||||||
}
|
},
|
||||||
|
"Scope": "local"
|
||||||
}
|
}
|
||||||
|
|
||||||
**Status codes**:
|
**Status codes**:
|
||||||
|
@ -3009,6 +3026,23 @@ Return low-level information on the volume `name`
|
||||||
- **404** - no such volume
|
- **404** - no such volume
|
||||||
- **500** - server error
|
- **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
|
### Remove a volume
|
||||||
|
|
||||||
`DELETE /volumes/(name)`
|
`DELETE /volumes/(name)`
|
||||||
|
|
Loading…
Reference in New Issue