This repository has been archived by the owner on May 12, 2021. It is now read-only.
/
cimi-rest-volumes.html
442 lines (384 loc) · 15.2 KB
/
cimi-rest-volumes.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CIMI Resource Collections - Volume</title>
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Le JavaScript -->
<script src="/assets/js/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="/assets/js/bootstrap-dropdown.js" type="text/javascript"></script>
<script src="/assets/js/jquery.tweet.js" type="text/javascript"></script>
<script src="/assets/js/application.js" type="text/javascript"></script>
<script src="/assets/js/bootstrap-transition.js"></script>
<script src="/assets/js/bootstrap-alert.js"></script>
<script src="/assets/js/bootstrap-modal.js"></script>
<script src="/assets/js/bootstrap-scrollspy.js"></script>
<script src="/assets/js/bootstrap-tab.js"></script>
<script src="/assets/js/bootstrap-tooltip.js"></script>
<script src="/assets/js/bootstrap-popover.js"></script>
<script src="/assets/js/bootstrap-button.js"></script>
<script src="/assets/js/bootstrap-collapse.js"></script>
<script src="/assets/js/bootstrap-carousel.js"></script>
<script src="/assets/js/bootstrap-typeahead.js"></script>
<!-- Le styles -->
<link href="/assets/css/bootstrap.css" rel="stylesheet">
<link href="/assets/css/application.css" rel="stylesheet">
<link rel="shortcut icon" href="/assets/img/favicon.ico">
</head>
<body><div style="background: red"><h1>2015/07/20 - Apache Deltacloud has been retired. </h1><h2>For more information, please explore the <a href="http://attic.apache.org/">Attic</a>. </h2></div>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="/"><img src="/assets/img/logo.png" width="152"
alt="Deltacloud API"/></a>
<ul class="nav top-nav">
<li><a href="/">Home</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">About<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/about.html">What is Deltacloud?</a></li>
<li><a href="/drivers.html#drivers">Supported Providers</a></li>
</ul>
</li>
<li><a href="/download.html">Download</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Installation<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/install-deltacloud.html">Install Deltacloud</a></li>
<li><a href="/run-deltacloud-server.html">Run the Deltacloud Server</a></li>
</ul>
</li>
<li class="dropdown">
<a href="/usage.html" class="dropdown-toggle" data-toggle="dropdown">Usage<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/usage.html#usingapi">Using API</a></li>
<li><a href="/usage.html#clients">Client Libraries</a></li>
<li><a href="/command-tools.html">Command Line Tools</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contribute<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/getting-sources.html">Getting Sources</a></li>
<li><a href="/how-to-contribute.html">How Can I Contribute?</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">API<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/rest-api.html">Deltacloud REST API</a></li>
<li><a href="/curl-examples.html">Deltacloud API cURL examples</a></li>
<li><a href="/drivers.html">Drivers API</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">CIMI<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/cimi-rest.html">CIMI REST API</a></li>
<li><a href="/cimi-curl.html">CIMI cURL Examples</a></li>
</ul>
</li>
<li><a href="/contact.html">Contact</a></li>
</ul>
</div>
</div>
</div>
<div class="container content">
<p><br></p>
<div class="row">
<div class="span9">
<h3 id="cimi-machine-image">Volume</h3>
<p>
<strong><em>
A Volume represents storage at either the block or the file-system level. Volumes can be connected to
Machines. Once connected, Volumes can be accessed by processes on that Machine.
<br>
A Volume Collection resource represents the collection of Volumes within a Provider.
</em></strong>
</p>
</div>
<div class="span3">
<ul class="nav nav-list well">
<li class="nav-header">
CIMI REST API
</li>
<li><a href="../cimi-rest.html">Introduction</a></li>
<li><a href="cimi-rest-entry-point.html">Cloud Entry Point</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
CIMI Resources
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="cimi-rest-resource-metadata.html">ResourceMetadata</a></li>
<li><a href="cimi-rest-collections.html">Machine</a></li>
<li><a href="cimi-rest-volumes.html">Volume</a></li>
</ul>
</li>
<hr>
<li class="nav-header">
Volume Resources
</li>
<ul class="nav nav-list">
<li class="active"><a href="cimi-rest-volumes.html">Volume</a></li>
<li><a href="cimi-rest-volume-images.html">VolumeImage</a></li>
<li><a href="cimi-rest-volume-configs.html">VolumeConfiguration</a></li>
<li><a href="cimi-rest-volume-templates.html">VolumeTemplate</a></li>
</ul>
</ul>
</div>
</div>
<ul class="nav nav-pills">
<li class="active"><a href="#volume-collection" data-toggle="tab">Retrieve the Volume Collection</a></li>
<li><a href="#single-volume" data-toggle="tab">Retrieve a single Volume</a></li>
<li><a href="#create-volume" data-toggle="tab">Create a Volume</a></li>
<li><a href="#delete-volume" data-toggle="tab">Delete a Volume</a></li>
</ul>
<hr>
<div class="tab-content">
<div class="tab-pane active" id="volume-collection">
<h4>Retrieve the Volume Collection</h4>
<p>Example request:</p>
<pre>
GET /cimi/volumes HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu)
Host: localhost:3001
Accept: application/xml
</pre>
<p>Server response:</p>
<pre>
HTTP/1.1 200 OK
Content-Type: application/xml
CIMI-Specification-Version: 1.0.1
Content-Length: 1521
ETag: 5e589664c1b03a34ad42ffe606bd61f1
Cache-Control: max-age=0, private, must-revalidate
Date: Fri, 04 Jan 2013 16:43:27 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife
<Collection xmlns="http://schemas.dmtf.org/cimi/1"
resourceURI="http://schemas.dmtf.org/cimi/1/VolumeCollection">
<id>http://localhost:3001/cimi/volumes</id>
<count>3</count>
<Volume>
<id>http://localhost:3001/cimi/volumes/vol3</id>
<name>vol3</name>
<description>Description of Volume</description>
<created>2009-07-30T14:35:11Z</created>
<state>IN-USE</state>
<type>http://schemas.dmtf.org/cimi/1/mapped</type>
<capacity>1048576</capacity>
<bootable>false</bootable>
<operation rel="delete" href="http://localhost:3001/cimi/volumes/vol3" />
</Volume>
<Volume>
<id>http://localhost:3001/cimi/volumes/vol2</id>
<name>vol2</name>
<description>Description of Volume</description>
<created>2009-07-30T14:35:11Z</created>
<state>AVAILABLE</state>
<type>http://schemas.dmtf.org/cimi/1/mapped</type>
<capacity>1048576</capacity>
<bootable>false</bootable>
<operation rel="delete" href="http://localhost:3001/cimi/volumes/vol2" />
</Volume>
<Volume>
<id>http://localhost:3001/cimi/volumes/vol1</id>
<name>vol1</name>
<description>Description of Volume</description>
<created>2009-07-30T14:35:11Z</created>
<state>AVAILABLE</state>
<type>http://schemas.dmtf.org/cimi/1/mapped</type>
<capacity>1048576</capacity>
<bootable>false</bootable>
<operation rel="delete" href="http://localhost:3001/cimi/volumes/vol1" />
</Volume>
<operation rel="add" href="http://localhost:3001/cimi/volumes" />
</Collection>
</pre>
</div>
<div class="tab-pane active" id="single-volume">
<h4>Retrieve a single Volume</h4>
<p>Example request:</p>
<pre>
GET /cimi/volumes/vol1 HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu)
Host: localhost:3001
Accept: application/xml
</pre>
<p>Server response:</p>
<pre>
HTTP/1.1 200 OK
Content-Type: application/xml
CIMI-Specification-Version: 1.0.1
Content-Length: 490
ETag: a4be42f0743b1a6efbd2ed431667e7d4
Cache-Control: max-age=0, private, must-revalidate
Date: Mon, 07 Jan 2013 13:57:46 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife
<Volume xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/Volume">
<id>http://localhost:3001/cimi/volumes/vol1</id>
<name>vol1</name>
<description>Description of Volume</description>
<created>2009-07-30T14:35:11Z</created>
<state>AVAILABLE</state>
<type>http://schemas.dmtf.org/cimi/1/mapped</type>
<capacity>1048576</capacity>
<bootable>false</bootable>
<operation rel="delete" href="http://localhost:3001/cimi/volumes/vol1" />
</Volume>
</pre>
</div>
<div class="tab-pane active" id="create-volume">
<h4>Create a Volume</h4>
<p>Using VolumeTemplate with VolumeConfiguration by reference - Example request:</p>
<pre>
POST //cimi/volumes HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu)
Host: localhost:3001
Content-Type:application/xml
Accept:application/xml
Content-Length: 224
<VolumeCreate>
<name> marios_new_volume </name>
<description> a new volume </description>
<volumeTemplate>
<volumeConfig
href="http://localhost:3001/cimi/volume_configurations/2">
</volumeConfig>
</volumeTemplate>
</VolumeCreate>
</pre>
<p>Server response:</p>
<pre>
HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/volumes/Volume1357567397
CIMI-Specification-Version: 1.0.1
Content-Length: 523
ETag: 56c05e34776373022cefda3c3c4467cb
Cache-Control: max-age=0, private, must-revalidate
Date: Mon, 07 Jan 2013 14:03:17 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife
<Volume xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/Volume">
<id>http://localhost:3001/cimi/volumes/Volume1357567397</id>
<name>marios_new_volume</name>
<description>a new volume</description>
<created>2013-01-07T16:03:17+02:00</created>
<state>AVAILABLE</state>
<type>http://schemas.dmtf.org/cimi/1/mapped</type>
<capacity>2097152</capacity>
<bootable>false</bootable>
<operation rel="delete" href="http://localhost:3001/cimi/volumes/Volume1357567397" />
</Volume>
</pre>
<br>
<p>Using VolumeTemplate with VolumeConfiguration by value - Example request:</p>
<pre>
POST /cimi/volumes HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
Host: localhost:3001
Accept:application/xml
Content-Type: application/xml
Content-Length: 239
<VolumeCreate>
<name> marios_volume </name>
<description> a new volume </description>
<volumeTemplate>
<volumeConfig>
<type>http://schemas.dmtf.org/cimi/1/mapped</type>
<capacity> 1024 </capacity>
</volumeConfig>
</volumeTemplate>
</VolumeCreate>
</pre>
<p>Server response:</p>
<pre>
HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://localhost:3001/cimi/volumes/Volume1357567628
CIMI-Specification-Version: 1.0.1
Content-Length: 516
ETag: d82624fda83c895cbeaebb08fff005c6
Cache-Control: max-age=0, private, must-revalidate
Date: Mon, 07 Jan 2013 14:07:08 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife
<Volume xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/Volume">
<id>http://localhost:3001/cimi/volumes/Volume1357567628</id>
<name>marios_volume</name>
<description>a new volume</description>
<created>2013-01-07T16:07:08+02:00</created>
<state>AVAILABLE</state>
<type>http://schemas.dmtf.org/cimi/1/mapped</type>
<capacity>1024</capacity>
<bootable>false</bootable>
<operation rel="delete" href="http://localhost:3001/cimi/volumes/Volume1357567628" />
</Volume>
</pre>
</div>
<div class="tab-pane active" id="delete-volume">
<h4>Retrieve the Volume Collection</h4>
<p>Example request:</p>
<pre>
DELETE /cimi/volumes/Volume1357567628 HTTP/1.1
Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
Host: localhost:3001
Accept: application/xml
</pre>
<p>Server response:</p>
<pre>
HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: text/html;charset=utf-8
CIMI-Specification-Version: 1.0.1
Content-Length: 0
Date: Mon, 07 Jan 2013 14:16:21 GMT
Connection: keep-alive
Server: thin 1.5.0 codename Knife
</pre>
</div>
</div>
<footer class="footer">
<p class="pull-right"><span class='icon-circle-arrow-up'> </span><a href="#">Back to top</a></p>
<div class='row'>
<div class='span3'>
<img src="/assets/img/asf.png" alt="Apache Software Foundation"/>
</div>
<div class='span9'>
<strong>Apache Deltacloud</strong> is a top-level project at the <a
href="http://www.apache.org">Apache Software Foundation</a>,
having graduated from the ASF Incubator in October
2011. Through a collaborative and meritocratic development process, Apache
projects deliver enterprise-grade, freely available software products that
attract large communities of users.
</div>
</div>
</footer>
</div> <!-- /container -->
<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://stats.salasaga.org/aeolus/piwik/" : "http://stats.salasaga.org/aeolus/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 2);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script><noscript><p><img src="http://stats.salasaga.org/aeolus/piwik/piwik.php?idsite=2" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Tracking Code -->
</body>
</html>