Browse code

Graphdriver docs (#22003)

* Fix closing strings in graphdriver plugin documentation

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>

* Fix documenation for Err type in graphdriver plugins

Fix https://github.com/docker/go-plugins-helpers/issues/24

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>

* Add missing MountLabel argument in graphdriver plugin documentation

The real `Create` seems also to take more arguments (the `storageOpt`) which
are not exposed to the plugin API (yet?).

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>

* Add missing CreateReadWrite in graphdriver plugin documentation

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>

Thomas Gazagnaire authored on 2016/04/14 02:11:39
Showing 1 changed files
... ...
@@ -37,11 +37,11 @@ through from the user.
37 37
 **Response**:
38 38
 ```
39 39
 {
40
-  "Err": null
40
+  "Err": ""
41 41
 }
42 42
 ```
43 43
 
44
-Respond with a string error if an error occurred.
44
+Respond with a non-empty string error if an error occurred.
45 45
 
46 46
 
47 47
 ### /GraphDriver.Create
... ...
@@ -51,22 +51,35 @@ Respond with a string error if an error occurred.
51 51
 {
52 52
   "ID": "46fe8644f2572fd1e505364f7581e0c9dbc7f14640bd1fb6ce97714fb6fc5187",
53 53
   "Parent": "2cd9c322cb78a55e8212aa3ea8425a4180236d7106938ec921d0935a4b8ca142"
54
+  "MountLabel": ""
54 55
 }
55 56
 ```
56 57
 
57
-Create a new, empty, filesystem layer with the specified `ID` and `Parent`.
58
-`Parent` may be an empty string, which would indicate that there is no parent
59
-layer.
58
+Create a new, empty, read-only filesystem layer with the specified
59
+`ID`, `Parent` and `MountLabel`. `Parent` may be an empty string,
60
+which would indicate that there is no parent layer.
60 61
 
61 62
 **Response**:
62 63
 ```
63 64
 {
64
-  "Err: null
65
+  "Err": ""
65 66
 }
66 67
 ```
67 68
 
68
-Respond with a string error if an error occurred.
69
+Respond with a non-empty string error if an error occurred.
70
+
71
+### /GraphDriver.CreateReadWrite
72
+
73
+**Request**:
74
+```
75
+{
76
+  "ID": "46fe8644f2572fd1e505364f7581e0c9dbc7f14640bd1fb6ce97714fb6fc5187",
77
+  "Parent": "2cd9c322cb78a55e8212aa3ea8425a4180236d7106938ec921d0935a4b8ca142"
78
+  "MountLabel": ""
79
+}
80
+```
69 81
 
82
+Similar to `/GraphDriver.Create` but creates a read-write filesystem layer.
70 83
 
71 84
 ### /GraphDriver.Remove
72 85
 
... ...
@@ -82,11 +95,11 @@ Remove the filesystem layer with this given `ID`.
82 82
 **Response**:
83 83
 ```
84 84
 {
85
-  "Err: null
85
+  "Err": ""
86 86
 }
87 87
 ```
88 88
 
89
-Respond with a string error if an error occurred.
89
+Respond with a non-empty string error if an error occurred.
90 90
 
91 91
 ### /GraphDriver.Get
92 92
 
... ...
@@ -109,7 +122,7 @@ Get the mountpoint for the layered filesystem referred to by the given `ID`.
109 109
 ```
110 110
 
111 111
 Respond with the absolute path to the mounted layered filesystem.
112
-Respond with a string error if an error occurred.
112
+Respond with a non-empty string error if an error occurred.
113 113
 
114 114
 ### /GraphDriver.Put
115 115
 
... ...
@@ -126,11 +139,11 @@ filesystem layer.
126 126
 **Response**:
127 127
 ```
128 128
 {
129
-  "Err: null
129
+  "Err": ""
130 130
 }
131 131
 ```
132 132
 
133
-Respond with a string error if an error occurred.
133
+Respond with a non-empty string error if an error occurred.
134 134
 
135 135
 ### /GraphDriver.Exists
136 136
 
... ...
@@ -189,13 +202,13 @@ with the specified `ID`
189 189
 ```
190 190
 {
191 191
   "Metadata": {},
192
-  "Err": null
192
+  "Err": ""
193 193
 }
194 194
 ```
195 195
 
196 196
 Respond with a set of key/value pairs containing the low-level diagnostic
197 197
 information about the layered filesystem.
198
-Respond with a string error if an error occurred.
198
+Respond with a non-empty string error if an error occurred.
199 199
 
200 200
 ### /GraphDriver.Cleanup
201 201
 
... ...
@@ -210,11 +223,11 @@ unmounting all the layered file systems.
210 210
 **Response**:
211 211
 ```
212 212
 {
213
-  "Err: null
213
+  "Err": ""
214 214
 }
215 215
 ```
216 216
 
217
-Respond with a string error if an error occurred.
217
+Respond with a non-empty string error if an error occurred.
218 218
 
219 219
 
220 220
 ### /GraphDriver.Diff
... ...
@@ -252,7 +265,7 @@ Get a list of changes between the filesystem layers specified by the `ID` and
252 252
 ```
253 253
 {
254 254
   "Changes": [{}],
255
-  "Err": null
255
+  "Err": ""
256 256
 }
257 257
 ```
258 258
 
... ...
@@ -269,7 +282,7 @@ changed and `Kind` is an integer specifying the type of change that occurred:
269 269
 - 1 - Added
270 270
 - 2 - Deleted
271 271
 
272
-Respond with a string error if an error occurred.
272
+Respond with a non-empty string error if an error occurred.
273 273
 
274 274
 ### /GraphDriver.ApplyDiff
275 275
 
... ...
@@ -290,12 +303,12 @@ and `Parent`
290 290
 ```
291 291
 {
292 292
   "Size": 512366,
293
-  "Err": null
293
+  "Err": ""
294 294
 }
295 295
 ```
296 296
 
297 297
 Respond with the size of the new layer in bytes.
298
-Respond with a string error if an error occurred.
298
+Respond with a non-empty string error if an error occurred.
299 299
 
300 300
 ### /GraphDriver.DiffSize
301 301
 
... ...
@@ -313,9 +326,9 @@ Calculate the changes between the specified `ID`
313 313
 ```
314 314
 {
315 315
   "Size": 512366,
316
-  "Err": null
316
+  "Err": ""
317 317
 }
318 318
 ```
319 319
 
320 320
 Respond with the size changes between the specified `ID` and `Parent`
321
-Respond with a string error if an error occurred.
321
+Respond with a non-empty string error if an error occurred.