datacentred 0.1.1pre → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.codeclimate.yml +11 -0
- data/.coveralls.yml +1 -0
- data/.gitignore +9 -0
- data/.rubocop.yml +2 -0
- data/.yardopts +1 -0
- data/CODE_OF_CONDUCT.md +46 -0
- data/Gemfile.lock +39 -2
- data/LICENSE +21 -0
- data/README.md +160 -2
- data/circle.yml +0 -2
- data/datacentred.gemspec +17 -14
- data/docs/Datacentred.html +537 -0
- data/docs/Datacentred/Errors.html +260 -0
- data/docs/Datacentred/Errors/Error.html +139 -0
- data/docs/Datacentred/Errors/NotFound.html +145 -0
- data/docs/Datacentred/Errors/Unauthorized.html +149 -0
- data/docs/Datacentred/Errors/UnprocessableEntity.html +145 -0
- data/docs/Datacentred/Model.html +128 -0
- data/docs/Datacentred/Model/Base.html +255 -0
- data/docs/Datacentred/Model/Project.html +1729 -0
- data/docs/Datacentred/Model/Role.html +1830 -0
- data/docs/Datacentred/Model/Usage.html +510 -0
- data/docs/Datacentred/Model/User.html +832 -0
- data/docs/Datacentred/Model/Version.html +451 -0
- data/docs/Datacentred/Project.html +142 -0
- data/docs/Datacentred/Request.html +128 -0
- data/docs/Datacentred/Request/Base.html +675 -0
- data/docs/Datacentred/Request/Projects.html +1286 -0
- data/docs/Datacentred/Request/Roles.html +1286 -0
- data/docs/Datacentred/Request/Usage.html +315 -0
- data/docs/Datacentred/Request/Users.html +841 -0
- data/docs/Datacentred/Request/Versions.html +258 -0
- data/docs/Datacentred/Response.html +410 -0
- data/docs/Datacentred/Role.html +142 -0
- data/docs/Datacentred/Usage.html +142 -0
- data/docs/Datacentred/User.html +142 -0
- data/docs/Datacentred/Version.html +142 -0
- data/docs/_index.html +349 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +492 -0
- data/docs/file.README.html +231 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +231 -0
- data/docs/js/app.js +248 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +643 -0
- data/docs/top-level-namespace.html +110 -0
- data/lib/datacentred.rb +65 -12
- data/lib/datacentred/error.rb +37 -15
- data/lib/datacentred/model/base.rb +21 -0
- data/lib/datacentred/model/project.rb +90 -31
- data/lib/datacentred/model/role.rb +89 -31
- data/lib/datacentred/model/usage.rb +16 -9
- data/lib/datacentred/model/user.rb +54 -22
- data/lib/datacentred/model/version.rb +17 -8
- data/lib/datacentred/request/base.rb +68 -31
- data/lib/datacentred/request/projects.rb +92 -24
- data/lib/datacentred/request/roles.rb +92 -24
- data/lib/datacentred/request/usage.rb +10 -1
- data/lib/datacentred/request/users.rb +58 -15
- data/lib/datacentred/request/versions.rb +13 -1
- data/lib/datacentred/response.rb +6 -2
- data/test/integration/authorization_test.rb +30 -0
- data/test/integration/projects_test.rb +11 -11
- data/test/integration/roles_test.rb +17 -17
- data/test/integration/usage_test.rb +8 -8
- data/test/integration/users_test.rb +23 -19
- data/test/integration/versions_test.rb +1 -2
- data/test/test_helper.rb +8 -5
- data/test/vcr_cassettes/not_authorized.yml +57 -0
- data/test/vcr_cassettes/unexpected_error.yml +56 -0
- metadata +115 -9
@@ -0,0 +1,1729 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: Datacentred::Model::Project
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.9
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "Datacentred::Model::Project";
|
19
|
+
relpath = '../../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../../_index.html">Index (P)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../Datacentred.html" title="Datacentred (module)">Datacentred</a></span></span> » <span class='title'><span class='object_link'><a href="../Model.html" title="Datacentred::Model (module)">Model</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Project</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: Datacentred::Model::Project
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName"><span class='object_link'><a href="Base.html" title="Datacentred::Model::Base (class)">Base</a></span></span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">RecursiveOpenStruct</li>
|
78
|
+
|
79
|
+
<li class="next"><span class='object_link'><a href="Base.html" title="Datacentred::Model::Base (class)">Base</a></span></li>
|
80
|
+
|
81
|
+
<li class="next">Datacentred::Model::Project</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
</dl>
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
<dl>
|
100
|
+
<dt>Defined in:</dt>
|
101
|
+
<dd>lib/datacentred/model/project.rb</dd>
|
102
|
+
</dl>
|
103
|
+
|
104
|
+
</div>
|
105
|
+
|
106
|
+
<h2>Overview</h2><div class="docstring">
|
107
|
+
<div class="discussion">
|
108
|
+
|
109
|
+
<p>A project on your DataCentred account.</p>
|
110
|
+
|
111
|
+
<p>Projects (also called “Cloud Projects” or “Tenants”) are a way of grouping
|
112
|
+
together users and resources.</p>
|
113
|
+
|
114
|
+
<p>All projects created in your DataCented account are backed by a
|
115
|
+
corresponding project in OpenStack's identity service (Keystone).</p>
|
116
|
+
|
117
|
+
|
118
|
+
</div>
|
119
|
+
</div>
|
120
|
+
<div class="tags">
|
121
|
+
|
122
|
+
|
123
|
+
</div>
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
128
|
+
<ul class="summary">
|
129
|
+
|
130
|
+
<li class="public ">
|
131
|
+
<span class="summary_signature">
|
132
|
+
|
133
|
+
<a href="#created_at-instance_method" title="#created_at (instance method)">#<strong>created_at</strong> ⇒ Time </a>
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
</span>
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<span class="note title readonly">readonly</span>
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
<span class="summary_desc"><div class='inline'>
|
153
|
+
<p>The current value of created_at.</p>
|
154
|
+
</div></span>
|
155
|
+
|
156
|
+
</li>
|
157
|
+
|
158
|
+
|
159
|
+
<li class="public ">
|
160
|
+
<span class="summary_signature">
|
161
|
+
|
162
|
+
<a href="#id-instance_method" title="#id (instance method)">#<strong>id</strong> ⇒ String </a>
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
</span>
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
<span class="summary_desc"><div class='inline'>
|
180
|
+
<p>The current value of id.</p>
|
181
|
+
</div></span>
|
182
|
+
|
183
|
+
</li>
|
184
|
+
|
185
|
+
|
186
|
+
<li class="public ">
|
187
|
+
<span class="summary_signature">
|
188
|
+
|
189
|
+
<a href="#name-instance_method" title="#name (instance method)">#<strong>name</strong> ⇒ String </a>
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
</span>
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
<span class="summary_desc"><div class='inline'>
|
207
|
+
<p>The current value of name.</p>
|
208
|
+
</div></span>
|
209
|
+
|
210
|
+
</li>
|
211
|
+
|
212
|
+
|
213
|
+
<li class="public ">
|
214
|
+
<span class="summary_signature">
|
215
|
+
|
216
|
+
<a href="#quota_set-instance_method" title="#quota_set (instance method)">#<strong>quota_set</strong> ⇒ Hash </a>
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
</span>
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
<span class="summary_desc"><div class='inline'>
|
234
|
+
<p>The current value of quota_set.</p>
|
235
|
+
</div></span>
|
236
|
+
|
237
|
+
</li>
|
238
|
+
|
239
|
+
|
240
|
+
<li class="public ">
|
241
|
+
<span class="summary_signature">
|
242
|
+
|
243
|
+
<a href="#updated_at-instance_method" title="#updated_at (instance method)">#<strong>updated_at</strong> ⇒ Time </a>
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
</span>
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
<span class="note title readonly">readonly</span>
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
<span class="summary_desc"><div class='inline'>
|
263
|
+
<p>The current value of updated_at.</p>
|
264
|
+
</div></span>
|
265
|
+
|
266
|
+
</li>
|
267
|
+
|
268
|
+
|
269
|
+
</ul>
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
<h2>
|
276
|
+
Class Method Summary
|
277
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
278
|
+
</h2>
|
279
|
+
|
280
|
+
<ul class="summary">
|
281
|
+
|
282
|
+
<li class="public ">
|
283
|
+
<span class="summary_signature">
|
284
|
+
|
285
|
+
<a href="#add_user-class_method" title="add_user (class method)">.<strong>add_user</strong>(project_id:, user_id:) ⇒ Boolean </a>
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
</span>
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
<span class="summary_desc"><div class='inline'>
|
300
|
+
<p>Add a new user to this project, giving them access to it via OpenStack.</p>
|
301
|
+
</div></span>
|
302
|
+
|
303
|
+
</li>
|
304
|
+
|
305
|
+
|
306
|
+
<li class="public ">
|
307
|
+
<span class="summary_signature">
|
308
|
+
|
309
|
+
<a href="#all-class_method" title="all (class method)">.<strong>all</strong> ⇒ [Project] </a>
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
</span>
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
<span class="summary_desc"><div class='inline'>
|
324
|
+
<p>List all available projects.</p>
|
325
|
+
</div></span>
|
326
|
+
|
327
|
+
</li>
|
328
|
+
|
329
|
+
|
330
|
+
<li class="public ">
|
331
|
+
<span class="summary_signature">
|
332
|
+
|
333
|
+
<a href="#create-class_method" title="create (class method)">.<strong>create</strong>(params) ⇒ Project </a>
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
</span>
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
<span class="summary_desc"><div class='inline'>
|
348
|
+
<p>Create a new project.</p>
|
349
|
+
</div></span>
|
350
|
+
|
351
|
+
</li>
|
352
|
+
|
353
|
+
|
354
|
+
<li class="public ">
|
355
|
+
<span class="summary_signature">
|
356
|
+
|
357
|
+
<a href="#destroy-class_method" title="destroy (class method)">.<strong>destroy</strong>(id) ⇒ Boolean </a>
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
</span>
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
<span class="summary_desc"><div class='inline'>
|
372
|
+
<p>Permanently remove the specified project.</p>
|
373
|
+
</div></span>
|
374
|
+
|
375
|
+
</li>
|
376
|
+
|
377
|
+
|
378
|
+
<li class="public ">
|
379
|
+
<span class="summary_signature">
|
380
|
+
|
381
|
+
<a href="#find-class_method" title="find (class method)">.<strong>find</strong>(id) ⇒ Project </a>
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
</span>
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
<span class="summary_desc"><div class='inline'>
|
396
|
+
<p>Find a project by unique ID.</p>
|
397
|
+
</div></span>
|
398
|
+
|
399
|
+
</li>
|
400
|
+
|
401
|
+
|
402
|
+
<li class="public ">
|
403
|
+
<span class="summary_signature">
|
404
|
+
|
405
|
+
<a href="#remove_user-class_method" title="remove_user (class method)">.<strong>remove_user</strong>(project_id:, user_id:) ⇒ Boolean </a>
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
</span>
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
<span class="summary_desc"><div class='inline'>
|
420
|
+
<p>Remove user from this project, revoking their access to it on OpenStack.</p>
|
421
|
+
</div></span>
|
422
|
+
|
423
|
+
</li>
|
424
|
+
|
425
|
+
|
426
|
+
<li class="public ">
|
427
|
+
<span class="summary_signature">
|
428
|
+
|
429
|
+
<a href="#update-class_method" title="update (class method)">.<strong>update</strong>(id, params) ⇒ Project </a>
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
</span>
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
|
442
|
+
|
443
|
+
<span class="summary_desc"><div class='inline'>
|
444
|
+
<p>Update a project by unique ID.</p>
|
445
|
+
</div></span>
|
446
|
+
|
447
|
+
</li>
|
448
|
+
|
449
|
+
|
450
|
+
<li class="public ">
|
451
|
+
<span class="summary_signature">
|
452
|
+
|
453
|
+
<a href="#users-class_method" title="users (class method)">.<strong>users</strong>(id) ⇒ [User] </a>
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
</span>
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
<span class="summary_desc"><div class='inline'>
|
468
|
+
<p>List all users assigned to this project.</p>
|
469
|
+
</div></span>
|
470
|
+
|
471
|
+
</li>
|
472
|
+
|
473
|
+
|
474
|
+
</ul>
|
475
|
+
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
|
485
|
+
|
486
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Base.html" title="Datacentred::Model::Base (class)">Base</a></span></h3>
|
487
|
+
<p class="inherited"><span class='object_link'><a href="Base.html#initialize-instance_method" title="Datacentred::Model::Base#initialize (method)">#initialize</a></span></p>
|
488
|
+
|
489
|
+
<div id="constructor_details" class="method_details_list">
|
490
|
+
<h2>Constructor Details</h2>
|
491
|
+
|
492
|
+
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="Base.html#initialize-instance_method" title="Datacentred::Model::Base#initialize (method)">Datacentred::Model::Base</a></span></p>
|
493
|
+
|
494
|
+
</div>
|
495
|
+
|
496
|
+
<div id="instance_attr_details" class="attr_details">
|
497
|
+
<h2>Instance Attribute Details</h2>
|
498
|
+
|
499
|
+
|
500
|
+
<span id=""></span>
|
501
|
+
<div class="method_details first">
|
502
|
+
<h3 class="signature first" id="created_at-instance_method">
|
503
|
+
|
504
|
+
#<strong>created_at</strong> ⇒ <tt>Time</tt> <span class="extras">(readonly)</span>
|
505
|
+
|
506
|
+
|
507
|
+
|
508
|
+
|
509
|
+
|
510
|
+
</h3><div class="docstring">
|
511
|
+
<div class="discussion">
|
512
|
+
|
513
|
+
<p>Returns the current value of created_at</p>
|
514
|
+
|
515
|
+
|
516
|
+
</div>
|
517
|
+
</div>
|
518
|
+
<div class="tags">
|
519
|
+
|
520
|
+
<p class="tag_title">Returns:</p>
|
521
|
+
<ul class="return">
|
522
|
+
|
523
|
+
<li>
|
524
|
+
|
525
|
+
|
526
|
+
<span class='type'>(<tt>Time</tt>)</span>
|
527
|
+
|
528
|
+
|
529
|
+
|
530
|
+
—
|
531
|
+
<div class='inline'>
|
532
|
+
<p>the current value of created_at</p>
|
533
|
+
</div>
|
534
|
+
|
535
|
+
</li>
|
536
|
+
|
537
|
+
</ul>
|
538
|
+
|
539
|
+
</div><table class="source_code">
|
540
|
+
<tr>
|
541
|
+
<td>
|
542
|
+
<pre class="lines">
|
543
|
+
|
544
|
+
|
545
|
+
14
|
546
|
+
15
|
547
|
+
16</pre>
|
548
|
+
</td>
|
549
|
+
<td>
|
550
|
+
<pre class="code"><span class="info file"># File 'lib/datacentred/model/project.rb', line 14</span>
|
551
|
+
|
552
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_created_at'>created_at</span>
|
553
|
+
<span class='ivar'>@created_at</span>
|
554
|
+
<span class='kw'>end</span></pre>
|
555
|
+
</td>
|
556
|
+
</tr>
|
557
|
+
</table>
|
558
|
+
</div>
|
559
|
+
|
560
|
+
|
561
|
+
<span id="id=-instance_method"></span>
|
562
|
+
<div class="method_details ">
|
563
|
+
<h3 class="signature " id="id-instance_method">
|
564
|
+
|
565
|
+
#<strong>id</strong> ⇒ <tt>String</tt>
|
566
|
+
|
567
|
+
|
568
|
+
|
569
|
+
|
570
|
+
|
571
|
+
</h3><div class="docstring">
|
572
|
+
<div class="discussion">
|
573
|
+
|
574
|
+
<p>Returns the current value of id</p>
|
575
|
+
|
576
|
+
|
577
|
+
</div>
|
578
|
+
</div>
|
579
|
+
<div class="tags">
|
580
|
+
|
581
|
+
<p class="tag_title">Returns:</p>
|
582
|
+
<ul class="return">
|
583
|
+
|
584
|
+
<li>
|
585
|
+
|
586
|
+
|
587
|
+
<span class='type'>(<tt>String</tt>)</span>
|
588
|
+
|
589
|
+
|
590
|
+
|
591
|
+
—
|
592
|
+
<div class='inline'>
|
593
|
+
<p>the current value of id</p>
|
594
|
+
</div>
|
595
|
+
|
596
|
+
</li>
|
597
|
+
|
598
|
+
</ul>
|
599
|
+
|
600
|
+
</div><table class="source_code">
|
601
|
+
<tr>
|
602
|
+
<td>
|
603
|
+
<pre class="lines">
|
604
|
+
|
605
|
+
|
606
|
+
14
|
607
|
+
15
|
608
|
+
16</pre>
|
609
|
+
</td>
|
610
|
+
<td>
|
611
|
+
<pre class="code"><span class="info file"># File 'lib/datacentred/model/project.rb', line 14</span>
|
612
|
+
|
613
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_id'>id</span>
|
614
|
+
<span class='ivar'>@id</span>
|
615
|
+
<span class='kw'>end</span></pre>
|
616
|
+
</td>
|
617
|
+
</tr>
|
618
|
+
</table>
|
619
|
+
</div>
|
620
|
+
|
621
|
+
|
622
|
+
<span id="name=-instance_method"></span>
|
623
|
+
<div class="method_details ">
|
624
|
+
<h3 class="signature " id="name-instance_method">
|
625
|
+
|
626
|
+
#<strong>name</strong> ⇒ <tt>String</tt>
|
627
|
+
|
628
|
+
|
629
|
+
|
630
|
+
|
631
|
+
|
632
|
+
</h3><div class="docstring">
|
633
|
+
<div class="discussion">
|
634
|
+
|
635
|
+
<p>Returns the current value of name</p>
|
636
|
+
|
637
|
+
|
638
|
+
</div>
|
639
|
+
</div>
|
640
|
+
<div class="tags">
|
641
|
+
|
642
|
+
<p class="tag_title">Returns:</p>
|
643
|
+
<ul class="return">
|
644
|
+
|
645
|
+
<li>
|
646
|
+
|
647
|
+
|
648
|
+
<span class='type'>(<tt>String</tt>)</span>
|
649
|
+
|
650
|
+
|
651
|
+
|
652
|
+
—
|
653
|
+
<div class='inline'>
|
654
|
+
<p>the current value of name</p>
|
655
|
+
</div>
|
656
|
+
|
657
|
+
</li>
|
658
|
+
|
659
|
+
</ul>
|
660
|
+
|
661
|
+
</div><table class="source_code">
|
662
|
+
<tr>
|
663
|
+
<td>
|
664
|
+
<pre class="lines">
|
665
|
+
|
666
|
+
|
667
|
+
14
|
668
|
+
15
|
669
|
+
16</pre>
|
670
|
+
</td>
|
671
|
+
<td>
|
672
|
+
<pre class="code"><span class="info file"># File 'lib/datacentred/model/project.rb', line 14</span>
|
673
|
+
|
674
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
|
675
|
+
<span class='ivar'>@name</span>
|
676
|
+
<span class='kw'>end</span></pre>
|
677
|
+
</td>
|
678
|
+
</tr>
|
679
|
+
</table>
|
680
|
+
</div>
|
681
|
+
|
682
|
+
|
683
|
+
<span id="quota_set=-instance_method"></span>
|
684
|
+
<div class="method_details ">
|
685
|
+
<h3 class="signature " id="quota_set-instance_method">
|
686
|
+
|
687
|
+
#<strong>quota_set</strong> ⇒ <tt>Hash</tt>
|
688
|
+
|
689
|
+
|
690
|
+
|
691
|
+
|
692
|
+
|
693
|
+
</h3><div class="docstring">
|
694
|
+
<div class="discussion">
|
695
|
+
|
696
|
+
<p>Returns the current value of quota_set</p>
|
697
|
+
|
698
|
+
|
699
|
+
</div>
|
700
|
+
</div>
|
701
|
+
<div class="tags">
|
702
|
+
|
703
|
+
<p class="tag_title">Returns:</p>
|
704
|
+
<ul class="return">
|
705
|
+
|
706
|
+
<li>
|
707
|
+
|
708
|
+
|
709
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
710
|
+
|
711
|
+
|
712
|
+
|
713
|
+
—
|
714
|
+
<div class='inline'>
|
715
|
+
<p>the current value of quota_set</p>
|
716
|
+
</div>
|
717
|
+
|
718
|
+
</li>
|
719
|
+
|
720
|
+
</ul>
|
721
|
+
|
722
|
+
</div><table class="source_code">
|
723
|
+
<tr>
|
724
|
+
<td>
|
725
|
+
<pre class="lines">
|
726
|
+
|
727
|
+
|
728
|
+
14
|
729
|
+
15
|
730
|
+
16</pre>
|
731
|
+
</td>
|
732
|
+
<td>
|
733
|
+
<pre class="code"><span class="info file"># File 'lib/datacentred/model/project.rb', line 14</span>
|
734
|
+
|
735
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_quota_set'>quota_set</span>
|
736
|
+
<span class='ivar'>@quota_set</span>
|
737
|
+
<span class='kw'>end</span></pre>
|
738
|
+
</td>
|
739
|
+
</tr>
|
740
|
+
</table>
|
741
|
+
</div>
|
742
|
+
|
743
|
+
|
744
|
+
<span id=""></span>
|
745
|
+
<div class="method_details ">
|
746
|
+
<h3 class="signature " id="updated_at-instance_method">
|
747
|
+
|
748
|
+
#<strong>updated_at</strong> ⇒ <tt>Time</tt> <span class="extras">(readonly)</span>
|
749
|
+
|
750
|
+
|
751
|
+
|
752
|
+
|
753
|
+
|
754
|
+
</h3><div class="docstring">
|
755
|
+
<div class="discussion">
|
756
|
+
|
757
|
+
<p>Returns the current value of updated_at</p>
|
758
|
+
|
759
|
+
|
760
|
+
</div>
|
761
|
+
</div>
|
762
|
+
<div class="tags">
|
763
|
+
|
764
|
+
<p class="tag_title">Returns:</p>
|
765
|
+
<ul class="return">
|
766
|
+
|
767
|
+
<li>
|
768
|
+
|
769
|
+
|
770
|
+
<span class='type'>(<tt>Time</tt>)</span>
|
771
|
+
|
772
|
+
|
773
|
+
|
774
|
+
—
|
775
|
+
<div class='inline'>
|
776
|
+
<p>the current value of updated_at</p>
|
777
|
+
</div>
|
778
|
+
|
779
|
+
</li>
|
780
|
+
|
781
|
+
</ul>
|
782
|
+
|
783
|
+
</div><table class="source_code">
|
784
|
+
<tr>
|
785
|
+
<td>
|
786
|
+
<pre class="lines">
|
787
|
+
|
788
|
+
|
789
|
+
14
|
790
|
+
15
|
791
|
+
16</pre>
|
792
|
+
</td>
|
793
|
+
<td>
|
794
|
+
<pre class="code"><span class="info file"># File 'lib/datacentred/model/project.rb', line 14</span>
|
795
|
+
|
796
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_updated_at'>updated_at</span>
|
797
|
+
<span class='ivar'>@updated_at</span>
|
798
|
+
<span class='kw'>end</span></pre>
|
799
|
+
</td>
|
800
|
+
</tr>
|
801
|
+
</table>
|
802
|
+
</div>
|
803
|
+
|
804
|
+
</div>
|
805
|
+
|
806
|
+
|
807
|
+
<div id="class_method_details" class="method_details_list">
|
808
|
+
<h2>Class Method Details</h2>
|
809
|
+
|
810
|
+
|
811
|
+
<div class="method_details first">
|
812
|
+
<h3 class="signature first" id="add_user-class_method">
|
813
|
+
|
814
|
+
.<strong>add_user</strong>(project_id:, user_id:) ⇒ <tt>Boolean</tt>
|
815
|
+
|
816
|
+
|
817
|
+
|
818
|
+
|
819
|
+
|
820
|
+
</h3><div class="docstring">
|
821
|
+
<div class="discussion">
|
822
|
+
|
823
|
+
<p>Add a new user to this project, giving them access to it via OpenStack.</p>
|
824
|
+
|
825
|
+
|
826
|
+
</div>
|
827
|
+
</div>
|
828
|
+
<div class="tags">
|
829
|
+
<p class="tag_title">Parameters:</p>
|
830
|
+
<ul class="param">
|
831
|
+
|
832
|
+
<li>
|
833
|
+
|
834
|
+
<span class='name'>project_id</span>
|
835
|
+
|
836
|
+
|
837
|
+
<span class='type'>(<tt>String</tt>)</span>
|
838
|
+
|
839
|
+
|
840
|
+
|
841
|
+
—
|
842
|
+
<div class='inline'>
|
843
|
+
<p>The unique identifier for this project.</p>
|
844
|
+
</div>
|
845
|
+
|
846
|
+
</li>
|
847
|
+
|
848
|
+
<li>
|
849
|
+
|
850
|
+
<span class='name'>user_id</span>
|
851
|
+
|
852
|
+
|
853
|
+
<span class='type'>(<tt>String</tt>)</span>
|
854
|
+
|
855
|
+
|
856
|
+
|
857
|
+
—
|
858
|
+
<div class='inline'>
|
859
|
+
<p>The unique identifier for this user.</p>
|
860
|
+
</div>
|
861
|
+
|
862
|
+
</li>
|
863
|
+
|
864
|
+
</ul>
|
865
|
+
|
866
|
+
<p class="tag_title">Returns:</p>
|
867
|
+
<ul class="return">
|
868
|
+
|
869
|
+
<li>
|
870
|
+
|
871
|
+
|
872
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
873
|
+
|
874
|
+
|
875
|
+
|
876
|
+
—
|
877
|
+
<div class='inline'>
|
878
|
+
<p>Confirms the user was added (or is already present).</p>
|
879
|
+
</div>
|
880
|
+
|
881
|
+
</li>
|
882
|
+
|
883
|
+
</ul>
|
884
|
+
<p class="tag_title">Raises:</p>
|
885
|
+
<ul class="raise">
|
886
|
+
|
887
|
+
<li>
|
888
|
+
|
889
|
+
|
890
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Errors/NotFound.html" title="Datacentred::Errors::NotFound (class)">Errors::NotFound</a></span></tt>)</span>
|
891
|
+
|
892
|
+
|
893
|
+
|
894
|
+
—
|
895
|
+
<div class='inline'>
|
896
|
+
<p>Raised if the project or user couldn't be found.</p>
|
897
|
+
</div>
|
898
|
+
|
899
|
+
</li>
|
900
|
+
|
901
|
+
<li>
|
902
|
+
|
903
|
+
|
904
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Errors/Unauthorized.html" title="Datacentred::Errors::Unauthorized (class)">Errors::Unauthorized</a></span></tt>)</span>
|
905
|
+
|
906
|
+
|
907
|
+
|
908
|
+
—
|
909
|
+
<div class='inline'>
|
910
|
+
<p>Raised if credentials aren't valid.</p>
|
911
|
+
</div>
|
912
|
+
|
913
|
+
</li>
|
914
|
+
|
915
|
+
</ul>
|
916
|
+
|
917
|
+
</div><table class="source_code">
|
918
|
+
<tr>
|
919
|
+
<td>
|
920
|
+
<pre class="lines">
|
921
|
+
|
922
|
+
|
923
|
+
84
|
924
|
+
85
|
925
|
+
86
|
926
|
+
87</pre>
|
927
|
+
</td>
|
928
|
+
<td>
|
929
|
+
<pre class="code"><span class="info file"># File 'lib/datacentred/model/project.rb', line 84</span>
|
930
|
+
|
931
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_add_user'>add_user</span><span class='lparen'>(</span><span class='label'>project_id:</span><span class='comma'>,</span> <span class='label'>user_id:</span><span class='rparen'>)</span>
|
932
|
+
<span class='const'><span class='object_link'><a href="../Request.html" title="Datacentred::Request (module)">Request</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Request/Projects.html" title="Datacentred::Request::Projects (class)">Projects</a></span></span><span class='period'>.</span><span class='id identifier rubyid_add_user'><span class='object_link'><a href="../Request/Projects.html#add_user-class_method" title="Datacentred::Request::Projects.add_user (method)">add_user</a></span></span> <span class='id identifier rubyid_project_id'>project_id</span><span class='comma'>,</span> <span class='id identifier rubyid_user_id'>user_id</span>
|
933
|
+
<span class='kw'>true</span>
|
934
|
+
<span class='kw'>end</span></pre>
|
935
|
+
</td>
|
936
|
+
</tr>
|
937
|
+
</table>
|
938
|
+
</div>
|
939
|
+
|
940
|
+
<div class="method_details ">
|
941
|
+
<h3 class="signature " id="all-class_method">
|
942
|
+
|
943
|
+
.<strong>all</strong> ⇒ <tt>[<span class='object_link'><a href="" title="Datacentred::Model::Project (class)">Project</a></span>]</tt>
|
944
|
+
|
945
|
+
|
946
|
+
|
947
|
+
|
948
|
+
|
949
|
+
</h3><div class="docstring">
|
950
|
+
<div class="discussion">
|
951
|
+
|
952
|
+
<p>List all available projects.</p>
|
953
|
+
|
954
|
+
<p> @raise [Errors::Unauthorized] Raised if credentials aren't valid.</p>
|
955
|
+
|
956
|
+
|
957
|
+
</div>
|
958
|
+
</div>
|
959
|
+
<div class="tags">
|
960
|
+
|
961
|
+
<p class="tag_title">Returns:</p>
|
962
|
+
<ul class="return">
|
963
|
+
|
964
|
+
<li>
|
965
|
+
|
966
|
+
|
967
|
+
<span class='type'>(<tt>[<span class='object_link'><a href="" title="Datacentred::Model::Project (class)">Project</a></span>]</tt>)</span>
|
968
|
+
|
969
|
+
|
970
|
+
|
971
|
+
—
|
972
|
+
<div class='inline'>
|
973
|
+
<p>A collection of all projects on this account.</p>
|
974
|
+
</div>
|
975
|
+
|
976
|
+
</li>
|
977
|
+
|
978
|
+
</ul>
|
979
|
+
|
980
|
+
</div><table class="source_code">
|
981
|
+
<tr>
|
982
|
+
<td>
|
983
|
+
<pre class="lines">
|
984
|
+
|
985
|
+
|
986
|
+
30
|
987
|
+
31
|
988
|
+
32</pre>
|
989
|
+
</td>
|
990
|
+
<td>
|
991
|
+
<pre class="code"><span class="info file"># File 'lib/datacentred/model/project.rb', line 30</span>
|
992
|
+
|
993
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_all'>all</span>
|
994
|
+
<span class='const'><span class='object_link'><a href="../Request.html" title="Datacentred::Request (module)">Request</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Request/Projects.html" title="Datacentred::Request::Projects (class)">Projects</a></span></span><span class='period'>.</span><span class='id identifier rubyid_list'><span class='object_link'><a href="../Request/Projects.html#list-class_method" title="Datacentred::Request::Projects.list (method)">list</a></span></span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_project'>project</span><span class='op'>|</span> <span class='id identifier rubyid_new'>new</span> <span class='id identifier rubyid_project'>project</span> <span class='rbrace'>}</span>
|
995
|
+
<span class='kw'>end</span></pre>
|
996
|
+
</td>
|
997
|
+
</tr>
|
998
|
+
</table>
|
999
|
+
</div>
|
1000
|
+
|
1001
|
+
<div class="method_details ">
|
1002
|
+
<h3 class="signature " id="create-class_method">
|
1003
|
+
|
1004
|
+
.<strong>create</strong>(params) ⇒ <tt><span class='object_link'><a href="" title="Datacentred::Model::Project (class)">Project</a></span></tt>
|
1005
|
+
|
1006
|
+
|
1007
|
+
|
1008
|
+
|
1009
|
+
|
1010
|
+
</h3><div class="docstring">
|
1011
|
+
<div class="discussion">
|
1012
|
+
|
1013
|
+
<p>Create a new project.</p>
|
1014
|
+
|
1015
|
+
|
1016
|
+
</div>
|
1017
|
+
</div>
|
1018
|
+
<div class="tags">
|
1019
|
+
<p class="tag_title">Parameters:</p>
|
1020
|
+
<ul class="param">
|
1021
|
+
|
1022
|
+
<li>
|
1023
|
+
|
1024
|
+
<span class='name'>params</span>
|
1025
|
+
|
1026
|
+
|
1027
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1028
|
+
|
1029
|
+
|
1030
|
+
|
1031
|
+
—
|
1032
|
+
<div class='inline'>
|
1033
|
+
<p>Project attributes</p>
|
1034
|
+
</div>
|
1035
|
+
|
1036
|
+
</li>
|
1037
|
+
|
1038
|
+
</ul>
|
1039
|
+
|
1040
|
+
<p class="tag_title">Returns:</p>
|
1041
|
+
<ul class="return">
|
1042
|
+
|
1043
|
+
<li>
|
1044
|
+
|
1045
|
+
|
1046
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="Datacentred::Model::Project (class)">Project</a></span></tt>)</span>
|
1047
|
+
|
1048
|
+
|
1049
|
+
|
1050
|
+
—
|
1051
|
+
<div class='inline'>
|
1052
|
+
<p>New project.</p>
|
1053
|
+
</div>
|
1054
|
+
|
1055
|
+
</li>
|
1056
|
+
|
1057
|
+
</ul>
|
1058
|
+
<p class="tag_title">Raises:</p>
|
1059
|
+
<ul class="raise">
|
1060
|
+
|
1061
|
+
<li>
|
1062
|
+
|
1063
|
+
|
1064
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Errors/UnprocessableEntity.html" title="Datacentred::Errors::UnprocessableEntity (class)">Errors::UnprocessableEntity</a></span></tt>)</span>
|
1065
|
+
|
1066
|
+
|
1067
|
+
|
1068
|
+
—
|
1069
|
+
<div class='inline'>
|
1070
|
+
<p>Raised if validations fail for the supplied attributes.</p>
|
1071
|
+
</div>
|
1072
|
+
|
1073
|
+
</li>
|
1074
|
+
|
1075
|
+
<li>
|
1076
|
+
|
1077
|
+
|
1078
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Errors/Unauthorized.html" title="Datacentred::Errors::Unauthorized (class)">Errors::Unauthorized</a></span></tt>)</span>
|
1079
|
+
|
1080
|
+
|
1081
|
+
|
1082
|
+
—
|
1083
|
+
<div class='inline'>
|
1084
|
+
<p>Raised if credentials aren't valid.</p>
|
1085
|
+
</div>
|
1086
|
+
|
1087
|
+
</li>
|
1088
|
+
|
1089
|
+
</ul>
|
1090
|
+
|
1091
|
+
</div><table class="source_code">
|
1092
|
+
<tr>
|
1093
|
+
<td>
|
1094
|
+
<pre class="lines">
|
1095
|
+
|
1096
|
+
|
1097
|
+
22
|
1098
|
+
23
|
1099
|
+
24</pre>
|
1100
|
+
</td>
|
1101
|
+
<td>
|
1102
|
+
<pre class="code"><span class="info file"># File 'lib/datacentred/model/project.rb', line 22</span>
|
1103
|
+
|
1104
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
|
1105
|
+
<span class='id identifier rubyid_new'>new</span> <span class='const'><span class='object_link'><a href="../Request.html" title="Datacentred::Request (module)">Request</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Request/Projects.html" title="Datacentred::Request::Projects (class)">Projects</a></span></span><span class='period'>.</span><span class='id identifier rubyid_create'><span class='object_link'><a href="../Request/Projects.html#create-class_method" title="Datacentred::Request::Projects.create (method)">create</a></span></span> <span class='id identifier rubyid_params'>params</span>
|
1106
|
+
<span class='kw'>end</span></pre>
|
1107
|
+
</td>
|
1108
|
+
</tr>
|
1109
|
+
</table>
|
1110
|
+
</div>
|
1111
|
+
|
1112
|
+
<div class="method_details ">
|
1113
|
+
<h3 class="signature " id="destroy-class_method">
|
1114
|
+
|
1115
|
+
.<strong>destroy</strong>(id) ⇒ <tt>Boolean</tt>
|
1116
|
+
|
1117
|
+
|
1118
|
+
|
1119
|
+
|
1120
|
+
|
1121
|
+
</h3><div class="docstring">
|
1122
|
+
<div class="discussion">
|
1123
|
+
|
1124
|
+
<p>Permanently remove the specified project.</p>
|
1125
|
+
|
1126
|
+
|
1127
|
+
</div>
|
1128
|
+
</div>
|
1129
|
+
<div class="tags">
|
1130
|
+
<p class="tag_title">Parameters:</p>
|
1131
|
+
<ul class="param">
|
1132
|
+
|
1133
|
+
<li>
|
1134
|
+
|
1135
|
+
<span class='name'>id</span>
|
1136
|
+
|
1137
|
+
|
1138
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1139
|
+
|
1140
|
+
|
1141
|
+
|
1142
|
+
—
|
1143
|
+
<div class='inline'>
|
1144
|
+
<p>The unique identifier for this project.</p>
|
1145
|
+
</div>
|
1146
|
+
|
1147
|
+
</li>
|
1148
|
+
|
1149
|
+
</ul>
|
1150
|
+
|
1151
|
+
<p class="tag_title">Returns:</p>
|
1152
|
+
<ul class="return">
|
1153
|
+
|
1154
|
+
<li>
|
1155
|
+
|
1156
|
+
|
1157
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1158
|
+
|
1159
|
+
|
1160
|
+
|
1161
|
+
—
|
1162
|
+
<div class='inline'>
|
1163
|
+
<p>Confirms the user was destroyed.</p>
|
1164
|
+
</div>
|
1165
|
+
|
1166
|
+
</li>
|
1167
|
+
|
1168
|
+
</ul>
|
1169
|
+
<p class="tag_title">Raises:</p>
|
1170
|
+
<ul class="raise">
|
1171
|
+
|
1172
|
+
<li>
|
1173
|
+
|
1174
|
+
|
1175
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Errors/NotFound.html" title="Datacentred::Errors::NotFound (class)">Errors::NotFound</a></span></tt>)</span>
|
1176
|
+
|
1177
|
+
|
1178
|
+
|
1179
|
+
—
|
1180
|
+
<div class='inline'>
|
1181
|
+
<p>Raised if the project couldn't be found.</p>
|
1182
|
+
</div>
|
1183
|
+
|
1184
|
+
</li>
|
1185
|
+
|
1186
|
+
<li>
|
1187
|
+
|
1188
|
+
|
1189
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Errors/UnprocessableEntity.html" title="Datacentred::Errors::UnprocessableEntity (class)">Errors::UnprocessableEntity</a></span></tt>)</span>
|
1190
|
+
|
1191
|
+
|
1192
|
+
|
1193
|
+
—
|
1194
|
+
<div class='inline'>
|
1195
|
+
<p>Raised if validations fail for the specified project.</p>
|
1196
|
+
</div>
|
1197
|
+
|
1198
|
+
</li>
|
1199
|
+
|
1200
|
+
<li>
|
1201
|
+
|
1202
|
+
|
1203
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Errors/Unauthorized.html" title="Datacentred::Errors::Unauthorized (class)">Errors::Unauthorized</a></span></tt>)</span>
|
1204
|
+
|
1205
|
+
|
1206
|
+
|
1207
|
+
—
|
1208
|
+
<div class='inline'>
|
1209
|
+
<p>Raised if credentials aren't valid.</p>
|
1210
|
+
</div>
|
1211
|
+
|
1212
|
+
</li>
|
1213
|
+
|
1214
|
+
</ul>
|
1215
|
+
|
1216
|
+
</div><table class="source_code">
|
1217
|
+
<tr>
|
1218
|
+
<td>
|
1219
|
+
<pre class="lines">
|
1220
|
+
|
1221
|
+
|
1222
|
+
63
|
1223
|
+
64
|
1224
|
+
65
|
1225
|
+
66</pre>
|
1226
|
+
</td>
|
1227
|
+
<td>
|
1228
|
+
<pre class="code"><span class="info file"># File 'lib/datacentred/model/project.rb', line 63</span>
|
1229
|
+
|
1230
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_destroy'>destroy</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
|
1231
|
+
<span class='const'><span class='object_link'><a href="../Request.html" title="Datacentred::Request (module)">Request</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Request/Projects.html" title="Datacentred::Request::Projects (class)">Projects</a></span></span><span class='period'>.</span><span class='id identifier rubyid_destroy'><span class='object_link'><a href="../Request/Projects.html#destroy-class_method" title="Datacentred::Request::Projects.destroy (method)">destroy</a></span></span> <span class='id identifier rubyid_id'>id</span>
|
1232
|
+
<span class='kw'>true</span>
|
1233
|
+
<span class='kw'>end</span></pre>
|
1234
|
+
</td>
|
1235
|
+
</tr>
|
1236
|
+
</table>
|
1237
|
+
</div>
|
1238
|
+
|
1239
|
+
<div class="method_details ">
|
1240
|
+
<h3 class="signature " id="find-class_method">
|
1241
|
+
|
1242
|
+
.<strong>find</strong>(id) ⇒ <tt><span class='object_link'><a href="" title="Datacentred::Model::Project (class)">Project</a></span></tt>
|
1243
|
+
|
1244
|
+
|
1245
|
+
|
1246
|
+
|
1247
|
+
|
1248
|
+
</h3><div class="docstring">
|
1249
|
+
<div class="discussion">
|
1250
|
+
|
1251
|
+
<p>Find a project by unique ID.</p>
|
1252
|
+
|
1253
|
+
|
1254
|
+
</div>
|
1255
|
+
</div>
|
1256
|
+
<div class="tags">
|
1257
|
+
<p class="tag_title">Parameters:</p>
|
1258
|
+
<ul class="param">
|
1259
|
+
|
1260
|
+
<li>
|
1261
|
+
|
1262
|
+
<span class='name'>id</span>
|
1263
|
+
|
1264
|
+
|
1265
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1266
|
+
|
1267
|
+
|
1268
|
+
|
1269
|
+
—
|
1270
|
+
<div class='inline'>
|
1271
|
+
<p>The unique identifier for this project.</p>
|
1272
|
+
</div>
|
1273
|
+
|
1274
|
+
</li>
|
1275
|
+
|
1276
|
+
</ul>
|
1277
|
+
|
1278
|
+
<p class="tag_title">Returns:</p>
|
1279
|
+
<ul class="return">
|
1280
|
+
|
1281
|
+
<li>
|
1282
|
+
|
1283
|
+
|
1284
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="Datacentred::Model::Project (class)">Project</a></span></tt>)</span>
|
1285
|
+
|
1286
|
+
|
1287
|
+
|
1288
|
+
—
|
1289
|
+
<div class='inline'>
|
1290
|
+
<p>The project, if it exists.</p>
|
1291
|
+
</div>
|
1292
|
+
|
1293
|
+
</li>
|
1294
|
+
|
1295
|
+
</ul>
|
1296
|
+
<p class="tag_title">Raises:</p>
|
1297
|
+
<ul class="raise">
|
1298
|
+
|
1299
|
+
<li>
|
1300
|
+
|
1301
|
+
|
1302
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Errors/Unauthorized.html" title="Datacentred::Errors::Unauthorized (class)">Errors::Unauthorized</a></span></tt>)</span>
|
1303
|
+
|
1304
|
+
|
1305
|
+
|
1306
|
+
—
|
1307
|
+
<div class='inline'>
|
1308
|
+
<p>Raised if credentials aren't valid.</p>
|
1309
|
+
</div>
|
1310
|
+
|
1311
|
+
</li>
|
1312
|
+
|
1313
|
+
<li>
|
1314
|
+
|
1315
|
+
|
1316
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Errors/NotFound.html" title="Datacentred::Errors::NotFound (class)">Errors::NotFound</a></span></tt>)</span>
|
1317
|
+
|
1318
|
+
|
1319
|
+
|
1320
|
+
—
|
1321
|
+
<div class='inline'>
|
1322
|
+
<p>Raised if the project couldn't be found.</p>
|
1323
|
+
</div>
|
1324
|
+
|
1325
|
+
</li>
|
1326
|
+
|
1327
|
+
</ul>
|
1328
|
+
|
1329
|
+
</div><table class="source_code">
|
1330
|
+
<tr>
|
1331
|
+
<td>
|
1332
|
+
<pre class="lines">
|
1333
|
+
|
1334
|
+
|
1335
|
+
40
|
1336
|
+
41
|
1337
|
+
42</pre>
|
1338
|
+
</td>
|
1339
|
+
<td>
|
1340
|
+
<pre class="code"><span class="info file"># File 'lib/datacentred/model/project.rb', line 40</span>
|
1341
|
+
|
1342
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
|
1343
|
+
<span class='id identifier rubyid_new'>new</span> <span class='const'><span class='object_link'><a href="../Request.html" title="Datacentred::Request (module)">Request</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Request/Projects.html" title="Datacentred::Request::Projects (class)">Projects</a></span></span><span class='period'>.</span><span class='id identifier rubyid_show'><span class='object_link'><a href="../Request/Projects.html#show-class_method" title="Datacentred::Request::Projects.show (method)">show</a></span></span> <span class='id identifier rubyid_id'>id</span>
|
1344
|
+
<span class='kw'>end</span></pre>
|
1345
|
+
</td>
|
1346
|
+
</tr>
|
1347
|
+
</table>
|
1348
|
+
</div>
|
1349
|
+
|
1350
|
+
<div class="method_details ">
|
1351
|
+
<h3 class="signature " id="remove_user-class_method">
|
1352
|
+
|
1353
|
+
.<strong>remove_user</strong>(project_id:, user_id:) ⇒ <tt>Boolean</tt>
|
1354
|
+
|
1355
|
+
|
1356
|
+
|
1357
|
+
|
1358
|
+
|
1359
|
+
</h3><div class="docstring">
|
1360
|
+
<div class="discussion">
|
1361
|
+
|
1362
|
+
<p>Remove user from this project, revoking their access to it on OpenStack.</p>
|
1363
|
+
|
1364
|
+
|
1365
|
+
</div>
|
1366
|
+
</div>
|
1367
|
+
<div class="tags">
|
1368
|
+
<p class="tag_title">Parameters:</p>
|
1369
|
+
<ul class="param">
|
1370
|
+
|
1371
|
+
<li>
|
1372
|
+
|
1373
|
+
<span class='name'>project_id</span>
|
1374
|
+
|
1375
|
+
|
1376
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1377
|
+
|
1378
|
+
|
1379
|
+
|
1380
|
+
—
|
1381
|
+
<div class='inline'>
|
1382
|
+
<p>The unique identifier for this project.</p>
|
1383
|
+
</div>
|
1384
|
+
|
1385
|
+
</li>
|
1386
|
+
|
1387
|
+
<li>
|
1388
|
+
|
1389
|
+
<span class='name'>user_id</span>
|
1390
|
+
|
1391
|
+
|
1392
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1393
|
+
|
1394
|
+
|
1395
|
+
|
1396
|
+
—
|
1397
|
+
<div class='inline'>
|
1398
|
+
<p>The unique identifier for this user.</p>
|
1399
|
+
</div>
|
1400
|
+
|
1401
|
+
</li>
|
1402
|
+
|
1403
|
+
</ul>
|
1404
|
+
|
1405
|
+
<p class="tag_title">Returns:</p>
|
1406
|
+
<ul class="return">
|
1407
|
+
|
1408
|
+
<li>
|
1409
|
+
|
1410
|
+
|
1411
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1412
|
+
|
1413
|
+
|
1414
|
+
|
1415
|
+
—
|
1416
|
+
<div class='inline'>
|
1417
|
+
<p>Confirms that user was removed (or is already absent).</p>
|
1418
|
+
</div>
|
1419
|
+
|
1420
|
+
</li>
|
1421
|
+
|
1422
|
+
</ul>
|
1423
|
+
<p class="tag_title">Raises:</p>
|
1424
|
+
<ul class="raise">
|
1425
|
+
|
1426
|
+
<li>
|
1427
|
+
|
1428
|
+
|
1429
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Errors/NotFound.html" title="Datacentred::Errors::NotFound (class)">Errors::NotFound</a></span></tt>)</span>
|
1430
|
+
|
1431
|
+
|
1432
|
+
|
1433
|
+
—
|
1434
|
+
<div class='inline'>
|
1435
|
+
<p>Raised if project or user couldn't be found.</p>
|
1436
|
+
</div>
|
1437
|
+
|
1438
|
+
</li>
|
1439
|
+
|
1440
|
+
<li>
|
1441
|
+
|
1442
|
+
|
1443
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Errors/Unauthorized.html" title="Datacentred::Errors::Unauthorized (class)">Errors::Unauthorized</a></span></tt>)</span>
|
1444
|
+
|
1445
|
+
|
1446
|
+
|
1447
|
+
—
|
1448
|
+
<div class='inline'>
|
1449
|
+
<p>Raised if credentials aren't valid.</p>
|
1450
|
+
</div>
|
1451
|
+
|
1452
|
+
</li>
|
1453
|
+
|
1454
|
+
</ul>
|
1455
|
+
|
1456
|
+
</div><table class="source_code">
|
1457
|
+
<tr>
|
1458
|
+
<td>
|
1459
|
+
<pre class="lines">
|
1460
|
+
|
1461
|
+
|
1462
|
+
96
|
1463
|
+
97
|
1464
|
+
98
|
1465
|
+
99</pre>
|
1466
|
+
</td>
|
1467
|
+
<td>
|
1468
|
+
<pre class="code"><span class="info file"># File 'lib/datacentred/model/project.rb', line 96</span>
|
1469
|
+
|
1470
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_remove_user'>remove_user</span><span class='lparen'>(</span><span class='label'>project_id:</span><span class='comma'>,</span> <span class='label'>user_id:</span><span class='rparen'>)</span>
|
1471
|
+
<span class='const'><span class='object_link'><a href="../Request.html" title="Datacentred::Request (module)">Request</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Request/Projects.html" title="Datacentred::Request::Projects (class)">Projects</a></span></span><span class='period'>.</span><span class='id identifier rubyid_remove_user'><span class='object_link'><a href="../Request/Projects.html#remove_user-class_method" title="Datacentred::Request::Projects.remove_user (method)">remove_user</a></span></span> <span class='id identifier rubyid_project_id'>project_id</span><span class='comma'>,</span> <span class='id identifier rubyid_user_id'>user_id</span>
|
1472
|
+
<span class='kw'>true</span>
|
1473
|
+
<span class='kw'>end</span></pre>
|
1474
|
+
</td>
|
1475
|
+
</tr>
|
1476
|
+
</table>
|
1477
|
+
</div>
|
1478
|
+
|
1479
|
+
<div class="method_details ">
|
1480
|
+
<h3 class="signature " id="update-class_method">
|
1481
|
+
|
1482
|
+
.<strong>update</strong>(id, params) ⇒ <tt><span class='object_link'><a href="" title="Datacentred::Model::Project (class)">Project</a></span></tt>
|
1483
|
+
|
1484
|
+
|
1485
|
+
|
1486
|
+
|
1487
|
+
|
1488
|
+
</h3><div class="docstring">
|
1489
|
+
<div class="discussion">
|
1490
|
+
|
1491
|
+
<p>Update a project by unique ID.</p>
|
1492
|
+
|
1493
|
+
|
1494
|
+
</div>
|
1495
|
+
</div>
|
1496
|
+
<div class="tags">
|
1497
|
+
<p class="tag_title">Parameters:</p>
|
1498
|
+
<ul class="param">
|
1499
|
+
|
1500
|
+
<li>
|
1501
|
+
|
1502
|
+
<span class='name'>id</span>
|
1503
|
+
|
1504
|
+
|
1505
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1506
|
+
|
1507
|
+
|
1508
|
+
|
1509
|
+
—
|
1510
|
+
<div class='inline'>
|
1511
|
+
<p>The unique identifier for this project.</p>
|
1512
|
+
</div>
|
1513
|
+
|
1514
|
+
</li>
|
1515
|
+
|
1516
|
+
<li>
|
1517
|
+
|
1518
|
+
<span class='name'>params</span>
|
1519
|
+
|
1520
|
+
|
1521
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1522
|
+
|
1523
|
+
|
1524
|
+
|
1525
|
+
—
|
1526
|
+
<div class='inline'>
|
1527
|
+
<p>Project attributes.</p>
|
1528
|
+
</div>
|
1529
|
+
|
1530
|
+
</li>
|
1531
|
+
|
1532
|
+
</ul>
|
1533
|
+
|
1534
|
+
<p class="tag_title">Returns:</p>
|
1535
|
+
<ul class="return">
|
1536
|
+
|
1537
|
+
<li>
|
1538
|
+
|
1539
|
+
|
1540
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="Datacentred::Model::Project (class)">Project</a></span></tt>)</span>
|
1541
|
+
|
1542
|
+
|
1543
|
+
|
1544
|
+
—
|
1545
|
+
<div class='inline'>
|
1546
|
+
<p>The updated project.</p>
|
1547
|
+
</div>
|
1548
|
+
|
1549
|
+
</li>
|
1550
|
+
|
1551
|
+
</ul>
|
1552
|
+
<p class="tag_title">Raises:</p>
|
1553
|
+
<ul class="raise">
|
1554
|
+
|
1555
|
+
<li>
|
1556
|
+
|
1557
|
+
|
1558
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Errors/UnprocessableEntity.html" title="Datacentred::Errors::UnprocessableEntity (class)">Errors::UnprocessableEntity</a></span></tt>)</span>
|
1559
|
+
|
1560
|
+
|
1561
|
+
|
1562
|
+
—
|
1563
|
+
<div class='inline'>
|
1564
|
+
<p>Raised if validations fail for the supplied attributes.</p>
|
1565
|
+
</div>
|
1566
|
+
|
1567
|
+
</li>
|
1568
|
+
|
1569
|
+
<li>
|
1570
|
+
|
1571
|
+
|
1572
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Errors/NotFound.html" title="Datacentred::Errors::NotFound (class)">Errors::NotFound</a></span></tt>)</span>
|
1573
|
+
|
1574
|
+
|
1575
|
+
|
1576
|
+
—
|
1577
|
+
<div class='inline'>
|
1578
|
+
<p>Raised if the project could not be found.</p>
|
1579
|
+
</div>
|
1580
|
+
|
1581
|
+
</li>
|
1582
|
+
|
1583
|
+
<li>
|
1584
|
+
|
1585
|
+
|
1586
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Errors/Unauthorized.html" title="Datacentred::Errors::Unauthorized (class)">Errors::Unauthorized</a></span></tt>)</span>
|
1587
|
+
|
1588
|
+
|
1589
|
+
|
1590
|
+
—
|
1591
|
+
<div class='inline'>
|
1592
|
+
<p>Raised if credentials aren't valid.</p>
|
1593
|
+
</div>
|
1594
|
+
|
1595
|
+
</li>
|
1596
|
+
|
1597
|
+
</ul>
|
1598
|
+
|
1599
|
+
</div><table class="source_code">
|
1600
|
+
<tr>
|
1601
|
+
<td>
|
1602
|
+
<pre class="lines">
|
1603
|
+
|
1604
|
+
|
1605
|
+
52
|
1606
|
+
53
|
1607
|
+
54</pre>
|
1608
|
+
</td>
|
1609
|
+
<td>
|
1610
|
+
<pre class="code"><span class="info file"># File 'lib/datacentred/model/project.rb', line 52</span>
|
1611
|
+
|
1612
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_update'>update</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
|
1613
|
+
<span class='id identifier rubyid_new'>new</span> <span class='const'><span class='object_link'><a href="../Request.html" title="Datacentred::Request (module)">Request</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Request/Projects.html" title="Datacentred::Request::Projects (class)">Projects</a></span></span><span class='period'>.</span><span class='id identifier rubyid_update'><span class='object_link'><a href="../Request/Projects.html#update-class_method" title="Datacentred::Request::Projects.update (method)">update</a></span></span> <span class='id identifier rubyid_id'>id</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span>
|
1614
|
+
<span class='kw'>end</span></pre>
|
1615
|
+
</td>
|
1616
|
+
</tr>
|
1617
|
+
</table>
|
1618
|
+
</div>
|
1619
|
+
|
1620
|
+
<div class="method_details ">
|
1621
|
+
<h3 class="signature " id="users-class_method">
|
1622
|
+
|
1623
|
+
.<strong>users</strong>(id) ⇒ <tt>[<span class='object_link'><a href="User.html" title="Datacentred::Model::User (class)">User</a></span>]</tt>
|
1624
|
+
|
1625
|
+
|
1626
|
+
|
1627
|
+
|
1628
|
+
|
1629
|
+
</h3><div class="docstring">
|
1630
|
+
<div class="discussion">
|
1631
|
+
|
1632
|
+
<p>List all users assigned to this project.</p>
|
1633
|
+
|
1634
|
+
|
1635
|
+
</div>
|
1636
|
+
</div>
|
1637
|
+
<div class="tags">
|
1638
|
+
<p class="tag_title">Parameters:</p>
|
1639
|
+
<ul class="param">
|
1640
|
+
|
1641
|
+
<li>
|
1642
|
+
|
1643
|
+
<span class='name'>id</span>
|
1644
|
+
|
1645
|
+
|
1646
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1647
|
+
|
1648
|
+
|
1649
|
+
|
1650
|
+
—
|
1651
|
+
<div class='inline'>
|
1652
|
+
<p>The unique identifier for this project.</p>
|
1653
|
+
</div>
|
1654
|
+
|
1655
|
+
</li>
|
1656
|
+
|
1657
|
+
</ul>
|
1658
|
+
|
1659
|
+
<p class="tag_title">Returns:</p>
|
1660
|
+
<ul class="return">
|
1661
|
+
|
1662
|
+
<li>
|
1663
|
+
|
1664
|
+
|
1665
|
+
<span class='type'>(<tt>[<span class='object_link'><a href="User.html" title="Datacentred::Model::User (class)">User</a></span>]</tt>)</span>
|
1666
|
+
|
1667
|
+
|
1668
|
+
|
1669
|
+
—
|
1670
|
+
<div class='inline'>
|
1671
|
+
<p>A collection of the project's users.</p>
|
1672
|
+
</div>
|
1673
|
+
|
1674
|
+
</li>
|
1675
|
+
|
1676
|
+
</ul>
|
1677
|
+
<p class="tag_title">Raises:</p>
|
1678
|
+
<ul class="raise">
|
1679
|
+
|
1680
|
+
<li>
|
1681
|
+
|
1682
|
+
|
1683
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Errors/Unauthorized.html" title="Datacentred::Errors::Unauthorized (class)">Errors::Unauthorized</a></span></tt>)</span>
|
1684
|
+
|
1685
|
+
|
1686
|
+
|
1687
|
+
—
|
1688
|
+
<div class='inline'>
|
1689
|
+
<p>Raised if credentials aren't valid.</p>
|
1690
|
+
</div>
|
1691
|
+
|
1692
|
+
</li>
|
1693
|
+
|
1694
|
+
</ul>
|
1695
|
+
|
1696
|
+
</div><table class="source_code">
|
1697
|
+
<tr>
|
1698
|
+
<td>
|
1699
|
+
<pre class="lines">
|
1700
|
+
|
1701
|
+
|
1702
|
+
73
|
1703
|
+
74
|
1704
|
+
75</pre>
|
1705
|
+
</td>
|
1706
|
+
<td>
|
1707
|
+
<pre class="code"><span class="info file"># File 'lib/datacentred/model/project.rb', line 73</span>
|
1708
|
+
|
1709
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_users'>users</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
|
1710
|
+
<span class='const'><span class='object_link'><a href="../Request.html" title="Datacentred::Request (module)">Request</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Request/Projects.html" title="Datacentred::Request::Projects (class)">Projects</a></span></span><span class='period'>.</span><span class='id identifier rubyid_list_users'><span class='object_link'><a href="../Request/Projects.html#list_users-class_method" title="Datacentred::Request::Projects.list_users (method)">list_users</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_user'>user</span><span class='op'>|</span> <span class='id identifier rubyid_new'>new</span> <span class='id identifier rubyid_user'>user</span> <span class='rbrace'>}</span>
|
1711
|
+
<span class='kw'>end</span></pre>
|
1712
|
+
</td>
|
1713
|
+
</tr>
|
1714
|
+
</table>
|
1715
|
+
</div>
|
1716
|
+
|
1717
|
+
</div>
|
1718
|
+
|
1719
|
+
</div>
|
1720
|
+
|
1721
|
+
<div id="footer">
|
1722
|
+
Generated on Fri Sep 15 16:27:43 2017 by
|
1723
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1724
|
+
0.9.9 (ruby-2.3.1).
|
1725
|
+
</div>
|
1726
|
+
|
1727
|
+
</div>
|
1728
|
+
</body>
|
1729
|
+
</html>
|