From 13ef210b8b81fecdf5a781320c2a07fb74a5b3e1 Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Mon, 11 Apr 2016 11:17:52 -0400 Subject: [PATCH] Add support for volume scopes This is similar to network scopes where a volume can either be `local` or `global`. A `global` volume is one that exists across the entire cluster where as a `local` volume exists on a single engine. Signed-off-by: Brian Goff --- docs/extend/plugins_volume.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/extend/plugins_volume.md b/docs/extend/plugins_volume.md index 5c2ebb49bc..a70a2c3ee2 100644 --- a/docs/extend/plugins_volume.md +++ b/docs/extend/plugins_volume.md @@ -20,6 +20,7 @@ documentation](plugins.md) for more information. ### 1.12.0 - Add `Status` field to `VolumeDriver.Get` response ([#21006](https://github.com/docker/docker/pull/21006#)) +- Add `VolumeDriver.Capabilities` to get capabilities of the volume driver([#22077](https://github.com/docker/docker/pull/22077)) ### 1.10.0 @@ -236,3 +237,29 @@ Get the list of volumes registered with the plugin. ``` Respond with a string error if an error occurred. + +### /VolumeDriver.Capabilities + +**Request**: +```json +{} +``` + +Get the list of capabilities the driver supports. +The driver is not required to implement this endpoint, however in such cases +the default values will be taken. + +**Response**: +```json +{ + "Capabilities": { + "Scope": "global" + } +} +``` + +Supported scopes are `global` and `local`. Any other value in `Scope` will be +ignored and assumed to be `local`. Scope allows cluster managers to handle the +volume differently, for instance with a scope of `global`, the cluster manager +knows it only needs to create the volume once instead of on every engine. More +capabilities may be added in the future.