gce-host 0.1.0

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.
Files changed (53) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +20 -0
  3. data/.yardopts +6 -0
  4. data/CHANGELOG.md +3 -0
  5. data/Gemfile +3 -0
  6. data/LICENSE +22 -0
  7. data/README.md +210 -0
  8. data/Rakefile +30 -0
  9. data/bin/gce-host +4 -0
  10. data/docs/GCE.html +132 -0
  11. data/docs/GCE/Host.html +901 -0
  12. data/docs/GCE/Host/CLI.html +610 -0
  13. data/docs/GCE/Host/Config.html +1195 -0
  14. data/docs/GCE/Host/GCEClient.html +215 -0
  15. data/docs/GCE/Host/GCEClient/Error.html +127 -0
  16. data/docs/GCE/Host/GCEClient/NotFound.html +131 -0
  17. data/docs/GCE/Host/HashUtil.html +178 -0
  18. data/docs/GCE/Host/HostData.html +1658 -0
  19. data/docs/GCE/Host/RoleData.html +932 -0
  20. data/docs/GCE/Host/StringUtil.html +359 -0
  21. data/docs/_index.html +231 -0
  22. data/docs/class_list.html +58 -0
  23. data/docs/css/common.css +1 -0
  24. data/docs/css/full_list.css +57 -0
  25. data/docs/css/style.css +339 -0
  26. data/docs/file.LICENSE.html +95 -0
  27. data/docs/file.README.html +312 -0
  28. data/docs/file_list.html +63 -0
  29. data/docs/frames.html +26 -0
  30. data/docs/index.html +312 -0
  31. data/docs/js/app.js +219 -0
  32. data/docs/js/full_list.js +181 -0
  33. data/docs/js/jquery.js +4 -0
  34. data/docs/method_list.html +477 -0
  35. data/docs/top-level-namespace.html +112 -0
  36. data/example/example.conf +8 -0
  37. data/example/example.rb +6 -0
  38. data/gce-host.gemspec +26 -0
  39. data/lib/gce-host.rb +7 -0
  40. data/lib/gce/host.rb +120 -0
  41. data/lib/gce/host/cli.rb +151 -0
  42. data/lib/gce/host/config.rb +109 -0
  43. data/lib/gce/host/gce_client.rb +69 -0
  44. data/lib/gce/host/hash_util.rb +11 -0
  45. data/lib/gce/host/host_data.rb +227 -0
  46. data/lib/gce/host/role_data.rb +64 -0
  47. data/lib/gce/host/string_util.rb +31 -0
  48. data/lib/gce/host/version.rb +5 -0
  49. data/spec/gce_client_spec.rb +29 -0
  50. data/spec/host_spec.rb +199 -0
  51. data/spec/spec_helper.rb +22 -0
  52. data/terraform.tf +52 -0
  53. metadata +226 -0
@@ -0,0 +1,178 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: GCE::Host::HashUtil
8
+
9
+ &mdash; Documentation by YARD 0.8.7.6
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
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../';
20
+ framesUrl = "../../frames.html#!GCE/Host/HashUtil.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../../_index.html">Index (H)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../GCE.html" title="GCE (class)">GCE</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Host.html" title="GCE::Host (class)">Host</a></span></span>
36
+ &raquo;
37
+ <span class="title">HashUtil</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: GCE::Host::HashUtil
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/gce/host/hash_util.rb</dd>
83
+
84
+ </dl>
85
+ <div class="clear"></div>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <h2>
96
+ Class Method Summary
97
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
98
+ </h2>
99
+
100
+ <ul class="summary">
101
+
102
+ <li class="public ">
103
+ <span class="summary_signature">
104
+
105
+ <a href="#except-class_method" title="except (class method)">+ (Object) <strong>except</strong>(hash, *keys) </a>
106
+
107
+
108
+
109
+ </span>
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+ <span class="summary_desc"><div class='inline'></div></span>
120
+
121
+ </li>
122
+
123
+
124
+ </ul>
125
+
126
+
127
+
128
+
129
+ <div id="class_method_details" class="method_details_list">
130
+ <h2>Class Method Details</h2>
131
+
132
+
133
+ <div class="method_details first">
134
+ <h3 class="signature first" id="except-class_method">
135
+
136
+ + (<tt>Object</tt>) <strong>except</strong>(hash, *keys)
137
+
138
+
139
+
140
+
141
+
142
+ </h3><table class="source_code">
143
+ <tr>
144
+ <td>
145
+ <pre class="lines">
146
+
147
+
148
+ 4
149
+ 5
150
+ 6
151
+ 7
152
+ 8</pre>
153
+ </td>
154
+ <td>
155
+ <pre class="code"><span class="info file"># File 'lib/gce/host/hash_util.rb', line 4</span>
156
+
157
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_except'>except</span><span class='lparen'>(</span><span class='id identifier rubyid_hash'>hash</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_keys'>keys</span><span class='rparen'>)</span>
158
+ <span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
159
+ <span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='op'>|</span> <span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
160
+ <span class='id identifier rubyid_hash'>hash</span>
161
+ <span class='kw'>end</span></pre>
162
+ </td>
163
+ </tr>
164
+ </table>
165
+ </div>
166
+
167
+ </div>
168
+
169
+ </div>
170
+
171
+ <div id="footer">
172
+ Generated on Wed Nov 23 20:08:31 2016 by
173
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
174
+ 0.8.7.6 (ruby-2.3.2).
175
+ </div>
176
+
177
+ </body>
178
+ </html>
@@ -0,0 +1,1658 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: GCE::Host::HostData
8
+
9
+ &mdash; Documentation by YARD 0.8.7.6
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
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../';
20
+ framesUrl = "../../frames.html#!GCE/Host/HostData.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../../_index.html">Index (H)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../GCE.html" title="GCE (class)">GCE</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Host.html" title="GCE::Host (class)">Host</a></span></span>
36
+ &raquo;
37
+ <span class="title">HostData</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: GCE::Host::HostData
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">GCE::Host::HostData</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+ <dt class="r2 last">Defined in:</dt>
97
+ <dd class="r2 last">lib/gce/host/host_data.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>Represents each host</p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div>
114
+
115
+
116
+
117
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
118
+ <ul class="summary">
119
+
120
+ <li class="public ">
121
+ <span class="summary_signature">
122
+
123
+ <a href="#instance-instance_method" title="#instance (instance method)">- (Object) <strong>instance</strong> </a>
124
+
125
+
126
+
127
+ </span>
128
+
129
+
130
+
131
+
132
+ <span class="note title readonly">readonly</span>
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+ <span class="summary_desc"><div class='inline'>
143
+ <p>Returns the value of attribute instance.</p>
144
+ </div></span>
145
+
146
+ </li>
147
+
148
+
149
+ </ul>
150
+
151
+
152
+
153
+
154
+
155
+ <h2>
156
+ Instance Method Summary
157
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
158
+ </h2>
159
+
160
+ <ul class="summary">
161
+
162
+ <li class="public ">
163
+ <span class="summary_signature">
164
+
165
+ <a href="#creation_timestamp-instance_method" title="#creation_timestamp (instance method)">- (Object) <strong>creation_timestamp</strong> </a>
166
+
167
+
168
+
169
+ </span>
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+ <span class="summary_desc"><div class='inline'></div></span>
180
+
181
+ </li>
182
+
183
+
184
+ <li class="public ">
185
+ <span class="summary_signature">
186
+
187
+ <a href="#hostname-instance_method" title="#hostname (instance method)">- (Object) <strong>hostname</strong> </a>
188
+
189
+
190
+
191
+ </span>
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+ <span class="summary_desc"><div class='inline'></div></span>
202
+
203
+ </li>
204
+
205
+
206
+ <li class="public ">
207
+ <span class="summary_signature">
208
+
209
+ <a href="#info-instance_method" title="#info (instance method)">- (Object) <strong>info</strong> </a>
210
+
211
+
212
+
213
+ </span>
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+ <span class="summary_desc"><div class='inline'></div></span>
224
+
225
+ </li>
226
+
227
+
228
+ <li class="public ">
229
+ <span class="summary_signature">
230
+
231
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (HostData) <strong>initialize</strong>(instance) </a>
232
+
233
+
234
+
235
+ </span>
236
+
237
+
238
+ <span class="note title constructor">constructor</span>
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+ <span class="summary_desc"><div class='inline'>
248
+ <p>:hostname, # hostname :roles, # roles.split(&#39;,&#39;) such as
249
+ web:app1,db:app1 :instance, # Aws::GCE::Types::Instance itself.</p>
250
+ </div></span>
251
+
252
+ </li>
253
+
254
+
255
+ <li class="public ">
256
+ <span class="summary_signature">
257
+
258
+ <a href="#inspect-instance_method" title="#inspect (instance method)">- (Object) <strong>inspect</strong> </a>
259
+
260
+
261
+
262
+ </span>
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+ <span class="summary_desc"><div class='inline'></div></span>
273
+
274
+ </li>
275
+
276
+
277
+ <li class="public ">
278
+ <span class="summary_signature">
279
+
280
+ <a href="#instance_id-instance_method" title="#instance_id (instance method)">- (Object) <strong>instance_id</strong> </a>
281
+
282
+
283
+
284
+ </span>
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+
294
+ <span class="summary_desc"><div class='inline'></div></span>
295
+
296
+ </li>
297
+
298
+
299
+ <li class="public ">
300
+ <span class="summary_signature">
301
+
302
+ <a href="#ip-instance_method" title="#ip (instance method)">- (Object) <strong>ip</strong> </a>
303
+
304
+
305
+
306
+ </span>
307
+
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+
316
+ <span class="summary_desc"><div class='inline'>
317
+ <p>compatibility with dino-host.</p>
318
+ </div></span>
319
+
320
+ </li>
321
+
322
+
323
+ <li class="public ">
324
+ <span class="summary_signature">
325
+
326
+ <a href="#match%3F-instance_method" title="#match? (instance method)">- (Boolean) <strong>match?</strong>(condition) </a>
327
+
328
+
329
+
330
+ </span>
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+
339
+
340
+ <span class="summary_desc"><div class='inline'>
341
+ <p>match with condition or not.</p>
342
+ </div></span>
343
+
344
+ </li>
345
+
346
+
347
+ <li class="public ">
348
+ <span class="summary_signature">
349
+
350
+ <a href="#private_ip_address-instance_method" title="#private_ip_address (instance method)">- (Object) <strong>private_ip_address</strong> </a>
351
+
352
+
353
+
354
+ </span>
355
+
356
+
357
+
358
+
359
+
360
+
361
+
362
+
363
+
364
+ <span class="summary_desc"><div class='inline'></div></span>
365
+
366
+ </li>
367
+
368
+
369
+ <li class="public ">
370
+ <span class="summary_signature">
371
+
372
+ <a href="#private_ip_addresses-instance_method" title="#private_ip_addresses (instance method)">- (Object) <strong>private_ip_addresses</strong> </a>
373
+
374
+
375
+
376
+ </span>
377
+
378
+
379
+
380
+
381
+
382
+
383
+
384
+
385
+
386
+ <span class="summary_desc"><div class='inline'></div></span>
387
+
388
+ </li>
389
+
390
+
391
+ <li class="public ">
392
+ <span class="summary_signature">
393
+
394
+ <a href="#provisioning%3F-instance_method" title="#provisioning? (instance method)">- (Boolean) <strong>provisioning?</strong> </a>
395
+
396
+
397
+
398
+ </span>
399
+
400
+
401
+
402
+
403
+
404
+
405
+
406
+
407
+
408
+ <span class="summary_desc"><div class='inline'></div></span>
409
+
410
+ </li>
411
+
412
+
413
+ <li class="public ">
414
+ <span class="summary_signature">
415
+
416
+ <a href="#public_ip_address-instance_method" title="#public_ip_address (instance method)">- (Object) <strong>public_ip_address</strong> </a>
417
+
418
+
419
+
420
+ </span>
421
+
422
+
423
+
424
+
425
+
426
+
427
+
428
+
429
+
430
+ <span class="summary_desc"><div class='inline'></div></span>
431
+
432
+ </li>
433
+
434
+
435
+ <li class="public ">
436
+ <span class="summary_signature">
437
+
438
+ <a href="#public_ip_addresses-instance_method" title="#public_ip_addresses (instance method)">- (Object) <strong>public_ip_addresses</strong> </a>
439
+
440
+
441
+
442
+ </span>
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+
451
+
452
+ <span class="summary_desc"><div class='inline'></div></span>
453
+
454
+ </li>
455
+
456
+
457
+ <li class="public ">
458
+ <span class="summary_signature">
459
+
460
+ <a href="#roles-instance_method" title="#roles (instance method)">- (Object) <strong>roles</strong> </a>
461
+
462
+
463
+
464
+ </span>
465
+
466
+
467
+
468
+
469
+
470
+
471
+
472
+
473
+
474
+ <span class="summary_desc"><div class='inline'></div></span>
475
+
476
+ </li>
477
+
478
+
479
+ <li class="public ">
480
+ <span class="summary_signature">
481
+
482
+ <a href="#running%3F-instance_method" title="#running? (instance method)">- (Boolean) <strong>running?</strong> </a>
483
+
484
+
485
+
486
+ </span>
487
+
488
+
489
+
490
+
491
+
492
+
493
+
494
+
495
+
496
+ <span class="summary_desc"><div class='inline'></div></span>
497
+
498
+ </li>
499
+
500
+
501
+ <li class="public ">
502
+ <span class="summary_signature">
503
+
504
+ <a href="#staging%3F-instance_method" title="#staging? (instance method)">- (Boolean) <strong>staging?</strong> </a>
505
+
506
+
507
+
508
+ </span>
509
+
510
+
511
+
512
+
513
+
514
+
515
+
516
+
517
+
518
+ <span class="summary_desc"><div class='inline'></div></span>
519
+
520
+ </li>
521
+
522
+
523
+ <li class="public ">
524
+ <span class="summary_signature">
525
+
526
+ <a href="#start_date-instance_method" title="#start_date (instance method)">- (Object) <strong>start_date</strong> </a>
527
+
528
+
529
+
530
+ </span>
531
+
532
+
533
+
534
+
535
+
536
+
537
+
538
+
539
+
540
+ <span class="summary_desc"><div class='inline'>
541
+ <p>compatibility with dino-host.</p>
542
+ </div></span>
543
+
544
+ </li>
545
+
546
+
547
+ <li class="public ">
548
+ <span class="summary_signature">
549
+
550
+ <a href="#stopping%3F-instance_method" title="#stopping? (instance method)">- (Boolean) <strong>stopping?</strong> </a>
551
+
552
+
553
+
554
+ </span>
555
+
556
+
557
+
558
+
559
+
560
+
561
+
562
+
563
+
564
+ <span class="summary_desc"><div class='inline'></div></span>
565
+
566
+ </li>
567
+
568
+
569
+ <li class="public ">
570
+ <span class="summary_signature">
571
+
572
+ <a href="#terminated%3F-instance_method" title="#terminated? (instance method)">- (Boolean) <strong>terminated?</strong> </a>
573
+
574
+
575
+
576
+ </span>
577
+
578
+
579
+
580
+
581
+
582
+
583
+
584
+
585
+
586
+ <span class="summary_desc"><div class='inline'></div></span>
587
+
588
+ </li>
589
+
590
+
591
+ <li class="public ">
592
+ <span class="summary_signature">
593
+
594
+ <a href="#to_hash-instance_method" title="#to_hash (instance method)">- (Object) <strong>to_hash</strong> </a>
595
+
596
+
597
+
598
+ </span>
599
+
600
+
601
+
602
+
603
+
604
+
605
+
606
+
607
+
608
+ <span class="summary_desc"><div class='inline'></div></span>
609
+
610
+ </li>
611
+
612
+
613
+ <li class="public ">
614
+ <span class="summary_signature">
615
+
616
+ <a href="#usages-instance_method" title="#usages (instance method)">- (Object) <strong>usages</strong> </a>
617
+
618
+
619
+
620
+ </span>
621
+
622
+
623
+
624
+
625
+
626
+
627
+
628
+
629
+
630
+ <span class="summary_desc"><div class='inline'>
631
+ <p>compatibility with dino-host.</p>
632
+ </div></span>
633
+
634
+ </li>
635
+
636
+
637
+ <li class="public ">
638
+ <span class="summary_signature">
639
+
640
+ <a href="#zone-instance_method" title="#zone (instance method)">- (Object) <strong>zone</strong> </a>
641
+
642
+
643
+
644
+ </span>
645
+
646
+
647
+
648
+
649
+
650
+
651
+
652
+
653
+
654
+ <span class="summary_desc"><div class='inline'></div></span>
655
+
656
+ </li>
657
+
658
+
659
+ </ul>
660
+
661
+
662
+ <div id="constructor_details" class="method_details_list">
663
+ <h2>Constructor Details</h2>
664
+
665
+ <div class="method_details first">
666
+ <h3 class="signature first" id="initialize-instance_method">
667
+
668
+ - (<tt><span class='object_link'><a href="" title="GCE::Host::HostData (class)">HostData</a></span></tt>) <strong>initialize</strong>(instance)
669
+
670
+
671
+
672
+
673
+
674
+ </h3><div class="docstring">
675
+ <div class="discussion">
676
+
677
+ <p>:hostname, # hostname :roles, # roles.split(&#39;,&#39;) such as
678
+ web:app1,db:app1 :instance, # Aws::GCE::Types::Instance itself</p>
679
+
680
+ <p>and OPTIONAL_ARRAY_KEYS, OPTIONAL_STRING_KEYS</p>
681
+
682
+
683
+ </div>
684
+ </div>
685
+ <div class="tags">
686
+
687
+
688
+ </div><table class="source_code">
689
+ <tr>
690
+ <td>
691
+ <pre class="lines">
692
+
693
+
694
+ 14
695
+ 15
696
+ 16</pre>
697
+ </td>
698
+ <td>
699
+ <pre class="code"><span class="info file"># File 'lib/gce/host/host_data.rb', line 14</span>
700
+
701
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_instance'>instance</span><span class='rparen'>)</span>
702
+ <span class='ivar'>@instance</span> <span class='op'>=</span> <span class='id identifier rubyid_instance'>instance</span>
703
+ <span class='kw'>end</span></pre>
704
+ </td>
705
+ </tr>
706
+ </table>
707
+ </div>
708
+
709
+ </div>
710
+
711
+ <div id="instance_attr_details" class="attr_details">
712
+ <h2>Instance Attribute Details</h2>
713
+
714
+
715
+ <span id=""></span>
716
+ <div class="method_details first">
717
+ <h3 class="signature first" id="instance-instance_method">
718
+
719
+ - (<tt>Object</tt>) <strong>instance</strong> <span class="extras">(readonly)</span>
720
+
721
+
722
+
723
+
724
+
725
+ </h3><div class="docstring">
726
+ <div class="discussion">
727
+
728
+ <p>Returns the value of attribute instance</p>
729
+
730
+
731
+ </div>
732
+ </div>
733
+ <div class="tags">
734
+
735
+
736
+ </div><table class="source_code">
737
+ <tr>
738
+ <td>
739
+ <pre class="lines">
740
+
741
+
742
+ 7
743
+ 8
744
+ 9</pre>
745
+ </td>
746
+ <td>
747
+ <pre class="code"><span class="info file"># File 'lib/gce/host/host_data.rb', line 7</span>
748
+
749
+ <span class='kw'>def</span> <span class='id identifier rubyid_instance'>instance</span>
750
+ <span class='ivar'>@instance</span>
751
+ <span class='kw'>end</span></pre>
752
+ </td>
753
+ </tr>
754
+ </table>
755
+ </div>
756
+
757
+ </div>
758
+
759
+
760
+ <div id="instance_method_details" class="method_details_list">
761
+ <h2>Instance Method Details</h2>
762
+
763
+
764
+ <div class="method_details first">
765
+ <h3 class="signature first" id="creation_timestamp-instance_method">
766
+
767
+ - (<tt>Object</tt>) <strong>creation_timestamp</strong>
768
+
769
+
770
+
771
+
772
+
773
+ </h3><table class="source_code">
774
+ <tr>
775
+ <td>
776
+ <pre class="lines">
777
+
778
+
779
+ 70
780
+ 71
781
+ 72</pre>
782
+ </td>
783
+ <td>
784
+ <pre class="code"><span class="info file"># File 'lib/gce/host/host_data.rb', line 70</span>
785
+
786
+ <span class='kw'>def</span> <span class='id identifier rubyid_creation_timestamp'>creation_timestamp</span>
787
+ <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_creation_timestamp'>creation_timestamp</span>
788
+ <span class='kw'>end</span></pre>
789
+ </td>
790
+ </tr>
791
+ </table>
792
+ </div>
793
+
794
+ <div class="method_details ">
795
+ <h3 class="signature " id="hostname-instance_method">
796
+
797
+ - (<tt>Object</tt>) <strong>hostname</strong>
798
+
799
+
800
+
801
+
802
+
803
+ </h3><table class="source_code">
804
+ <tr>
805
+ <td>
806
+ <pre class="lines">
807
+
808
+
809
+ 18
810
+ 19
811
+ 20</pre>
812
+ </td>
813
+ <td>
814
+ <pre class="code"><span class="info file"># File 'lib/gce/host/host_data.rb', line 18</span>
815
+
816
+ <span class='kw'>def</span> <span class='id identifier rubyid_hostname'>hostname</span>
817
+ <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span>
818
+ <span class='kw'>end</span></pre>
819
+ </td>
820
+ </tr>
821
+ </table>
822
+ </div>
823
+
824
+ <div class="method_details ">
825
+ <h3 class="signature " id="info-instance_method">
826
+
827
+ - (<tt>Object</tt>) <strong>info</strong>
828
+
829
+
830
+
831
+
832
+
833
+ </h3><table class="source_code">
834
+ <tr>
835
+ <td>
836
+ <pre class="lines">
837
+
838
+
839
+ 143
840
+ 144
841
+ 145
842
+ 146
843
+ 147
844
+ 148
845
+ 149
846
+ 150
847
+ 151
848
+ 152
849
+ 153</pre>
850
+ </td>
851
+ <td>
852
+ <pre class="code"><span class="info file"># File 'lib/gce/host/host_data.rb', line 143</span>
853
+
854
+ <span class='kw'>def</span> <span class='id identifier rubyid_info'>info</span>
855
+ <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_display_short_info?'>display_short_info?</span>
856
+ <span class='id identifier rubyid_info'>info</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_hostname'>hostname</span><span class='embexpr_end'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_status'>status</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
857
+ <span class='id identifier rubyid_info'>info</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_roles'>roles</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>,</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_roles'>roles</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
858
+ <span class='id identifier rubyid_info'>info</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>[</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_tags'>tags</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>,</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>]</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_tags'>tags</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
859
+ <span class='id identifier rubyid_info'>info</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>{</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_service'>service</span><span class='embexpr_end'>}</span><span class='tstring_content'>}</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_service'>service</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
860
+ <span class='id identifier rubyid_info'>info</span>
861
+ <span class='kw'>else</span>
862
+ <span class='id identifier rubyid_to_hash'>to_hash</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
863
+ <span class='kw'>end</span>
864
+ <span class='kw'>end</span></pre>
865
+ </td>
866
+ </tr>
867
+ </table>
868
+ </div>
869
+
870
+ <div class="method_details ">
871
+ <h3 class="signature " id="inspect-instance_method">
872
+
873
+ - (<tt>Object</tt>) <strong>inspect</strong>
874
+
875
+
876
+
877
+
878
+
879
+ </h3><table class="source_code">
880
+ <tr>
881
+ <td>
882
+ <pre class="lines">
883
+
884
+
885
+ 155
886
+ 156
887
+ 157</pre>
888
+ </td>
889
+ <td>
890
+ <pre class="code"><span class="info file"># File 'lib/gce/host/host_data.rb', line 155</span>
891
+
892
+ <span class='kw'>def</span> <span class='id identifier rubyid_inspect'>inspect</span>
893
+ <span class='id identifier rubyid_sprintf'>sprintf</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>#&lt;GCE::Host::HostData %s&gt;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_info'>info</span>
894
+ <span class='kw'>end</span></pre>
895
+ </td>
896
+ </tr>
897
+ </table>
898
+ </div>
899
+
900
+ <div class="method_details ">
901
+ <h3 class="signature " id="instance_id-instance_method">
902
+
903
+ - (<tt>Object</tt>) <strong>instance_id</strong>
904
+
905
+
906
+
907
+
908
+
909
+ </h3><table class="source_code">
910
+ <tr>
911
+ <td>
912
+ <pre class="lines">
913
+
914
+
915
+ 46
916
+ 47
917
+ 48</pre>
918
+ </td>
919
+ <td>
920
+ <pre class="code"><span class="info file"># File 'lib/gce/host/host_data.rb', line 46</span>
921
+
922
+ <span class='kw'>def</span> <span class='id identifier rubyid_instance_id'>instance_id</span>
923
+ <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span>
924
+ <span class='kw'>end</span></pre>
925
+ </td>
926
+ </tr>
927
+ </table>
928
+ </div>
929
+
930
+ <div class="method_details ">
931
+ <h3 class="signature " id="ip-instance_method">
932
+
933
+ - (<tt>Object</tt>) <strong>ip</strong>
934
+
935
+
936
+
937
+
938
+
939
+ </h3><div class="docstring">
940
+ <div class="discussion">
941
+
942
+ <p>compatibility with dino-host</p>
943
+
944
+
945
+ </div>
946
+ </div>
947
+ <div class="tags">
948
+
949
+
950
+ </div><table class="source_code">
951
+ <tr>
952
+ <td>
953
+ <pre class="lines">
954
+
955
+
956
+ 75
957
+ 76
958
+ 77</pre>
959
+ </td>
960
+ <td>
961
+ <pre class="code"><span class="info file"># File 'lib/gce/host/host_data.rb', line 75</span>
962
+
963
+ <span class='kw'>def</span> <span class='id identifier rubyid_ip'>ip</span>
964
+ <span class='id identifier rubyid_private_ip_address'>private_ip_address</span>
965
+ <span class='kw'>end</span></pre>
966
+ </td>
967
+ </tr>
968
+ </table>
969
+ </div>
970
+
971
+ <div class="method_details ">
972
+ <h3 class="signature " id="match?-instance_method">
973
+
974
+ - (<tt>Boolean</tt>) <strong>match?</strong>(condition)
975
+
976
+
977
+
978
+
979
+
980
+ </h3><div class="docstring">
981
+ <div class="discussion">
982
+
983
+ <p>match with condition or not</p>
984
+
985
+
986
+ </div>
987
+ </div>
988
+ <div class="tags">
989
+ <p class="tag_title">Parameters:</p>
990
+ <ul class="param">
991
+
992
+ <li>
993
+
994
+ <span class='name'>condition</span>
995
+
996
+
997
+ <span class='type'>(<tt>Hash</tt>)</span>
998
+
999
+
1000
+
1001
+ &mdash;
1002
+ <div class='inline'>
1003
+ <p>search parameters</p>
1004
+ </div>
1005
+
1006
+ </li>
1007
+
1008
+ </ul>
1009
+
1010
+ <p class="tag_title">Returns:</p>
1011
+ <ul class="return">
1012
+
1013
+ <li>
1014
+
1015
+
1016
+ <span class='type'>(<tt>Boolean</tt>)</span>
1017
+
1018
+
1019
+
1020
+ </li>
1021
+
1022
+ </ul>
1023
+
1024
+ </div><table class="source_code">
1025
+ <tr>
1026
+ <td>
1027
+ <pre class="lines">
1028
+
1029
+
1030
+ 112
1031
+ 113
1032
+ 114
1033
+ 115
1034
+ 116
1035
+ 117
1036
+ 118</pre>
1037
+ </td>
1038
+ <td>
1039
+ <pre class="code"><span class="info file"># File 'lib/gce/host/host_data.rb', line 112</span>
1040
+
1041
+ <span class='kw'>def</span> <span class='id identifier rubyid_match?'>match?</span><span class='lparen'>(</span><span class='id identifier rubyid_condition'>condition</span><span class='rparen'>)</span>
1042
+ <span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_condition'>condition</span><span class='lbracket'>[</span><span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rbracket'>]</span> <span class='kw'>and</span> <span class='lparen'>(</span><span class='id identifier rubyid_terminated?'>terminated?</span> <span class='kw'>or</span> <span class='id identifier rubyid_stopping?'>stopping?</span><span class='rparen'>)</span>
1043
+ <span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_role_match?'>role_match?</span><span class='lparen'>(</span><span class='id identifier rubyid_condition'>condition</span><span class='rparen'>)</span>
1044
+ <span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_status_match?'>status_match?</span><span class='lparen'>(</span><span class='id identifier rubyid_condition'>condition</span><span class='rparen'>)</span>
1045
+ <span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_instance_match?'>instance_match?</span><span class='lparen'>(</span><span class='id identifier rubyid_condition'>condition</span><span class='rparen'>)</span>
1046
+ <span class='kw'>true</span>
1047
+ <span class='kw'>end</span></pre>
1048
+ </td>
1049
+ </tr>
1050
+ </table>
1051
+ </div>
1052
+
1053
+ <div class="method_details ">
1054
+ <h3 class="signature " id="private_ip_address-instance_method">
1055
+
1056
+ - (<tt>Object</tt>) <strong>private_ip_address</strong>
1057
+
1058
+
1059
+
1060
+
1061
+
1062
+ </h3><table class="source_code">
1063
+ <tr>
1064
+ <td>
1065
+ <pre class="lines">
1066
+
1067
+
1068
+ 54
1069
+ 55
1070
+ 56</pre>
1071
+ </td>
1072
+ <td>
1073
+ <pre class="code"><span class="info file"># File 'lib/gce/host/host_data.rb', line 54</span>
1074
+
1075
+ <span class='kw'>def</span> <span class='id identifier rubyid_private_ip_address'>private_ip_address</span>
1076
+ <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_network_interfaces'>network_interfaces</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='period'>.</span><span class='id identifier rubyid_network_ip'>network_ip</span>
1077
+ <span class='kw'>end</span></pre>
1078
+ </td>
1079
+ </tr>
1080
+ </table>
1081
+ </div>
1082
+
1083
+ <div class="method_details ">
1084
+ <h3 class="signature " id="private_ip_addresses-instance_method">
1085
+
1086
+ - (<tt>Object</tt>) <strong>private_ip_addresses</strong>
1087
+
1088
+
1089
+
1090
+
1091
+
1092
+ </h3><table class="source_code">
1093
+ <tr>
1094
+ <td>
1095
+ <pre class="lines">
1096
+
1097
+
1098
+ 58
1099
+ 59
1100
+ 60</pre>
1101
+ </td>
1102
+ <td>
1103
+ <pre class="code"><span class="info file"># File 'lib/gce/host/host_data.rb', line 58</span>
1104
+
1105
+ <span class='kw'>def</span> <span class='id identifier rubyid_private_ip_addresses'>private_ip_addresses</span>
1106
+ <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_network_interfaces'>network_interfaces</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:network_ip</span><span class='rparen'>)</span>
1107
+ <span class='kw'>end</span></pre>
1108
+ </td>
1109
+ </tr>
1110
+ </table>
1111
+ </div>
1112
+
1113
+ <div class="method_details ">
1114
+ <h3 class="signature " id="provisioning?-instance_method">
1115
+
1116
+ - (<tt>Boolean</tt>) <strong>provisioning?</strong>
1117
+
1118
+
1119
+
1120
+
1121
+
1122
+ </h3><div class="docstring">
1123
+ <div class="discussion">
1124
+
1125
+
1126
+ </div>
1127
+ </div>
1128
+ <div class="tags">
1129
+
1130
+ <p class="tag_title">Returns:</p>
1131
+ <ul class="return">
1132
+
1133
+ <li>
1134
+
1135
+
1136
+ <span class='type'>(<tt>Boolean</tt>)</span>
1137
+
1138
+
1139
+
1140
+ </li>
1141
+
1142
+ </ul>
1143
+
1144
+ </div><table class="source_code">
1145
+ <tr>
1146
+ <td>
1147
+ <pre class="lines">
1148
+
1149
+
1150
+ 105
1151
+ 106
1152
+ 107</pre>
1153
+ </td>
1154
+ <td>
1155
+ <pre class="code"><span class="info file"># File 'lib/gce/host/host_data.rb', line 105</span>
1156
+
1157
+ <span class='kw'>def</span> <span class='id identifier rubyid_provisioning?'>provisioning?</span>
1158
+ <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>PROVISIONING</span><span class='tstring_end'>&quot;</span></span>
1159
+ <span class='kw'>end</span></pre>
1160
+ </td>
1161
+ </tr>
1162
+ </table>
1163
+ </div>
1164
+
1165
+ <div class="method_details ">
1166
+ <h3 class="signature " id="public_ip_address-instance_method">
1167
+
1168
+ - (<tt>Object</tt>) <strong>public_ip_address</strong>
1169
+
1170
+
1171
+
1172
+
1173
+
1174
+ </h3><table class="source_code">
1175
+ <tr>
1176
+ <td>
1177
+ <pre class="lines">
1178
+
1179
+
1180
+ 62
1181
+ 63
1182
+ 64</pre>
1183
+ </td>
1184
+ <td>
1185
+ <pre class="code"><span class="info file"># File 'lib/gce/host/host_data.rb', line 62</span>
1186
+
1187
+ <span class='kw'>def</span> <span class='id identifier rubyid_public_ip_address'>public_ip_address</span>
1188
+ <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_network_interfaces'>network_interfaces</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='period'>.</span><span class='id identifier rubyid_access_configs'>access_configs</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='period'>.</span><span class='id identifier rubyid_nat_ip'>nat_ip</span>
1189
+ <span class='kw'>end</span></pre>
1190
+ </td>
1191
+ </tr>
1192
+ </table>
1193
+ </div>
1194
+
1195
+ <div class="method_details ">
1196
+ <h3 class="signature " id="public_ip_addresses-instance_method">
1197
+
1198
+ - (<tt>Object</tt>) <strong>public_ip_addresses</strong>
1199
+
1200
+
1201
+
1202
+
1203
+
1204
+ </h3><table class="source_code">
1205
+ <tr>
1206
+ <td>
1207
+ <pre class="lines">
1208
+
1209
+
1210
+ 66
1211
+ 67
1212
+ 68</pre>
1213
+ </td>
1214
+ <td>
1215
+ <pre class="code"><span class="info file"># File 'lib/gce/host/host_data.rb', line 66</span>
1216
+
1217
+ <span class='kw'>def</span> <span class='id identifier rubyid_public_ip_addresses'>public_ip_addresses</span>
1218
+ <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_network_interfaces'>network_interfaces</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_i'>i</span><span class='op'>|</span> <span class='id identifier rubyid_i'>i</span><span class='period'>.</span><span class='id identifier rubyid_access_configs'>access_configs</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:nat_ip</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span><span class='lparen'>(</span><span class='int'>1</span><span class='rparen'>)</span>
1219
+ <span class='kw'>end</span></pre>
1220
+ </td>
1221
+ </tr>
1222
+ </table>
1223
+ </div>
1224
+
1225
+ <div class="method_details ">
1226
+ <h3 class="signature " id="roles-instance_method">
1227
+
1228
+ - (<tt>Object</tt>) <strong>roles</strong>
1229
+
1230
+
1231
+
1232
+
1233
+
1234
+ </h3><table class="source_code">
1235
+ <tr>
1236
+ <td>
1237
+ <pre class="lines">
1238
+
1239
+
1240
+ 22
1241
+ 23
1242
+ 24
1243
+ 25
1244
+ 26</pre>
1245
+ </td>
1246
+ <td>
1247
+ <pre class="code"><span class="info file"># File 'lib/gce/host/host_data.rb', line 22</span>
1248
+
1249
+ <span class='kw'>def</span> <span class='id identifier rubyid_roles'>roles</span>
1250
+ <span class='kw'>return</span> <span class='ivar'>@roles</span> <span class='kw'>if</span> <span class='ivar'>@roles</span>
1251
+ <span class='id identifier rubyid_roles'>roles</span> <span class='op'>=</span> <span class='id identifier rubyid_find_array_key'>find_array_key</span><span class='lparen'>(</span><span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_roles_key'>roles_key</span><span class='rparen'>)</span>
1252
+ <span class='ivar'>@roles</span> <span class='op'>=</span> <span class='id identifier rubyid_roles'>roles</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_role'>role</span><span class='op'>|</span> <span class='const'>GCE</span><span class='op'>::</span><span class='const'>Host</span><span class='op'>::</span><span class='const'>RoleData</span><span class='period'>.</span><span class='id identifier rubyid_build'>build</span><span class='lparen'>(</span><span class='id identifier rubyid_role'>role</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
1253
+ <span class='kw'>end</span></pre>
1254
+ </td>
1255
+ </tr>
1256
+ </table>
1257
+ </div>
1258
+
1259
+ <div class="method_details ">
1260
+ <h3 class="signature " id="running?-instance_method">
1261
+
1262
+ - (<tt>Boolean</tt>) <strong>running?</strong>
1263
+
1264
+
1265
+
1266
+
1267
+
1268
+ </h3><div class="docstring">
1269
+ <div class="discussion">
1270
+
1271
+
1272
+ </div>
1273
+ </div>
1274
+ <div class="tags">
1275
+
1276
+ <p class="tag_title">Returns:</p>
1277
+ <ul class="return">
1278
+
1279
+ <li>
1280
+
1281
+
1282
+ <span class='type'>(<tt>Boolean</tt>)</span>
1283
+
1284
+
1285
+
1286
+ </li>
1287
+
1288
+ </ul>
1289
+
1290
+ </div><table class="source_code">
1291
+ <tr>
1292
+ <td>
1293
+ <pre class="lines">
1294
+
1295
+
1296
+ 97
1297
+ 98
1298
+ 99</pre>
1299
+ </td>
1300
+ <td>
1301
+ <pre class="code"><span class="info file"># File 'lib/gce/host/host_data.rb', line 97</span>
1302
+
1303
+ <span class='kw'>def</span> <span class='id identifier rubyid_running?'>running?</span>
1304
+ <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>RUNNING</span><span class='tstring_end'>&quot;</span></span>
1305
+ <span class='kw'>end</span></pre>
1306
+ </td>
1307
+ </tr>
1308
+ </table>
1309
+ </div>
1310
+
1311
+ <div class="method_details ">
1312
+ <h3 class="signature " id="staging?-instance_method">
1313
+
1314
+ - (<tt>Boolean</tt>) <strong>staging?</strong>
1315
+
1316
+
1317
+
1318
+
1319
+
1320
+ </h3><div class="docstring">
1321
+ <div class="discussion">
1322
+
1323
+
1324
+ </div>
1325
+ </div>
1326
+ <div class="tags">
1327
+
1328
+ <p class="tag_title">Returns:</p>
1329
+ <ul class="return">
1330
+
1331
+ <li>
1332
+
1333
+
1334
+ <span class='type'>(<tt>Boolean</tt>)</span>
1335
+
1336
+
1337
+
1338
+ </li>
1339
+
1340
+ </ul>
1341
+
1342
+ </div><table class="source_code">
1343
+ <tr>
1344
+ <td>
1345
+ <pre class="lines">
1346
+
1347
+
1348
+ 101
1349
+ 102
1350
+ 103</pre>
1351
+ </td>
1352
+ <td>
1353
+ <pre class="code"><span class="info file"># File 'lib/gce/host/host_data.rb', line 101</span>
1354
+
1355
+ <span class='kw'>def</span> <span class='id identifier rubyid_staging?'>staging?</span>
1356
+ <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>STAGING</span><span class='tstring_end'>&quot;</span></span>
1357
+ <span class='kw'>end</span></pre>
1358
+ </td>
1359
+ </tr>
1360
+ </table>
1361
+ </div>
1362
+
1363
+ <div class="method_details ">
1364
+ <h3 class="signature " id="start_date-instance_method">
1365
+
1366
+ - (<tt>Object</tt>) <strong>start_date</strong>
1367
+
1368
+
1369
+
1370
+
1371
+
1372
+ </h3><div class="docstring">
1373
+ <div class="discussion">
1374
+
1375
+ <p>compatibility with dino-host</p>
1376
+
1377
+
1378
+ </div>
1379
+ </div>
1380
+ <div class="tags">
1381
+
1382
+
1383
+ </div><table class="source_code">
1384
+ <tr>
1385
+ <td>
1386
+ <pre class="lines">
1387
+
1388
+
1389
+ 80
1390
+ 81
1391
+ 82</pre>
1392
+ </td>
1393
+ <td>
1394
+ <pre class="code"><span class="info file"># File 'lib/gce/host/host_data.rb', line 80</span>
1395
+
1396
+ <span class='kw'>def</span> <span class='id identifier rubyid_start_date'>start_date</span>
1397
+ <span class='id identifier rubyid_creation_timestamp'>creation_timestamp</span>
1398
+ <span class='kw'>end</span></pre>
1399
+ </td>
1400
+ </tr>
1401
+ </table>
1402
+ </div>
1403
+
1404
+ <div class="method_details ">
1405
+ <h3 class="signature " id="stopping?-instance_method">
1406
+
1407
+ - (<tt>Boolean</tt>) <strong>stopping?</strong>
1408
+
1409
+
1410
+
1411
+
1412
+
1413
+ </h3><div class="docstring">
1414
+ <div class="discussion">
1415
+
1416
+
1417
+ </div>
1418
+ </div>
1419
+ <div class="tags">
1420
+
1421
+ <p class="tag_title">Returns:</p>
1422
+ <ul class="return">
1423
+
1424
+ <li>
1425
+
1426
+
1427
+ <span class='type'>(<tt>Boolean</tt>)</span>
1428
+
1429
+
1430
+
1431
+ </li>
1432
+
1433
+ </ul>
1434
+
1435
+ </div><table class="source_code">
1436
+ <tr>
1437
+ <td>
1438
+ <pre class="lines">
1439
+
1440
+
1441
+ 93
1442
+ 94
1443
+ 95</pre>
1444
+ </td>
1445
+ <td>
1446
+ <pre class="code"><span class="info file"># File 'lib/gce/host/host_data.rb', line 93</span>
1447
+
1448
+ <span class='kw'>def</span> <span class='id identifier rubyid_stopping?'>stopping?</span>
1449
+ <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>STOPPING</span><span class='tstring_end'>&quot;</span></span>
1450
+ <span class='kw'>end</span></pre>
1451
+ </td>
1452
+ </tr>
1453
+ </table>
1454
+ </div>
1455
+
1456
+ <div class="method_details ">
1457
+ <h3 class="signature " id="terminated?-instance_method">
1458
+
1459
+ - (<tt>Boolean</tt>) <strong>terminated?</strong>
1460
+
1461
+
1462
+
1463
+
1464
+
1465
+ </h3><div class="docstring">
1466
+ <div class="discussion">
1467
+
1468
+
1469
+ </div>
1470
+ </div>
1471
+ <div class="tags">
1472
+
1473
+ <p class="tag_title">Returns:</p>
1474
+ <ul class="return">
1475
+
1476
+ <li>
1477
+
1478
+
1479
+ <span class='type'>(<tt>Boolean</tt>)</span>
1480
+
1481
+
1482
+
1483
+ </li>
1484
+
1485
+ </ul>
1486
+
1487
+ </div><table class="source_code">
1488
+ <tr>
1489
+ <td>
1490
+ <pre class="lines">
1491
+
1492
+
1493
+ 89
1494
+ 90
1495
+ 91</pre>
1496
+ </td>
1497
+ <td>
1498
+ <pre class="code"><span class="info file"># File 'lib/gce/host/host_data.rb', line 89</span>
1499
+
1500
+ <span class='kw'>def</span> <span class='id identifier rubyid_terminated?'>terminated?</span>
1501
+ <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>TERMINATED</span><span class='tstring_end'>&quot;</span></span>
1502
+ <span class='kw'>end</span></pre>
1503
+ </td>
1504
+ </tr>
1505
+ </table>
1506
+ </div>
1507
+
1508
+ <div class="method_details ">
1509
+ <h3 class="signature " id="to_hash-instance_method">
1510
+
1511
+ - (<tt>Object</tt>) <strong>to_hash</strong>
1512
+
1513
+
1514
+
1515
+
1516
+
1517
+ </h3><table class="source_code">
1518
+ <tr>
1519
+ <td>
1520
+ <pre class="lines">
1521
+
1522
+
1523
+ 120
1524
+ 121
1525
+ 122
1526
+ 123
1527
+ 124
1528
+ 125
1529
+ 126
1530
+ 127
1531
+ 128
1532
+ 129
1533
+ 130
1534
+ 131
1535
+ 132
1536
+ 133
1537
+ 134
1538
+ 135
1539
+ 136
1540
+ 137
1541
+ 138
1542
+ 139
1543
+ 140
1544
+ 141</pre>
1545
+ </td>
1546
+ <td>
1547
+ <pre class="code"><span class="info file"># File 'lib/gce/host/host_data.rb', line 120</span>
1548
+
1549
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_hash'>to_hash</span>
1550
+ <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='lbrace'>{</span>
1551
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>hostname</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_hostname'>hostname</span><span class='comma'>,</span>
1552
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>roles</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_roles'>roles</span><span class='comma'>,</span>
1553
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>zone</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_zone'>zone</span><span class='comma'>,</span>
1554
+ <span class='rbrace'>}</span>
1555
+ <span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_optional_string_keys'>optional_string_keys</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='op'>|</span>
1556
+ <span class='id identifier rubyid_field'>field</span> <span class='op'>=</span> <span class='const'>StringUtil</span><span class='period'>.</span><span class='id identifier rubyid_underscore'>underscore</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
1557
+ <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='id identifier rubyid_field'>field</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_field'>field</span><span class='rparen'>)</span>
1558
+ <span class='kw'>end</span>
1559
+ <span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_optional_array_keys'>optional_array_keys</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='op'>|</span>
1560
+ <span class='id identifier rubyid_field'>field</span> <span class='op'>=</span> <span class='const'>StringUtil</span><span class='period'>.</span><span class='id identifier rubyid_underscore'>underscore</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
1561
+ <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='id identifier rubyid_field'>field</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_field'>field</span><span class='rparen'>)</span>
1562
+ <span class='kw'>end</span>
1563
+ <span class='id identifier rubyid_params'>params</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span>
1564
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>instance_id</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_instance_id'>instance_id</span><span class='comma'>,</span>
1565
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>private_ip_address</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_private_ip_address'>private_ip_address</span><span class='comma'>,</span>
1566
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>public_ip_address</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_public_ip_address'>public_ip_address</span><span class='comma'>,</span>
1567
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>creation_timestamp</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_creation_timestamp'>creation_timestamp</span><span class='comma'>,</span>
1568
+ <span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span><span class='rparen'>)</span><span class='comma'>,</span>
1569
+ <span class='rparen'>)</span>
1570
+ <span class='kw'>end</span></pre>
1571
+ </td>
1572
+ </tr>
1573
+ </table>
1574
+ </div>
1575
+
1576
+ <div class="method_details ">
1577
+ <h3 class="signature " id="usages-instance_method">
1578
+
1579
+ - (<tt>Object</tt>) <strong>usages</strong>
1580
+
1581
+
1582
+
1583
+
1584
+
1585
+ </h3><div class="docstring">
1586
+ <div class="discussion">
1587
+
1588
+ <p>compatibility with dino-host</p>
1589
+
1590
+
1591
+ </div>
1592
+ </div>
1593
+ <div class="tags">
1594
+
1595
+
1596
+ </div><table class="source_code">
1597
+ <tr>
1598
+ <td>
1599
+ <pre class="lines">
1600
+
1601
+
1602
+ 85
1603
+ 86
1604
+ 87</pre>
1605
+ </td>
1606
+ <td>
1607
+ <pre class="code"><span class="info file"># File 'lib/gce/host/host_data.rb', line 85</span>
1608
+
1609
+ <span class='kw'>def</span> <span class='id identifier rubyid_usages'>usages</span>
1610
+ <span class='id identifier rubyid_roles'>roles</span>
1611
+ <span class='kw'>end</span></pre>
1612
+ </td>
1613
+ </tr>
1614
+ </table>
1615
+ </div>
1616
+
1617
+ <div class="method_details ">
1618
+ <h3 class="signature " id="zone-instance_method">
1619
+
1620
+ - (<tt>Object</tt>) <strong>zone</strong>
1621
+
1622
+
1623
+
1624
+
1625
+
1626
+ </h3><table class="source_code">
1627
+ <tr>
1628
+ <td>
1629
+ <pre class="lines">
1630
+
1631
+
1632
+ 50
1633
+ 51
1634
+ 52</pre>
1635
+ </td>
1636
+ <td>
1637
+ <pre class="code"><span class="info file"># File 'lib/gce/host/host_data.rb', line 50</span>
1638
+
1639
+ <span class='kw'>def</span> <span class='id identifier rubyid_zone'>zone</span>
1640
+ <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_zone'>zone</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span>
1641
+ <span class='kw'>end</span></pre>
1642
+ </td>
1643
+ </tr>
1644
+ </table>
1645
+ </div>
1646
+
1647
+ </div>
1648
+
1649
+ </div>
1650
+
1651
+ <div id="footer">
1652
+ Generated on Wed Nov 23 20:08:32 2016 by
1653
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1654
+ 0.8.7.6 (ruby-2.3.2).
1655
+ </div>
1656
+
1657
+ </body>
1658
+ </html>