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,215 @@
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::GCEClient
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/GCEClient.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 (G)</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">GCEClient</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::GCEClient
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::GCEClient</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/gce_client.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+ <h2>Defined Under Namespace</h2>
103
+ <p class="children">
104
+
105
+
106
+
107
+
108
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="GCEClient/Error.html" title="GCE::Host::GCEClient::Error (class)">Error</a></span>, <span class='object_link'><a href="GCEClient/NotFound.html" title="GCE::Host::GCEClient::NotFound (class)">NotFound</a></span>
109
+
110
+
111
+ </p>
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+ <h2>
121
+ Instance Method Summary
122
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
123
+ </h2>
124
+
125
+ <ul class="summary">
126
+
127
+ <li class="public ">
128
+ <span class="summary_signature">
129
+
130
+ <a href="#instances-instance_method" title="#instances (instance method)">- (Object) <strong>instances</strong>(condition = {}) </a>
131
+
132
+
133
+
134
+ </span>
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+ <span class="summary_desc"><div class='inline'></div></span>
145
+
146
+ </li>
147
+
148
+
149
+ </ul>
150
+
151
+
152
+
153
+
154
+ <div id="instance_method_details" class="method_details_list">
155
+ <h2>Instance Method Details</h2>
156
+
157
+
158
+ <div class="method_details first">
159
+ <h3 class="signature first" id="instances-instance_method">
160
+
161
+ - (<tt>Object</tt>) <strong>instances</strong>(condition = {})
162
+
163
+
164
+
165
+
166
+
167
+ </h3><table class="source_code">
168
+ <tr>
169
+ <td>
170
+ <pre class="lines">
171
+
172
+
173
+ 10
174
+ 11
175
+ 12
176
+ 13
177
+ 14
178
+ 15
179
+ 16
180
+ 17
181
+ 18
182
+ 19
183
+ 20</pre>
184
+ </td>
185
+ <td>
186
+ <pre class="code"><span class="info file"># File 'lib/gce/host/gce_client.rb', line 10</span>
187
+
188
+ <span class='kw'>def</span> <span class='id identifier rubyid_instances'>instances</span><span class='lparen'>(</span><span class='id identifier rubyid_condition'>condition</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
189
+ <span class='id identifier rubyid_filter'>filter</span> <span class='op'>=</span> <span class='id identifier rubyid_build_filter'>build_filter</span><span class='lparen'>(</span><span class='id identifier rubyid_condition'>condition</span><span class='rparen'>)</span>
190
+ <span class='id identifier rubyid_instances'>instances</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
191
+ <span class='id identifier rubyid_res'>res</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_list_aggregated_instances'>list_aggregated_instances</span><span class='lparen'>(</span><span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_project'>project</span><span class='comma'>,</span> <span class='label'>filter:</span> <span class='id identifier rubyid_filter'>filter</span><span class='rparen'>)</span>
192
+ <span class='id identifier rubyid_instances'>instances</span><span class='period'>.</span><span class='id identifier rubyid_concat'>concat</span><span class='lparen'>(</span><span class='id identifier rubyid_res'>res</span><span class='period'>.</span><span class='id identifier rubyid_items'>items</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</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'>:instances</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</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><span class='rparen'>)</span>
193
+ <span class='kw'>while</span> <span class='id identifier rubyid_res'>res</span><span class='period'>.</span><span class='id identifier rubyid_next_page_token'>next_page_token</span>
194
+ <span class='id identifier rubyid_res'>res</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_list_aggregated_instances'>list_aggregated_instances</span><span class='lparen'>(</span><span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_project'>project</span><span class='comma'>,</span> <span class='label'>filter:</span> <span class='id identifier rubyid_filter'>filter</span><span class='comma'>,</span> <span class='label'>page_token:</span> <span class='id identifier rubyid_res'>res</span><span class='period'>.</span><span class='id identifier rubyid_next_page_token'>next_page_token</span><span class='rparen'>)</span>
195
+ <span class='id identifier rubyid_instances'>instances</span><span class='period'>.</span><span class='id identifier rubyid_concat'>concat</span><span class='lparen'>(</span><span class='id identifier rubyid_res'>res</span><span class='period'>.</span><span class='id identifier rubyid_items'>items</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</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'>:instances</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</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><span class='rparen'>)</span>
196
+ <span class='kw'>end</span>
197
+ <span class='id identifier rubyid_instances'>instances</span>
198
+ <span class='kw'>end</span></pre>
199
+ </td>
200
+ </tr>
201
+ </table>
202
+ </div>
203
+
204
+ </div>
205
+
206
+ </div>
207
+
208
+ <div id="footer">
209
+ Generated on Wed Nov 23 20:08:32 2016 by
210
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
211
+ 0.8.7.6 (ruby-2.3.2).
212
+ </div>
213
+
214
+ </body>
215
+ </html>
@@ -0,0 +1,127 @@
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
+ Exception: GCE::Host::GCEClient::Error
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/GCEClient/Error.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 (E)</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> &raquo; <span class='title'><span class='object_link'><a href="../GCEClient.html" title="GCE::Host::GCEClient (class)">GCEClient</a></span></span>
36
+ &raquo;
37
+ <span class="title">Error</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>Exception: GCE::Host::GCEClient::Error
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">StandardError</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">StandardError</li>
82
+
83
+ <li class="next">GCE::Host::GCEClient::Error</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">lib/gce/host/gce_client.rb</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+ <div id="subclasses">
105
+ <h2>Direct Known Subclasses</h2>
106
+ <p class="children"><span class='object_link'><a href="NotFound.html" title="GCE::Host::GCEClient::NotFound (class)">NotFound</a></span></p>
107
+ </div>
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+ </div>
119
+
120
+ <div id="footer">
121
+ Generated on Wed Nov 23 20:08:32 2016 by
122
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
123
+ 0.8.7.6 (ruby-2.3.2).
124
+ </div>
125
+
126
+ </body>
127
+ </html>
@@ -0,0 +1,131 @@
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
+ Exception: GCE::Host::GCEClient::NotFound
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/GCEClient/NotFound.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 (N)</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> &raquo; <span class='title'><span class='object_link'><a href="../GCEClient.html" title="GCE::Host::GCEClient (class)">GCEClient</a></span></span>
36
+ &raquo;
37
+ <span class="title">NotFound</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>Exception: GCE::Host::GCEClient::NotFound
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"><span class='object_link'><a href="Error.html" title="GCE::Host::GCEClient::Error (class)">Error</a></span></span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">StandardError</li>
82
+
83
+ <li class="next"><span class='object_link'><a href="Error.html" title="GCE::Host::GCEClient::Error (class)">Error</a></span></li>
84
+
85
+ <li class="next">GCE::Host::GCEClient::NotFound</li>
86
+
87
+ </ul>
88
+ <a href="#" class="inheritanceTree">show all</a>
89
+
90
+ </dd>
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+ <dt class="r2 last">Defined in:</dt>
101
+ <dd class="r2 last">lib/gce/host/gce_client.rb</dd>
102
+
103
+ </dl>
104
+ <div class="clear"></div>
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+ </div>
123
+
124
+ <div id="footer">
125
+ Generated on Wed Nov 23 20:08:32 2016 by
126
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
127
+ 0.8.7.6 (ruby-2.3.2).
128
+ </div>
129
+
130
+ </body>
131
+ </html>