vagrant-registration 0.0.18 → 0.0.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/lib/vagrant-registration/version.rb +1 -1
  4. data/vagrant-registration.gemspec +6 -1
  5. metadata +2 -94
  6. data/.gitignore +0 -34
  7. data/Vagrantfile +0 -44
  8. data/dummy.box +0 -0
  9. data/vagrant-registration-0.0.16/.gitignore +0 -34
  10. data/vagrant-registration-0.0.16/CHANGELOG.md +0 -3
  11. data/vagrant-registration-0.0.16/Gemfile +0 -9
  12. data/vagrant-registration-0.0.16/LICENSE.md +0 -339
  13. data/vagrant-registration-0.0.16/README.md +0 -149
  14. data/vagrant-registration-0.0.16/Rakefile +0 -25
  15. data/vagrant-registration-0.0.16/Vagrantfile +0 -44
  16. data/vagrant-registration-0.0.16/dummy.box +0 -0
  17. data/vagrant-registration-0.0.16/lib/vagrant-registration/action/register.rb +0 -113
  18. data/vagrant-registration-0.0.16/lib/vagrant-registration/action/unregister.rb +0 -56
  19. data/vagrant-registration-0.0.16/lib/vagrant-registration/action.rb +0 -22
  20. data/vagrant-registration-0.0.16/lib/vagrant-registration/config.rb +0 -39
  21. data/vagrant-registration-0.0.16/lib/vagrant-registration/plugin.rb +0 -74
  22. data/vagrant-registration-0.0.16/lib/vagrant-registration/version.rb +0 -5
  23. data/vagrant-registration-0.0.16/lib/vagrant-registration.rb +0 -21
  24. data/vagrant-registration-0.0.16/plugins/guests/redhat/cap/registration.rb +0 -72
  25. data/vagrant-registration-0.0.16/plugins/guests/redhat/cap/subscription_manager.rb +0 -63
  26. data/vagrant-registration-0.0.16/plugins/guests/redhat/plugin.rb +0 -62
  27. data/vagrant-registration-0.0.16/tests/helpers.sh +0 -128
  28. data/vagrant-registration-0.0.16/tests/run.sh +0 -59
  29. data/vagrant-registration-0.0.16/tests/vagrantfiles/Vagrantfile.rhel_multi_machine +0 -19
  30. data/vagrant-registration-0.0.16/tests/vagrantfiles/Vagrantfile.rhel_wrong_credentials +0 -14
  31. data/vagrant-registration-0.0.16/vagrant-registration.gemspec +0 -49
  32. data/vagrant-registration-0.0.17/.gitignore +0 -34
  33. data/vagrant-registration-0.0.17/CHANGELOG.md +0 -3
  34. data/vagrant-registration-0.0.17/Gemfile +0 -9
  35. data/vagrant-registration-0.0.17/LICENSE.md +0 -339
  36. data/vagrant-registration-0.0.17/README.md +0 -149
  37. data/vagrant-registration-0.0.17/Rakefile +0 -25
  38. data/vagrant-registration-0.0.17/Vagrantfile +0 -44
  39. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestFedora/Cap/ChangeHostName.html +0 -1016
  40. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestFedora/Cap/ConfigureNetworks.html +0 -355
  41. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestFedora/Cap/Flavor.html +0 -209
  42. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestFedora/Cap/NFSClient.html +0 -189
  43. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestFedora/Cap/NetworkScriptsDir.html +0 -205
  44. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestFedora/Cap.html +0 -117
  45. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestFedora/Guest.html +0 -211
  46. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestFedora/Plugin.html +0 -120
  47. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestFedora.html +0 -119
  48. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestRedHat/Cap/RedHatCertification.html +0 -189
  49. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestRedHat/Cap/Register.html +0 -191
  50. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestRedHat/Cap/SubscriptionManager.html +0 -189
  51. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestRedHat/Cap/Unregister.html +0 -189
  52. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestRedHat/Cap.html +0 -117
  53. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestRedHat/Plugin.html +0 -120
  54. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestRedHat.html +0 -119
  55. data/vagrant-registration-0.0.17/doc/VagrantPlugins/Registration/Action/Register.html +0 -345
  56. data/vagrant-registration-0.0.17/doc/VagrantPlugins/Registration/Action/Unregister.html +0 -315
  57. data/vagrant-registration-0.0.17/doc/VagrantPlugins/Registration/Action.html +0 -246
  58. data/vagrant-registration-0.0.17/doc/VagrantPlugins/Registration/Config.html +0 -433
  59. data/vagrant-registration-0.0.17/doc/VagrantPlugins/Registration/Errors/RegisterError.html +0 -123
  60. data/vagrant-registration-0.0.17/doc/VagrantPlugins/Registration/Errors/UnregisterError.html +0 -123
  61. data/vagrant-registration-0.0.17/doc/VagrantPlugins/Registration/Errors/VagrantRHELError.html +0 -123
  62. data/vagrant-registration-0.0.17/doc/VagrantPlugins/Registration/Errors.html +0 -115
  63. data/vagrant-registration-0.0.17/doc/VagrantPlugins/Registration/Plugin.html +0 -356
  64. data/vagrant-registration-0.0.17/doc/VagrantPlugins/Registration.html +0 -226
  65. data/vagrant-registration-0.0.17/doc/VagrantPlugins.html +0 -117
  66. data/vagrant-registration-0.0.17/doc/_index.html +0 -375
  67. data/vagrant-registration-0.0.17/doc/class_list.html +0 -58
  68. data/vagrant-registration-0.0.17/doc/css/common.css +0 -1
  69. data/vagrant-registration-0.0.17/doc/css/full_list.css +0 -57
  70. data/vagrant-registration-0.0.17/doc/css/style.css +0 -339
  71. data/vagrant-registration-0.0.17/doc/file.README.html +0 -135
  72. data/vagrant-registration-0.0.17/doc/file_list.html +0 -60
  73. data/vagrant-registration-0.0.17/doc/frames.html +0 -26
  74. data/vagrant-registration-0.0.17/doc/index.html +0 -135
  75. data/vagrant-registration-0.0.17/doc/js/app.js +0 -219
  76. data/vagrant-registration-0.0.17/doc/js/full_list.js +0 -181
  77. data/vagrant-registration-0.0.17/doc/js/jquery.js +0 -4
  78. data/vagrant-registration-0.0.17/doc/method_list.html +0 -279
  79. data/vagrant-registration-0.0.17/doc/top-level-namespace.html +0 -112
  80. data/vagrant-registration-0.0.17/dummy.box +0 -0
  81. data/vagrant-registration-0.0.17/lib/vagrant-registration/action/register.rb +0 -113
  82. data/vagrant-registration-0.0.17/lib/vagrant-registration/action/unregister.rb +0 -56
  83. data/vagrant-registration-0.0.17/lib/vagrant-registration/action.rb +0 -22
  84. data/vagrant-registration-0.0.17/lib/vagrant-registration/config.rb +0 -39
  85. data/vagrant-registration-0.0.17/lib/vagrant-registration/plugin.rb +0 -74
  86. data/vagrant-registration-0.0.17/lib/vagrant-registration/version.rb +0 -5
  87. data/vagrant-registration-0.0.17/lib/vagrant-registration.rb +0 -21
  88. data/vagrant-registration-0.0.17/plugins/guests/redhat/cap/registration.rb +0 -72
  89. data/vagrant-registration-0.0.17/plugins/guests/redhat/cap/subscription_manager.rb +0 -63
  90. data/vagrant-registration-0.0.17/plugins/guests/redhat/plugin.rb +0 -62
  91. data/vagrant-registration-0.0.17/tests/helpers.sh +0 -128
  92. data/vagrant-registration-0.0.17/tests/run.sh +0 -59
  93. data/vagrant-registration-0.0.17/tests/vagrantfiles/Vagrantfile.rhel_multi_machine +0 -19
  94. data/vagrant-registration-0.0.17/tests/vagrantfiles/Vagrantfile.rhel_wrong_credentials +0 -14
  95. data/vagrant-registration-0.0.17/vagrant-registration.gemspec +0 -49
  96. data/vagrant-registration-0.0.17/vagrant-registration.spec +0 -90
  97. data/vagrant-registration.spec +0 -90
@@ -1,355 +0,0 @@
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: VagrantPlugins::GuestFedora::Cap::ConfigureNetworks
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#!VagrantPlugins/GuestFedora/Cap/ConfigureNetworks.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 (C)</a> &raquo;
35
- <span class='title'><span class='object_link'><a href="../../../VagrantPlugins.html" title="VagrantPlugins (module)">VagrantPlugins</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../GuestFedora.html" title="VagrantPlugins::GuestFedora (module)">GuestFedora</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Cap.html" title="VagrantPlugins::GuestFedora::Cap (module)">Cap</a></span></span>
36
- &raquo;
37
- <span class="title">ConfigureNetworks</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: VagrantPlugins::GuestFedora::Cap::ConfigureNetworks
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">VagrantPlugins::GuestFedora::Cap::ConfigureNetworks</li>
82
-
83
- </ul>
84
- <a href="#" class="inheritanceTree">show all</a>
85
-
86
- </dd>
87
-
88
-
89
-
90
-
91
- <dt class="r2">Extended by:</dt>
92
- <dd class="r2">Vagrant::Util::Retryable</dd>
93
-
94
-
95
-
96
-
97
- <dt class="r1">Includes:</dt>
98
- <dd class="r1">Vagrant::Util</dd>
99
-
100
-
101
-
102
-
103
-
104
- <dt class="r2 last">Defined in:</dt>
105
- <dd class="r2 last">plugins/guests/fedora/cap/configure_networks.rb</dd>
106
-
107
- </dl>
108
- <div class="clear"></div>
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
-
118
- <h2>
119
- Class Method Summary
120
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
121
- </h2>
122
-
123
- <ul class="summary">
124
-
125
- <li class="public ">
126
- <span class="summary_signature">
127
-
128
- <a href="#configure_networks-class_method" title="configure_networks (class method)">+ (Object) <strong>configure_networks</strong>(machine, networks) </a>
129
-
130
-
131
-
132
- </span>
133
-
134
-
135
-
136
-
137
-
138
-
139
-
140
-
141
-
142
- <span class="summary_desc"><div class='inline'></div></span>
143
-
144
- </li>
145
-
146
-
147
- </ul>
148
-
149
-
150
-
151
-
152
-
153
-
154
- <div id="class_method_details" class="method_details_list">
155
- <h2>Class Method Details</h2>
156
-
157
-
158
- <div class="method_details first">
159
- <h3 class="signature first" id="configure_networks-class_method">
160
-
161
- + (<tt>Object</tt>) <strong>configure_networks</strong>(machine, networks)
162
-
163
-
164
-
165
-
166
-
167
- </h3><table class="source_code">
168
- <tr>
169
- <td>
170
- <pre class="lines">
171
-
172
-
173
- 14
174
- 15
175
- 16
176
- 17
177
- 18
178
- 19
179
- 20
180
- 21
181
- 22
182
- 23
183
- 24
184
- 25
185
- 26
186
- 27
187
- 28
188
- 29
189
- 30
190
- 31
191
- 32
192
- 33
193
- 34
194
- 35
195
- 36
196
- 37
197
- 38
198
- 39
199
- 40
200
- 41
201
- 42
202
- 43
203
- 44
204
- 45
205
- 46
206
- 47
207
- 48
208
- 49
209
- 50
210
- 51
211
- 52
212
- 53
213
- 54
214
- 55
215
- 56
216
- 57
217
- 58
218
- 59
219
- 60
220
- 61
221
- 62
222
- 63
223
- 64
224
- 65
225
- 66
226
- 67
227
- 68
228
- 69
229
- 70
230
- 71
231
- 72
232
- 73
233
- 74
234
- 75
235
- 76
236
- 77
237
- 78
238
- 79
239
- 80
240
- 81
241
- 82
242
- 83
243
- 84
244
- 85
245
- 86
246
- 87
247
- 88
248
- 89
249
- 90
250
- 91
251
- 92
252
- 93
253
- 94</pre>
254
- </td>
255
- <td>
256
- <pre class="code"><span class="info file"># File 'plugins/guests/fedora/cap/configure_networks.rb', line 14</span>
257
-
258
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_configure_networks'>configure_networks</span><span class='lparen'>(</span><span class='id identifier rubyid_machine'>machine</span><span class='comma'>,</span> <span class='id identifier rubyid_networks'>networks</span><span class='rparen'>)</span>
259
- <span class='id identifier rubyid_network_scripts_dir'>network_scripts_dir</span> <span class='op'>=</span> <span class='id identifier rubyid_machine'>machine</span><span class='period'>.</span><span class='id identifier rubyid_guest'>guest</span><span class='period'>.</span><span class='id identifier rubyid_capability'>capability</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>network_scripts_dir</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
260
-
261
- <span class='id identifier rubyid_virtual'>virtual</span> <span class='op'>=</span> <span class='kw'>false</span>
262
- <span class='id identifier rubyid_interface_names'>interface_names</span> <span class='op'>=</span> <span class='const'>Array</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
263
- <span class='id identifier rubyid_machine'>machine</span><span class='period'>.</span><span class='id identifier rubyid_communicate'>communicate</span><span class='period'>.</span><span class='id identifier rubyid_sudo'>sudo</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/usr/sbin/biosdevname; echo $?</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid__'>_</span><span class='comma'>,</span> <span class='id identifier rubyid_result'>result</span><span class='op'>|</span>
264
- <span class='id identifier rubyid_virtual'>virtual</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_chomp'>chomp</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>4</span><span class='tstring_end'>&#39;</span></span>
265
- <span class='kw'>end</span>
266
-
267
- <span class='kw'>if</span> <span class='id identifier rubyid_virtual'>virtual</span>
268
- <span class='id identifier rubyid_machine'>machine</span><span class='period'>.</span><span class='id identifier rubyid_communicate'>communicate</span><span class='period'>.</span><span class='id identifier rubyid_sudo'>sudo</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>ls /sys/class/net | grep -v lo</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid__'>_</span><span class='comma'>,</span> <span class='id identifier rubyid_result'>result</span><span class='op'>|</span>
269
- <span class='id identifier rubyid_interface_names'>interface_names</span> <span class='op'>=</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
270
- <span class='kw'>end</span>
271
-
272
- <span class='id identifier rubyid_interface_names'>interface_names</span> <span class='op'>=</span> <span class='id identifier rubyid_networks'>networks</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_network'>network</span><span class='op'>|</span>
273
- <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_interface_names'>interface_names</span><span class='lbracket'>[</span><span class='id identifier rubyid_network'>network</span><span class='lbracket'>[</span><span class='symbol'>:interface</span><span class='rbracket'>]</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
274
- <span class='kw'>end</span>
275
- <span class='kw'>else</span>
276
- <span class='id identifier rubyid_machine'>machine</span><span class='period'>.</span><span class='id identifier rubyid_communicate'>communicate</span><span class='period'>.</span><span class='id identifier rubyid_sudo'>sudo</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/usr/sbin/biosdevname -d | grep Kernel | cut -f2 -d: | sed -e &#39;s/ //;&#39;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid__'>_</span><span class='comma'>,</span> <span class='id identifier rubyid_result'>result</span><span class='op'>|</span>
277
- <span class='id identifier rubyid_interface_names'>interface_names</span> <span class='op'>=</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
278
- <span class='kw'>end</span>
279
-
280
- <span class='id identifier rubyid_interface_name_pairs'>interface_name_pairs</span> <span class='op'>=</span> <span class='const'>Array</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
281
- <span class='id identifier rubyid_interface_names'>interface_names</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_interface_name'>interface_name</span><span class='op'>|</span>
282
- <span class='id identifier rubyid_machine'>machine</span><span class='period'>.</span><span class='id identifier rubyid_communicate'>communicate</span><span class='period'>.</span><span class='id identifier rubyid_sudo'>sudo</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/usr/sbin/biosdevname --policy=all_ethN -i </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_interface_name'>interface_name</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid__'>_</span><span class='comma'>,</span> <span class='id identifier rubyid_result'>result</span><span class='op'>|</span>
283
- <span class='id identifier rubyid_interface_name_pairs'>interface_name_pairs</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='id identifier rubyid_interface_name'>interface_name</span><span class='comma'>,</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='rbracket'>]</span><span class='rparen'>)</span>
284
- <span class='kw'>end</span>
285
- <span class='kw'>end</span>
286
-
287
- <span class='id identifier rubyid_setting_interface_names'>setting_interface_names</span> <span class='op'>=</span> <span class='id identifier rubyid_networks'>networks</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_network'>network</span><span class='op'>|</span>
288
- <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>eth</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_network'>network</span><span class='lbracket'>[</span><span class='symbol'>:interface</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
289
- <span class='kw'>end</span>
290
-
291
- <span class='id identifier rubyid_interface_name_pairs'>interface_name_pairs</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_interface_name'>interface_name</span><span class='comma'>,</span> <span class='id identifier rubyid_previous_interface_name'>previous_interface_name</span><span class='op'>|</span>
292
- <span class='kw'>if</span> <span class='id identifier rubyid_setting_interface_names'>setting_interface_names</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span><span class='lparen'>(</span><span class='id identifier rubyid_previous_interface_name'>previous_interface_name</span><span class='rparen'>)</span> <span class='op'>==</span> <span class='kw'>nil</span>
293
- <span class='id identifier rubyid_interface_names'>interface_names</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_interface_name'>interface_name</span><span class='rparen'>)</span>
294
- <span class='kw'>end</span>
295
- <span class='kw'>end</span>
296
- <span class='kw'>end</span>
297
-
298
- <span class='comment'># Accumulate the configurations to add to the interfaces file as well
299
- </span> <span class='comment'># as what interfaces we&#39;re actually configuring since we use that later.
300
- </span> <span class='id identifier rubyid_interfaces'>interfaces</span> <span class='op'>=</span> <span class='const'>Set</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
301
- <span class='id identifier rubyid_networks'>networks</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_network'>network</span><span class='op'>|</span>
302
- <span class='id identifier rubyid_interface'>interface</span> <span class='op'>=</span> <span class='id identifier rubyid_interface_names'>interface_names</span><span class='lbracket'>[</span><span class='id identifier rubyid_network'>network</span><span class='lbracket'>[</span><span class='symbol'>:interface</span><span class='rbracket'>]</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span>
303
- <span class='id identifier rubyid_interfaces'>interfaces</span><span class='period'>.</span><span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='id identifier rubyid_interface'>interface</span><span class='rparen'>)</span>
304
- <span class='id identifier rubyid_network'>network</span><span class='lbracket'>[</span><span class='symbol'>:device</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_interface'>interface</span>
305
-
306
- <span class='comment'># Remove any previous vagrant configuration in this network
307
- </span> <span class='comment'># interface&#39;s configuration files.
308
- </span> <span class='id identifier rubyid_machine'>machine</span><span class='period'>.</span><span class='id identifier rubyid_communicate'>communicate</span><span class='period'>.</span><span class='id identifier rubyid_sudo'>sudo</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>touch </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_network_scripts_dir'>network_scripts_dir</span><span class='embexpr_end'>}</span><span class='tstring_content'>/ifcfg-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_interface'>interface</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
309
- <span class='id identifier rubyid_machine'>machine</span><span class='period'>.</span><span class='id identifier rubyid_communicate'>communicate</span><span class='period'>.</span><span class='id identifier rubyid_sudo'>sudo</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>sed -e &#39;/^#VAGRANT-BEGIN/,/^#VAGRANT-END/ d&#39; </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_network_scripts_dir'>network_scripts_dir</span><span class='embexpr_end'>}</span><span class='tstring_content'>/ifcfg-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_interface'>interface</span><span class='embexpr_end'>}</span><span class='tstring_content'> &gt; /tmp/vagrant-ifcfg-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_interface'>interface</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
310
- <span class='id identifier rubyid_machine'>machine</span><span class='period'>.</span><span class='id identifier rubyid_communicate'>communicate</span><span class='period'>.</span><span class='id identifier rubyid_sudo'>sudo</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cat /tmp/vagrant-ifcfg-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_interface'>interface</span><span class='embexpr_end'>}</span><span class='tstring_content'> &gt; </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_network_scripts_dir'>network_scripts_dir</span><span class='embexpr_end'>}</span><span class='tstring_content'>/ifcfg-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_interface'>interface</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
311
- <span class='id identifier rubyid_machine'>machine</span><span class='period'>.</span><span class='id identifier rubyid_communicate'>communicate</span><span class='period'>.</span><span class='id identifier rubyid_sudo'>sudo</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>rm -f /tmp/vagrant-ifcfg-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_interface'>interface</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
312
-
313
- <span class='comment'># Render and upload the network entry file to a deterministic
314
- </span> <span class='comment'># temporary location.
315
- </span> <span class='id identifier rubyid_entry'>entry</span> <span class='op'>=</span> <span class='const'>TemplateRenderer</span><span class='period'>.</span><span class='id identifier rubyid_render'>render</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>guests/fedora/network_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_network'>network</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
316
- <span class='label'>options:</span> <span class='id identifier rubyid_network'>network</span><span class='rparen'>)</span>
317
-
318
- <span class='id identifier rubyid_temp'>temp</span> <span class='op'>=</span> <span class='const'>Tempfile</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>vagrant</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
319
- <span class='id identifier rubyid_temp'>temp</span><span class='period'>.</span><span class='id identifier rubyid_binmode'>binmode</span>
320
- <span class='id identifier rubyid_temp'>temp</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_entry'>entry</span><span class='rparen'>)</span>
321
- <span class='id identifier rubyid_temp'>temp</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span>
322
-
323
- <span class='id identifier rubyid_machine'>machine</span><span class='period'>.</span><span class='id identifier rubyid_communicate'>communicate</span><span class='period'>.</span><span class='id identifier rubyid_upload'>upload</span><span class='lparen'>(</span><span class='id identifier rubyid_temp'>temp</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/tmp/vagrant-network-entry_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_interface'>interface</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
324
- <span class='kw'>end</span>
325
-
326
- <span class='comment'># Bring down all the interfaces we&#39;re reconfiguring. By bringing down
327
- </span> <span class='comment'># each specifically, we avoid reconfiguring p7p (the NAT interface) so
328
- </span> <span class='comment'># SSH never dies.
329
- </span> <span class='id identifier rubyid_interfaces'>interfaces</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_interface'>interface</span><span class='op'>|</span>
330
- <span class='id identifier rubyid_retryable'>retryable</span><span class='lparen'>(</span><span class='label'>on:</span> <span class='const'>Vagrant</span><span class='op'>::</span><span class='const'>Errors</span><span class='op'>::</span><span class='const'>VagrantError</span><span class='comma'>,</span> <span class='label'>tries:</span> <span class='int'>3</span><span class='comma'>,</span> <span class='label'>sleep:</span> <span class='int'>2</span><span class='rparen'>)</span> <span class='kw'>do</span>
331
- <span class='id identifier rubyid_machine'>machine</span><span class='period'>.</span><span class='id identifier rubyid_communicate'>communicate</span><span class='period'>.</span><span class='id identifier rubyid_sudo'>sudo</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cat /tmp/vagrant-network-entry_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_interface'>interface</span><span class='embexpr_end'>}</span><span class='tstring_content'> &gt;&gt; </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_network_scripts_dir'>network_scripts_dir</span><span class='embexpr_end'>}</span><span class='tstring_content'>/ifcfg-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_interface'>interface</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
332
- <span class='id identifier rubyid_machine'>machine</span><span class='period'>.</span><span class='id identifier rubyid_communicate'>communicate</span><span class='period'>.</span><span class='id identifier rubyid_sudo'>sudo</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/sbin/ifdown </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_interface'>interface</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>error_check:</span> <span class='kw'>true</span><span class='rparen'>)</span>
333
- <span class='id identifier rubyid_machine'>machine</span><span class='period'>.</span><span class='id identifier rubyid_communicate'>communicate</span><span class='period'>.</span><span class='id identifier rubyid_sudo'>sudo</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/sbin/ifup </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_interface'>interface</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
334
- <span class='kw'>end</span>
335
-
336
- <span class='id identifier rubyid_machine'>machine</span><span class='period'>.</span><span class='id identifier rubyid_communicate'>communicate</span><span class='period'>.</span><span class='id identifier rubyid_sudo'>sudo</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>rm -f /tmp/vagrant-network-entry_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_interface'>interface</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
337
- <span class='kw'>end</span>
338
- <span class='kw'>end</span></pre>
339
- </td>
340
- </tr>
341
- </table>
342
- </div>
343
-
344
- </div>
345
-
346
- </div>
347
-
348
- <div id="footer">
349
- Generated on Fri Apr 17 13:41:46 2015 by
350
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
351
- 0.8.7.6 (ruby-2.1.5).
352
- </div>
353
-
354
- </body>
355
- </html>
@@ -1,209 +0,0 @@
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: VagrantPlugins::GuestFedora::Cap::Flavor
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#!VagrantPlugins/GuestFedora/Cap/Flavor.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 (F)</a> &raquo;
35
- <span class='title'><span class='object_link'><a href="../../../VagrantPlugins.html" title="VagrantPlugins (module)">VagrantPlugins</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../GuestFedora.html" title="VagrantPlugins::GuestFedora (module)">GuestFedora</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Cap.html" title="VagrantPlugins::GuestFedora::Cap (module)">Cap</a></span></span>
36
- &raquo;
37
- <span class="title">Flavor</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: VagrantPlugins::GuestFedora::Cap::Flavor
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">VagrantPlugins::GuestFedora::Cap::Flavor</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">plugins/guests/fedora/cap/flavor.rb</dd>
98
-
99
- </dl>
100
- <div class="clear"></div>
101
-
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
- <h2>
111
- Class Method Summary
112
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
113
- </h2>
114
-
115
- <ul class="summary">
116
-
117
- <li class="public ">
118
- <span class="summary_signature">
119
-
120
- <a href="#flavor-class_method" title="flavor (class method)">+ (Object) <strong>flavor</strong>(machine) </a>
121
-
122
-
123
-
124
- </span>
125
-
126
-
127
-
128
-
129
-
130
-
131
-
132
-
133
-
134
- <span class="summary_desc"><div class='inline'></div></span>
135
-
136
- </li>
137
-
138
-
139
- </ul>
140
-
141
-
142
-
143
-
144
- <div id="class_method_details" class="method_details_list">
145
- <h2>Class Method Details</h2>
146
-
147
-
148
- <div class="method_details first">
149
- <h3 class="signature first" id="flavor-class_method">
150
-
151
- + (<tt>Object</tt>) <strong>flavor</strong>(machine)
152
-
153
-
154
-
155
-
156
-
157
- </h3><table class="source_code">
158
- <tr>
159
- <td>
160
- <pre class="lines">
161
-
162
-
163
- 5
164
- 6
165
- 7
166
- 8
167
- 9
168
- 10
169
- 11
170
- 12
171
- 13
172
- 14
173
- 15
174
- 16
175
- 17</pre>
176
- </td>
177
- <td>
178
- <pre class="code"><span class="info file"># File 'plugins/guests/fedora/cap/flavor.rb', line 5</span>
179
-
180
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_flavor'>flavor</span><span class='lparen'>(</span><span class='id identifier rubyid_machine'>machine</span><span class='rparen'>)</span>
181
- <span class='comment'># Read the version file
182
- </span> <span class='id identifier rubyid_machine'>machine</span><span class='period'>.</span><span class='id identifier rubyid_communicate'>communicate</span><span class='period'>.</span><span class='id identifier rubyid_sudo'>sudo</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>grep VERSION_ID /etc/os-release</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span><span class='op'>|</span>
183
- <span class='id identifier rubyid_version'>version</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>=</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_chomp'>chomp</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>==</span> <span class='symbol'>:stdout</span>
184
- <span class='kw'>end</span>
185
-
186
- <span class='comment'># Detect various flavors we care about
187
- </span> <span class='kw'>if</span> <span class='id identifier rubyid_version'>version</span> <span class='op'>&gt;=</span> <span class='int'>20</span>
188
- <span class='kw'>return</span> <span class='symbol'>:fedora_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_version'>version</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
189
- <span class='kw'>else</span>
190
- <span class='kw'>return</span> <span class='symbol'>:fedora</span>
191
- <span class='kw'>end</span>
192
- <span class='kw'>end</span></pre>
193
- </td>
194
- </tr>
195
- </table>
196
- </div>
197
-
198
- </div>
199
-
200
- </div>
201
-
202
- <div id="footer">
203
- Generated on Fri Apr 17 13:41:45 2015 by
204
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
205
- 0.8.7.6 (ruby-2.1.5).
206
- </div>
207
-
208
- </body>
209
- </html>