corl 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/VERSION +1 -1
  4. data/bootstrap/os/ubuntu/06_puppet.sh +1 -1
  5. data/corl.gemspec +171 -3
  6. data/lib/CORL/builder/identity.rb +6 -3
  7. data/lib/CORL/builder/package.rb +3 -3
  8. data/lib/CORL/configuration/file.rb +21 -7
  9. data/lib/CORL/machine/vagrant.rb +3 -3
  10. data/lib/CORL/node/vagrant.rb +2 -5
  11. data/lib/CORL/provisioner/puppetnode.rb +8 -8
  12. data/lib/core/facade.rb +7 -3
  13. data/lib/core/mixin/action/keypair.rb +3 -3
  14. data/lib/core/mixin/action/registration.rb +31 -0
  15. data/lib/core/mixin/lookup.rb +50 -6
  16. data/lib/core/mixin/machine/ssh.rb +4 -4
  17. data/lib/core/plugin/cloud_action.rb +8 -1
  18. data/lib/core/plugin/configuration.rb +6 -7
  19. data/lib/core/plugin/fog_node.rb +7 -0
  20. data/lib/core/plugin/network.rb +31 -0
  21. data/lib/core/plugin/node.rb +182 -117
  22. data/lib/core/vagrant/provisioner/provisioner.rb +1 -1
  23. data/lib/nucleon/action/cloud/config.rb +259 -0
  24. data/lib/nucleon/action/cloud/images.rb +1 -1
  25. data/lib/nucleon/action/cloud/inspect.rb +11 -2
  26. data/lib/nucleon/action/cloud/machines.rb +1 -1
  27. data/lib/nucleon/action/cloud/regions.rb +1 -1
  28. data/lib/nucleon/action/cloud/settings.rb +185 -0
  29. data/lib/nucleon/action/node/IP.rb +1 -1
  30. data/lib/nucleon/action/node/bootstrap.rb +1 -1
  31. data/lib/nucleon/action/node/cache.rb +133 -0
  32. data/lib/nucleon/action/node/fact.rb +119 -0
  33. data/lib/nucleon/action/node/facts.rb +16 -16
  34. data/lib/nucleon/action/node/group.rb +115 -0
  35. data/lib/nucleon/action/node/groups.rb +33 -0
  36. data/lib/nucleon/action/node/identity.rb +75 -0
  37. data/lib/nucleon/action/node/lookup.rb +20 -7
  38. data/lib/nucleon/action/node/seed.rb +6 -6
  39. data/lib/nucleon/action/node/status.rb +76 -0
  40. data/lib/nucleon/action/plugin/create.rb +169 -0
  41. data/lib/nucleon/action/plugin/list.rb +69 -0
  42. data/lib/nucleon/action/plugin/template/nucleon.action.erb +56 -0
  43. data/lib/nucleon/action/plugins.rb +14 -0
  44. data/locales/en.yml +3 -0
  45. data/rdoc/site/0.5.0/CORL/Build.html +757 -0
  46. data/rdoc/site/0.5.0/CORL/Builder/Identity.html +569 -0
  47. data/rdoc/site/0.5.0/CORL/Builder/Package.html +576 -0
  48. data/rdoc/site/0.5.0/CORL/Builder.html +360 -0
  49. data/rdoc/site/0.5.0/CORL/Configuration/File.html +1148 -0
  50. data/rdoc/site/0.5.0/CORL/Configuration.html +359 -0
  51. data/rdoc/site/0.5.0/CORL/Errors.html +359 -0
  52. data/rdoc/site/0.5.0/CORL/Facade.html +899 -0
  53. data/rdoc/site/0.5.0/CORL/Machine/AWS.html +753 -0
  54. data/rdoc/site/0.5.0/CORL/Machine/Fog.html +1289 -0
  55. data/rdoc/site/0.5.0/CORL/Machine/Physical.html +1059 -0
  56. data/rdoc/site/0.5.0/CORL/Machine/Rackspace.html +534 -0
  57. data/rdoc/site/0.5.0/CORL/Machine/Vagrant.html +1320 -0
  58. data/rdoc/site/0.5.0/CORL/Machine.html +363 -0
  59. data/rdoc/site/0.5.0/CORL/Mixin/Action/Keypair.html +592 -0
  60. data/rdoc/site/0.5.0/CORL/Mixin/Action.html +359 -0
  61. data/rdoc/site/0.5.0/CORL/Mixin/Builder/Global.html +604 -0
  62. data/rdoc/site/0.5.0/CORL/Mixin/Builder/Instance.html +696 -0
  63. data/rdoc/site/0.5.0/CORL/Mixin/Builder.html +359 -0
  64. data/rdoc/site/0.5.0/CORL/Mixin/Lookup.html +1139 -0
  65. data/rdoc/site/0.5.0/CORL/Mixin/Machine/SSH.html +675 -0
  66. data/rdoc/site/0.5.0/CORL/Mixin/Machine.html +359 -0
  67. data/rdoc/site/0.5.0/CORL/Mixin/Macro/NetworkSettings.html +484 -0
  68. data/rdoc/site/0.5.0/CORL/Mixin/Macro.html +359 -0
  69. data/rdoc/site/0.5.0/CORL/Mixin.html +363 -0
  70. data/rdoc/site/0.5.0/CORL/Network/CORL.html +411 -0
  71. data/rdoc/site/0.5.0/CORL/Network.html +359 -0
  72. data/rdoc/site/0.5.0/CORL/Node/AWS.html +736 -0
  73. data/rdoc/site/0.5.0/CORL/Node/Fog.html +1212 -0
  74. data/rdoc/site/0.5.0/CORL/Node/Local.html +444 -0
  75. data/rdoc/site/0.5.0/CORL/Node/Rackspace.html +729 -0
  76. data/rdoc/site/0.5.0/CORL/Node/Vagrant.html +1476 -0
  77. data/rdoc/site/0.5.0/CORL/Node.html +363 -0
  78. data/rdoc/site/0.5.0/CORL/Plugin/Builder.html +500 -0
  79. data/rdoc/site/0.5.0/CORL/Plugin/Configuration.html +1271 -0
  80. data/rdoc/site/0.5.0/CORL/Plugin/Machine.html +1299 -0
  81. data/rdoc/site/0.5.0/CORL/Plugin/Network.html +1580 -0
  82. data/rdoc/site/0.5.0/CORL/Plugin/Node.html +4041 -0
  83. data/rdoc/site/0.5.0/CORL/Plugin/Provisioner.html +1115 -0
  84. data/rdoc/site/0.5.0/CORL/Plugin.html +649 -0
  85. data/rdoc/site/0.5.0/CORL/Provisioner/Puppetnode.html +1177 -0
  86. data/rdoc/site/0.5.0/CORL/Provisioner.html +359 -0
  87. data/rdoc/site/0.5.0/CORL/Util/Puppet/Resource.html +1058 -0
  88. data/rdoc/site/0.5.0/CORL/Util/Puppet/ResourceGroup.html +940 -0
  89. data/rdoc/site/0.5.0/CORL/Util/Puppet.html +1107 -0
  90. data/rdoc/site/0.5.0/CORL/Util.html +361 -0
  91. data/rdoc/site/0.5.0/CORL/Vagrant/Config.html +943 -0
  92. data/rdoc/site/0.5.0/CORL/Vagrant.html +438 -0
  93. data/rdoc/site/0.5.0/CORL.html +471 -0
  94. data/rdoc/site/0.5.0/Fog/Compute/AWS/Server.html +443 -0
  95. data/rdoc/site/0.5.0/Fog/Compute/AWS.html +365 -0
  96. data/rdoc/site/0.5.0/Fog/Compute/RackspaceV2/Server.html +428 -0
  97. data/rdoc/site/0.5.0/Fog/Compute/RackspaceV2.html +365 -0
  98. data/rdoc/site/0.5.0/Fog/Compute.html +360 -0
  99. data/rdoc/site/0.5.0/Fog.html +360 -0
  100. data/rdoc/site/0.5.0/Hiera/Backend.html +442 -0
  101. data/rdoc/site/0.5.0/Hiera/Corl_logger.html +469 -0
  102. data/rdoc/site/0.5.0/Hiera.html +366 -0
  103. data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Create.html +538 -0
  104. data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Hiera.html +566 -0
  105. data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Images.html +572 -0
  106. data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Inspect.html +524 -0
  107. data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Machines.html +567 -0
  108. data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Regions.html +567 -0
  109. data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Vagrantfile.html +515 -0
  110. data/rdoc/site/0.5.0/Nucleon/Action/Cloud.html +365 -0
  111. data/rdoc/site/0.5.0/Nucleon/Action/Node/Authorize.html +543 -0
  112. data/rdoc/site/0.5.0/Nucleon/Action/Node/Bootstrap.html +604 -0
  113. data/rdoc/site/0.5.0/Nucleon/Action/Node/Build.html +526 -0
  114. data/rdoc/site/0.5.0/Nucleon/Action/Node/Destroy.html +573 -0
  115. data/rdoc/site/0.5.0/Nucleon/Action/Node/Exec.html +530 -0
  116. data/rdoc/site/0.5.0/Nucleon/Action/Node/Facts.html +456 -0
  117. data/rdoc/site/0.5.0/Nucleon/Action/Node/IP.html +453 -0
  118. data/rdoc/site/0.5.0/Nucleon/Action/Node/Image.html +573 -0
  119. data/rdoc/site/0.5.0/Nucleon/Action/Node/Keypair.html +572 -0
  120. data/rdoc/site/0.5.0/Nucleon/Action/Node/Lookup.html +532 -0
  121. data/rdoc/site/0.5.0/Nucleon/Action/Node/Provision.html +553 -0
  122. data/rdoc/site/0.5.0/Nucleon/Action/Node/Reboot.html +573 -0
  123. data/rdoc/site/0.5.0/Nucleon/Action/Node/Revoke.html +541 -0
  124. data/rdoc/site/0.5.0/Nucleon/Action/Node/SSH.html +583 -0
  125. data/rdoc/site/0.5.0/Nucleon/Action/Node/Seed.html +602 -0
  126. data/rdoc/site/0.5.0/Nucleon/Action/Node/Spawn.html +675 -0
  127. data/rdoc/site/0.5.0/Nucleon/Action/Node/Start.html +573 -0
  128. data/rdoc/site/0.5.0/Nucleon/Action/Node/Stop.html +573 -0
  129. data/rdoc/site/0.5.0/Nucleon/Action/Node.html +376 -0
  130. data/rdoc/site/0.5.0/Nucleon/Action.html +383 -0
  131. data/rdoc/site/0.5.0/Nucleon/Config.html +377 -0
  132. data/rdoc/site/0.5.0/Nucleon/Event/Puppet.html +693 -0
  133. data/rdoc/site/0.5.0/Nucleon/Event.html +359 -0
  134. data/rdoc/site/0.5.0/Nucleon/Plugin/Base.html +365 -0
  135. data/rdoc/site/0.5.0/Nucleon/Plugin/CloudAction.html +838 -0
  136. data/rdoc/site/0.5.0/Nucleon/Plugin.html +360 -0
  137. data/rdoc/site/0.5.0/Nucleon/Template/Environment.html +548 -0
  138. data/rdoc/site/0.5.0/Nucleon/Template.html +359 -0
  139. data/rdoc/site/0.5.0/Nucleon.html +387 -0
  140. data/rdoc/site/0.5.0/Object.html +378 -0
  141. data/rdoc/site/0.5.0/Puppet/DataBinding/Corl.html +365 -0
  142. data/rdoc/site/0.5.0/Puppet/DataBinding.html +358 -0
  143. data/rdoc/site/0.5.0/Puppet/Indirector/Corl.html +477 -0
  144. data/rdoc/site/0.5.0/Puppet/Indirector.html +358 -0
  145. data/rdoc/site/0.5.0/Puppet/Parser/Functions.html +500 -0
  146. data/rdoc/site/0.5.0/Puppet/Parser.html +358 -0
  147. data/rdoc/site/0.5.0/Puppet.html +358 -0
  148. data/rdoc/site/0.5.0/README_rdoc.html +360 -0
  149. data/rdoc/site/0.5.0/Vagrant/Config/Loader.html +419 -0
  150. data/rdoc/site/0.5.0/Vagrant/Config.html +359 -0
  151. data/rdoc/site/0.5.0/Vagrant/Vagrantfile.html +412 -0
  152. data/rdoc/site/0.5.0/Vagrant.html +366 -0
  153. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Action/DeleteCache.html +422 -0
  154. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Action/InitKeys.html +428 -0
  155. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Action/LinkNetwork.html +426 -0
  156. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Action.html +361 -0
  157. data/rdoc/site/0.5.0/VagrantPlugins/CORL/BaseAction.html +511 -0
  158. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Command/Launcher.html +553 -0
  159. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Command.html +359 -0
  160. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Config/CORL.html +752 -0
  161. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Config.html +359 -0
  162. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Plugin.html +365 -0
  163. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Provisioner/CORL.html +556 -0
  164. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Provisioner.html +359 -0
  165. data/rdoc/site/0.5.0/VagrantPlugins/CORL.html +366 -0
  166. data/rdoc/site/0.5.0/VagrantPlugins.html +366 -0
  167. data/rdoc/site/0.5.0/created.rid +103 -0
  168. data/rdoc/site/0.5.0/images/add.png +0 -0
  169. data/rdoc/site/0.5.0/images/brick.png +0 -0
  170. data/rdoc/site/0.5.0/images/brick_link.png +0 -0
  171. data/rdoc/site/0.5.0/images/bug.png +0 -0
  172. data/rdoc/site/0.5.0/images/bullet_black.png +0 -0
  173. data/rdoc/site/0.5.0/images/bullet_toggle_minus.png +0 -0
  174. data/rdoc/site/0.5.0/images/bullet_toggle_plus.png +0 -0
  175. data/rdoc/site/0.5.0/images/date.png +0 -0
  176. data/rdoc/site/0.5.0/images/delete.png +0 -0
  177. data/rdoc/site/0.5.0/images/find.png +0 -0
  178. data/rdoc/site/0.5.0/images/loadingAnimation.gif +0 -0
  179. data/rdoc/site/0.5.0/images/macFFBgHack.png +0 -0
  180. data/rdoc/site/0.5.0/images/package.png +0 -0
  181. data/rdoc/site/0.5.0/images/page_green.png +0 -0
  182. data/rdoc/site/0.5.0/images/page_white_text.png +0 -0
  183. data/rdoc/site/0.5.0/images/page_white_width.png +0 -0
  184. data/rdoc/site/0.5.0/images/plugin.png +0 -0
  185. data/rdoc/site/0.5.0/images/ruby.png +0 -0
  186. data/rdoc/site/0.5.0/images/tag_blue.png +0 -0
  187. data/rdoc/site/0.5.0/images/tag_green.png +0 -0
  188. data/rdoc/site/0.5.0/images/transparent.png +0 -0
  189. data/rdoc/site/0.5.0/images/wrench.png +0 -0
  190. data/rdoc/site/0.5.0/images/wrench_orange.png +0 -0
  191. data/rdoc/site/0.5.0/images/zoom.png +0 -0
  192. data/rdoc/site/0.5.0/index.html +359 -0
  193. data/rdoc/site/0.5.0/js/darkfish.js +155 -0
  194. data/rdoc/site/0.5.0/js/jquery.js +18 -0
  195. data/rdoc/site/0.5.0/js/navigation.js +142 -0
  196. data/rdoc/site/0.5.0/js/search.js +94 -0
  197. data/rdoc/site/0.5.0/js/search_index.js +1 -0
  198. data/rdoc/site/0.5.0/js/searcher.js +228 -0
  199. data/rdoc/site/0.5.0/rdoc.css +543 -0
  200. data/rdoc/site/0.5.0/table_of_contents.html +1797 -0
  201. metadata +171 -3
  202. data/lib/nucleon/action/cloud/hiera.rb +0 -61
@@ -0,0 +1,1580 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>class CORL::Plugin::Network - corl 0.5.0</title>
8
+
9
+ <link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "../../";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="../../js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="../../js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="../../js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="../../js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="../../js/darkfish.js"></script>
21
+
22
+
23
+ <body id="top" class="class">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="../../index.html">Home</a>
28
+ <a href="../../table_of_contents.html#classes">Classes</a>
29
+ <a href="../../table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="file-metadata">
47
+ <nav id="file-list-section" class="section">
48
+ <h3 class="section-header">Defined In</h3>
49
+ <ul>
50
+ <li>lib/core/plugin/network.rb
51
+ </ul>
52
+ </nav>
53
+
54
+
55
+ </div>
56
+
57
+ <div id="class-metadata">
58
+
59
+ <nav id="parent-class-section" class="section">
60
+ <h3 class="section-header">Parent</h3>
61
+
62
+ <p class="link">CORL.plugin_class(:nucleon, :base)
63
+
64
+ </nav>
65
+
66
+
67
+ <!-- Method Quickref -->
68
+ <nav id="method-list-section" class="section">
69
+ <h3 class="section-header">Methods</h3>
70
+
71
+ <ul class="link-list">
72
+
73
+ <li><a href="#method-i-add_node">#add_node</a>
74
+
75
+ <li><a href="#method-i-attach_data">#attach_data</a>
76
+
77
+ <li><a href="#method-i-attach_files">#attach_files</a>
78
+
79
+ <li><a href="#method-i-batch">#batch</a>
80
+
81
+ <li><a href="#method-i-build">#build</a>
82
+
83
+ <li><a href="#method-i-build_directory">#build_directory</a>
84
+
85
+ <li><a href="#method-i-cache">#cache</a>
86
+
87
+ <li><a href="#method-i-delete_attachments">#delete_attachments</a>
88
+
89
+ <li><a href="#method-i-directory">#directory</a>
90
+
91
+ <li><a href="#method-i-each_node_config">#each_node_config</a>
92
+
93
+ <li><a href="#method-i-has_nodes-3F">#has_nodes?</a>
94
+
95
+ <li><a href="#method-i-hiera_override_dir">#hiera_override_dir</a>
96
+
97
+ <li><a href="#method-i-hiera_var">#hiera_var</a>
98
+
99
+ <li><a href="#method-i-hiera_var-3D">#hiera_var=</a>
100
+
101
+ <li><a href="#method-i-home">#home</a>
102
+
103
+ <li><a href="#method-i-ignore">#ignore</a>
104
+
105
+ <li><a href="#method-i-init_node">#init_node</a>
106
+
107
+ <li><a href="#method-i-key_cache_directory">#key_cache_directory</a>
108
+
109
+ <li><a href="#method-i-load">#load</a>
110
+
111
+ <li><a href="#method-i-local_node">#local_node</a>
112
+
113
+ <li><a href="#method-i-node_by_ip">#node_by_ip</a>
114
+
115
+ <li><a href="#method-i-node_groups">#node_groups</a>
116
+
117
+ <li><a href="#method-i-node_info">#node_info</a>
118
+
119
+ <li><a href="#method-i-nodes_by_reference">#nodes_by_reference</a>
120
+
121
+ <li><a href="#method-i-normalize">#normalize</a>
122
+
123
+ <li><a href="#method-i-remote">#remote</a>
124
+
125
+ <li><a href="#method-i-remove_plugin">#remove_plugin</a>
126
+
127
+ <li><a href="#method-i-save">#save</a>
128
+
129
+ <li><a href="#method-i-set_remote">#set_remote</a>
130
+
131
+ <li><a href="#method-i-test_node">#test_node</a>
132
+
133
+ </ul>
134
+ </nav>
135
+
136
+ </div>
137
+
138
+ <div id="project-metadata">
139
+ <nav id="fileindex-section" class="section project-section">
140
+ <h3 class="section-header">Pages</h3>
141
+
142
+ <ul>
143
+
144
+ <li class="file"><a href="../../README_rdoc.html">README</a>
145
+
146
+ </ul>
147
+ </nav>
148
+
149
+ <nav id="classindex-section" class="section project-section">
150
+ <h3 class="section-header">Class and Module Index</h3>
151
+
152
+ <ul class="link-list">
153
+
154
+ <li><a href="../../CORL.html">CORL</a>
155
+
156
+ <li><a href="../../CORL/Build.html">CORL::Build</a>
157
+
158
+ <li><a href="../../CORL/Builder.html">CORL::Builder</a>
159
+
160
+ <li><a href="../../CORL/Builder/Identity.html">CORL::Builder::Identity</a>
161
+
162
+ <li><a href="../../CORL/Builder/Package.html">CORL::Builder::Package</a>
163
+
164
+ <li><a href="../../CORL/Configuration.html">CORL::Configuration</a>
165
+
166
+ <li><a href="../../CORL/Configuration/File.html">CORL::Configuration::File</a>
167
+
168
+ <li><a href="../../CORL/Errors.html">CORL::Errors</a>
169
+
170
+ <li><a href="../../CORL/Facade.html">CORL::Facade</a>
171
+
172
+ <li><a href="../../CORL/Machine.html">CORL::Machine</a>
173
+
174
+ <li><a href="../../CORL/Machine/AWS.html">CORL::Machine::AWS</a>
175
+
176
+ <li><a href="../../CORL/Machine/Fog.html">CORL::Machine::Fog</a>
177
+
178
+ <li><a href="../../CORL/Machine/Physical.html">CORL::Machine::Physical</a>
179
+
180
+ <li><a href="../../CORL/Machine/Rackspace.html">CORL::Machine::Rackspace</a>
181
+
182
+ <li><a href="../../CORL/Machine/Vagrant.html">CORL::Machine::Vagrant</a>
183
+
184
+ <li><a href="../../CORL/Mixin.html">CORL::Mixin</a>
185
+
186
+ <li><a href="../../CORL/Mixin/Action.html">CORL::Mixin::Action</a>
187
+
188
+ <li><a href="../../CORL/Mixin/Action/Keypair.html">CORL::Mixin::Action::Keypair</a>
189
+
190
+ <li><a href="../../CORL/Mixin/Builder.html">CORL::Mixin::Builder</a>
191
+
192
+ <li><a href="../../CORL/Mixin/Builder/Global.html">CORL::Mixin::Builder::Global</a>
193
+
194
+ <li><a href="../../CORL/Mixin/Builder/Instance.html">CORL::Mixin::Builder::Instance</a>
195
+
196
+ <li><a href="../../CORL/Mixin/Lookup.html">CORL::Mixin::Lookup</a>
197
+
198
+ <li><a href="../../CORL/Mixin/Machine.html">CORL::Mixin::Machine</a>
199
+
200
+ <li><a href="../../CORL/Mixin/Machine/SSH.html">CORL::Mixin::Machine::SSH</a>
201
+
202
+ <li><a href="../../CORL/Mixin/Macro.html">CORL::Mixin::Macro</a>
203
+
204
+ <li><a href="../../CORL/Mixin/Macro/NetworkSettings.html">CORL::Mixin::Macro::NetworkSettings</a>
205
+
206
+ <li><a href="../../CORL/Network.html">CORL::Network</a>
207
+
208
+ <li><a href="../../CORL/Network/CORL.html">CORL::Network::CORL</a>
209
+
210
+ <li><a href="../../CORL/Node.html">CORL::Node</a>
211
+
212
+ <li><a href="../../CORL/Node/AWS.html">CORL::Node::AWS</a>
213
+
214
+ <li><a href="../../CORL/Node/Fog.html">CORL::Node::Fog</a>
215
+
216
+ <li><a href="../../CORL/Node/Local.html">CORL::Node::Local</a>
217
+
218
+ <li><a href="../../CORL/Node/Rackspace.html">CORL::Node::Rackspace</a>
219
+
220
+ <li><a href="../../CORL/Node/Vagrant.html">CORL::Node::Vagrant</a>
221
+
222
+ <li><a href="../../CORL/Plugin.html">CORL::Plugin</a>
223
+
224
+ <li><a href="../../CORL/Plugin/Builder.html">CORL::Plugin::Builder</a>
225
+
226
+ <li><a href="../../CORL/Plugin/Configuration.html">CORL::Plugin::Configuration</a>
227
+
228
+ <li><a href="../../CORL/Plugin/Machine.html">CORL::Plugin::Machine</a>
229
+
230
+ <li><a href="../../CORL/Plugin/Network.html">CORL::Plugin::Network</a>
231
+
232
+ <li><a href="../../CORL/Plugin/Node.html">CORL::Plugin::Node</a>
233
+
234
+ <li><a href="../../CORL/Plugin/Provisioner.html">CORL::Plugin::Provisioner</a>
235
+
236
+ <li><a href="../../CORL/Provisioner.html">CORL::Provisioner</a>
237
+
238
+ <li><a href="../../CORL/Provisioner/Puppetnode.html">CORL::Provisioner::Puppetnode</a>
239
+
240
+ <li><a href="../../CORL/Util.html">CORL::Util</a>
241
+
242
+ <li><a href="../../CORL/Util/Puppet.html">CORL::Util::Puppet</a>
243
+
244
+ <li><a href="../../CORL/Util/Puppet/Resource.html">CORL::Util::Puppet::Resource</a>
245
+
246
+ <li><a href="../../CORL/Util/Puppet/ResourceGroup.html">CORL::Util::Puppet::ResourceGroup</a>
247
+
248
+ <li><a href="../../CORL/Vagrant.html">CORL::Vagrant</a>
249
+
250
+ <li><a href="../../CORL/Vagrant/Config.html">CORL::Vagrant::Config</a>
251
+
252
+ <li><a href="../../Nucleon.html">Nucleon</a>
253
+
254
+ <li><a href="../../Nucleon/Action.html">Nucleon::Action</a>
255
+
256
+ <li><a href="../../Nucleon/Action/Cloud.html">Nucleon::Action::Cloud</a>
257
+
258
+ <li><a href="../../Nucleon/Action/Cloud/Create.html">Nucleon::Action::Cloud::Create</a>
259
+
260
+ <li><a href="../../Nucleon/Action/Cloud/Hiera.html">Nucleon::Action::Cloud::Hiera</a>
261
+
262
+ <li><a href="../../Nucleon/Action/Cloud/Images.html">Nucleon::Action::Cloud::Images</a>
263
+
264
+ <li><a href="../../Nucleon/Action/Cloud/Inspect.html">Nucleon::Action::Cloud::Inspect</a>
265
+
266
+ <li><a href="../../Nucleon/Action/Cloud/Machines.html">Nucleon::Action::Cloud::Machines</a>
267
+
268
+ <li><a href="../../Nucleon/Action/Cloud/Regions.html">Nucleon::Action::Cloud::Regions</a>
269
+
270
+ <li><a href="../../Nucleon/Action/Cloud/Vagrantfile.html">Nucleon::Action::Cloud::Vagrantfile</a>
271
+
272
+ <li><a href="../../Nucleon/Action/Node.html">Nucleon::Action::Node</a>
273
+
274
+ <li><a href="../../Nucleon/Action/Node/Authorize.html">Nucleon::Action::Node::Authorize</a>
275
+
276
+ <li><a href="../../Nucleon/Action/Node/Bootstrap.html">Nucleon::Action::Node::Bootstrap</a>
277
+
278
+ <li><a href="../../Nucleon/Action/Node/Build.html">Nucleon::Action::Node::Build</a>
279
+
280
+ <li><a href="../../Nucleon/Action/Node/Destroy.html">Nucleon::Action::Node::Destroy</a>
281
+
282
+ <li><a href="../../Nucleon/Action/Node/Exec.html">Nucleon::Action::Node::Exec</a>
283
+
284
+ <li><a href="../../Nucleon/Action/Node/Facts.html">Nucleon::Action::Node::Facts</a>
285
+
286
+ <li><a href="../../Nucleon/Action/Node/IP.html">Nucleon::Action::Node::IP</a>
287
+
288
+ <li><a href="../../Nucleon/Action/Node/Image.html">Nucleon::Action::Node::Image</a>
289
+
290
+ <li><a href="../../Nucleon/Action/Node/Keypair.html">Nucleon::Action::Node::Keypair</a>
291
+
292
+ <li><a href="../../Nucleon/Action/Node/Lookup.html">Nucleon::Action::Node::Lookup</a>
293
+
294
+ <li><a href="../../Nucleon/Action/Node/Provision.html">Nucleon::Action::Node::Provision</a>
295
+
296
+ <li><a href="../../Nucleon/Action/Node/Reboot.html">Nucleon::Action::Node::Reboot</a>
297
+
298
+ <li><a href="../../Nucleon/Action/Node/Revoke.html">Nucleon::Action::Node::Revoke</a>
299
+
300
+ <li><a href="../../Nucleon/Action/Node/SSH.html">Nucleon::Action::Node::SSH</a>
301
+
302
+ <li><a href="../../Nucleon/Action/Node/Seed.html">Nucleon::Action::Node::Seed</a>
303
+
304
+ <li><a href="../../Nucleon/Action/Node/Spawn.html">Nucleon::Action::Node::Spawn</a>
305
+
306
+ <li><a href="../../Nucleon/Action/Node/Start.html">Nucleon::Action::Node::Start</a>
307
+
308
+ <li><a href="../../Nucleon/Action/Node/Stop.html">Nucleon::Action::Node::Stop</a>
309
+
310
+ <li><a href="../../Nucleon/Config.html">Nucleon::Config</a>
311
+
312
+ <li><a href="../../Nucleon/Event.html">Nucleon::Event</a>
313
+
314
+ <li><a href="../../Nucleon/Event/Puppet.html">Nucleon::Event::Puppet</a>
315
+
316
+ <li><a href="../../Nucleon/Plugin.html">Nucleon::Plugin</a>
317
+
318
+ <li><a href="../../Nucleon/Plugin/Base.html">Nucleon::Plugin::Base</a>
319
+
320
+ <li><a href="../../Nucleon/Plugin/CloudAction.html">Nucleon::Plugin::CloudAction</a>
321
+
322
+ <li><a href="../../Nucleon/Template.html">Nucleon::Template</a>
323
+
324
+ <li><a href="../../Nucleon/Template/Environment.html">Nucleon::Template::Environment</a>
325
+
326
+ <li><a href="../../VagrantPlugins.html">VagrantPlugins</a>
327
+
328
+ <li><a href="../../VagrantPlugins/CORL.html">VagrantPlugins::CORL</a>
329
+
330
+ <li><a href="../../VagrantPlugins/CORL/Action.html">VagrantPlugins::CORL::Action</a>
331
+
332
+ <li><a href="../../VagrantPlugins/CORL/Action/DeleteCache.html">VagrantPlugins::CORL::Action::DeleteCache</a>
333
+
334
+ <li><a href="../../VagrantPlugins/CORL/Action/InitKeys.html">VagrantPlugins::CORL::Action::InitKeys</a>
335
+
336
+ <li><a href="../../VagrantPlugins/CORL/Action/LinkNetwork.html">VagrantPlugins::CORL::Action::LinkNetwork</a>
337
+
338
+ <li><a href="../../VagrantPlugins/CORL/BaseAction.html">VagrantPlugins::CORL::BaseAction</a>
339
+
340
+ <li><a href="../../VagrantPlugins/CORL/Command.html">VagrantPlugins::CORL::Command</a>
341
+
342
+ <li><a href="../../VagrantPlugins/CORL/Command/Launcher.html">VagrantPlugins::CORL::Command::Launcher</a>
343
+
344
+ <li><a href="../../VagrantPlugins/CORL/Config.html">VagrantPlugins::CORL::Config</a>
345
+
346
+ <li><a href="../../VagrantPlugins/CORL/Config/CORL.html">VagrantPlugins::CORL::Config::CORL</a>
347
+
348
+ <li><a href="../../VagrantPlugins/CORL/Plugin.html">VagrantPlugins::CORL::Plugin</a>
349
+
350
+ <li><a href="../../VagrantPlugins/CORL/Provisioner.html">VagrantPlugins::CORL::Provisioner</a>
351
+
352
+ <li><a href="../../VagrantPlugins/CORL/Provisioner/CORL.html">VagrantPlugins::CORL::Provisioner::CORL</a>
353
+
354
+ <li><a href="../../Puppet.html">Puppet</a>
355
+
356
+ <li><a href="../../Puppet/DataBinding.html">Puppet::DataBinding</a>
357
+
358
+ <li><a href="../../Puppet/DataBinding/Corl.html">Puppet::DataBinding::Corl</a>
359
+
360
+ <li><a href="../../Puppet/Indirector.html">Puppet::Indirector</a>
361
+
362
+ <li><a href="../../Puppet/Indirector/Corl.html">Puppet::Indirector::Corl</a>
363
+
364
+ <li><a href="../../Puppet/Parser.html">Puppet::Parser</a>
365
+
366
+ <li><a href="../../Puppet/Parser/Functions.html">Puppet::Parser::Functions</a>
367
+
368
+ <li><a href="../../Fog.html">Fog</a>
369
+
370
+ <li><a href="../../Fog/Compute.html">Fog::Compute</a>
371
+
372
+ <li><a href="../../Fog/Compute/AWS.html">Fog::Compute::AWS</a>
373
+
374
+ <li><a href="../../Fog/Compute/AWS/Server.html">Fog::Compute::AWS::Server</a>
375
+
376
+ <li><a href="../../Fog/Compute/RackspaceV2.html">Fog::Compute::RackspaceV2</a>
377
+
378
+ <li><a href="../../Fog/Compute/RackspaceV2/Server.html">Fog::Compute::RackspaceV2::Server</a>
379
+
380
+ <li><a href="../../Vagrant.html">Vagrant</a>
381
+
382
+ <li><a href="../../Vagrant/Config.html">Vagrant::Config</a>
383
+
384
+ <li><a href="../../Vagrant/Config/Loader.html">Vagrant::Config::Loader</a>
385
+
386
+ <li><a href="../../Vagrant/Vagrantfile.html">Vagrant::Vagrantfile</a>
387
+
388
+ <li><a href="../../Hiera.html">Hiera</a>
389
+
390
+ <li><a href="../../Hiera/Backend.html">Hiera::Backend</a>
391
+
392
+ <li><a href="../../Hiera/Corl_logger.html">Hiera::Corl_logger</a>
393
+
394
+ <li><a href="../../Object.html">Object</a>
395
+
396
+ </ul>
397
+ </nav>
398
+
399
+ </div>
400
+ </nav>
401
+
402
+ <div id="documentation">
403
+ <h1 class="class">class CORL::Plugin::Network</h1>
404
+
405
+ <div id="description" class="description">
406
+
407
+ </div><!-- description -->
408
+
409
+
410
+
411
+
412
+ <section id="5Buntitled-5D" class="documentation-section">
413
+
414
+
415
+
416
+
417
+
418
+
419
+
420
+
421
+ <!-- Methods -->
422
+
423
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
424
+ <h3 class="section-header">Public Instance Methods</h3>
425
+
426
+
427
+ <div id="method-i-add_node" class="method-detail ">
428
+
429
+ <div class="method-heading">
430
+ <span class="method-name">add_node</span><span
431
+ class="method-args">(provider, name, options = {}) { |:preprocess, hook_config| ... }</span>
432
+ <span class="method-click-advice">click to toggle source</span>
433
+ </div>
434
+
435
+
436
+ <div class="method-description">
437
+
438
+
439
+
440
+
441
+
442
+ <div class="method-source-code" id="add_node-source">
443
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 272</span>
444
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">add_node</span>(<span class="ruby-identifier">provider</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span> = {})
445
+ <span class="ruby-identifier">config</span> = <span class="ruby-constant">Config</span>.<span class="ruby-identifier">ensure</span>(<span class="ruby-identifier">options</span>)
446
+
447
+ <span class="ruby-identifier">keypair</span> = <span class="ruby-identifier">config</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value">:keypair</span>, <span class="ruby-keyword">nil</span>)
448
+ <span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">keypair</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">keypair</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">SSH</span><span class="ruby-operator">::</span><span class="ruby-constant">Keypair</span>)
449
+
450
+ <span class="ruby-identifier">remote_name</span> = <span class="ruby-identifier">config</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:remote</span>, <span class="ruby-value">:edit</span>)
451
+
452
+ <span class="ruby-identifier">node_options</span> = <span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Data</span>.<span class="ruby-identifier">clean</span>({
453
+ <span class="ruby-value">:settings</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">array</span>(<span class="ruby-identifier">config</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:groups</span>, [])) <span class="ruby-operator">|</span> [ <span class="ruby-string">&quot;server&quot;</span> ],
454
+ <span class="ruby-value">:region</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:region</span>, <span class="ruby-keyword">nil</span>),
455
+ <span class="ruby-value">:machine_type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:machine_type</span>, <span class="ruby-keyword">nil</span>),
456
+ <span class="ruby-value">:public_ip</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:public_ip</span>, <span class="ruby-keyword">nil</span>),
457
+ <span class="ruby-value">:image</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:image</span>, <span class="ruby-keyword">nil</span>),
458
+ <span class="ruby-value">:user</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:user</span>, <span class="ruby-value">:root</span>),
459
+ <span class="ruby-value">:hostname</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">name</span>
460
+ })
461
+
462
+ <span class="ruby-comment"># Set node data</span>
463
+ <span class="ruby-identifier">node</span> = <span class="ruby-identifier">set_node</span>(<span class="ruby-identifier">provider</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">node_options</span>)
464
+ <span class="ruby-identifier">hook_config</span> = { <span class="ruby-value">:node</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">node</span>, <span class="ruby-value">:remote</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">remote_name</span>, <span class="ruby-value">:config</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">config</span> }
465
+ <span class="ruby-identifier">success</span> = <span class="ruby-keyword">true</span>
466
+
467
+ <span class="ruby-keyword">yield</span>(<span class="ruby-value">:preprocess</span>, <span class="ruby-identifier">hook_config</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span>
468
+
469
+ <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">local?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">attach_keys</span>(<span class="ruby-identifier">keypair</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">extension_check</span>(<span class="ruby-value">:add_node</span>, <span class="ruby-identifier">hook_config</span>)
470
+ <span class="ruby-identifier">node</span>.<span class="ruby-identifier">keypair</span> = <span class="ruby-identifier">keypair</span>
471
+
472
+ <span class="ruby-comment"># Create new node / machine</span>
473
+ <span class="ruby-identifier">success</span> = <span class="ruby-identifier">node</span>.<span class="ruby-identifier">create</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">op</span>, <span class="ruby-identifier">data</span><span class="ruby-operator">|</span>
474
+ <span class="ruby-identifier">block_given?</span> <span class="ruby-operator">?</span> <span class="ruby-keyword">yield</span>(<span class="ruby-node">&quot;create_#{op}&quot;</span>.<span class="ruby-identifier">to_sym</span>, <span class="ruby-identifier">data</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">data</span>
475
+ <span class="ruby-keyword">end</span>
476
+
477
+ <span class="ruby-identifier">remote_name</span> = <span class="ruby-keyword">nil</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">remote_name</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span> <span class="ruby-identifier">remote</span>(<span class="ruby-identifier">remote_name</span>)
478
+
479
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">success</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">save</span>({ <span class="ruby-value">:remote</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">remote_name</span>, <span class="ruby-value">:message</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-node">&quot;Created machine #{name} on #{provider}&quot;</span> })
480
+ <span class="ruby-identifier">success</span> = <span class="ruby-identifier">init_node</span>(<span class="ruby-identifier">node</span>, <span class="ruby-identifier">config</span>.<span class="ruby-identifier">defaults</span>({ <span class="ruby-value">:bootstrap</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>, <span class="ruby-value">:seed</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span> })) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">op</span>, <span class="ruby-identifier">data</span><span class="ruby-operator">|</span>
481
+ <span class="ruby-identifier">block_given?</span> <span class="ruby-operator">?</span> <span class="ruby-keyword">yield</span>(<span class="ruby-identifier">op</span>, <span class="ruby-identifier">data</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">data</span>
482
+ <span class="ruby-keyword">end</span>
483
+ <span class="ruby-keyword">end</span>
484
+ <span class="ruby-keyword">end</span>
485
+ <span class="ruby-identifier">success</span>
486
+ <span class="ruby-keyword">end</span></pre>
487
+ </div><!-- add_node-source -->
488
+
489
+ </div>
490
+
491
+
492
+
493
+
494
+ </div><!-- add_node-method -->
495
+
496
+
497
+ <div id="method-i-attach_data" class="method-detail ">
498
+
499
+ <div class="method-heading">
500
+ <span class="method-name">attach_data</span><span
501
+ class="method-args">(type, name, data, options = {})</span>
502
+ <span class="method-click-advice">click to toggle source</span>
503
+ </div>
504
+
505
+
506
+ <div class="method-description">
507
+
508
+
509
+
510
+
511
+
512
+ <div class="method-source-code" id="attach_data-source">
513
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 254</span>
514
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">attach_data</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">data</span>, <span class="ruby-identifier">options</span> = {})
515
+ <span class="ruby-identifier">attach_config</span> = <span class="ruby-constant">Config</span>.<span class="ruby-identifier">ensure</span>(<span class="ruby-identifier">options</span>).<span class="ruby-identifier">import</span>({ <span class="ruby-value">:type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">:source</span> })
516
+ <span class="ruby-identifier">attached_data</span> = <span class="ruby-keyword">nil</span>
517
+
518
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
519
+ <span class="ruby-identifier">attached_data</span> = <span class="ruby-identifier">config</span>.<span class="ruby-identifier">attach</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">data</span>, <span class="ruby-identifier">attach_config</span>)
520
+ <span class="ruby-keyword">end</span>
521
+ <span class="ruby-identifier">attached_data</span>
522
+ <span class="ruby-keyword">end</span></pre>
523
+ </div><!-- attach_data-source -->
524
+
525
+ </div>
526
+
527
+
528
+
529
+
530
+ </div><!-- attach_data-method -->
531
+
532
+
533
+ <div id="method-i-attach_files" class="method-detail ">
534
+
535
+ <div class="method-heading">
536
+ <span class="method-name">attach_files</span><span
537
+ class="method-args">(type, name, files, options = {})</span>
538
+ <span class="method-click-advice">click to toggle source</span>
539
+ </div>
540
+
541
+
542
+ <div class="method-description">
543
+
544
+
545
+
546
+
547
+
548
+ <div class="method-source-code" id="attach_files-source">
549
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 238</span>
550
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">attach_files</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">files</span>, <span class="ruby-identifier">options</span> = {})
551
+ <span class="ruby-identifier">attach_config</span> = <span class="ruby-constant">Config</span>.<span class="ruby-identifier">ensure</span>(<span class="ruby-identifier">options</span>).<span class="ruby-identifier">import</span>({ <span class="ruby-value">:type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">:file</span> })
552
+ <span class="ruby-identifier">included_files</span> = []
553
+ <span class="ruby-identifier">files</span> = [ <span class="ruby-identifier">files</span> ] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">files</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
554
+
555
+ <span class="ruby-identifier">files</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
556
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">file</span>
557
+ <span class="ruby-identifier">attached_file</span> = <span class="ruby-identifier">config</span>.<span class="ruby-identifier">attach</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">file</span>, <span class="ruby-identifier">attach_config</span>)
558
+ <span class="ruby-identifier">included_files</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">attached_file</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">attached_file</span>.<span class="ruby-identifier">nil?</span>
559
+ <span class="ruby-keyword">end</span>
560
+ <span class="ruby-keyword">end</span>
561
+ <span class="ruby-identifier">included_files</span>
562
+ <span class="ruby-keyword">end</span></pre>
563
+ </div><!-- attach_files-source -->
564
+
565
+ </div>
566
+
567
+
568
+
569
+
570
+ </div><!-- attach_files-method -->
571
+
572
+
573
+ <div id="method-i-batch" class="method-detail ">
574
+
575
+ <div class="method-heading">
576
+ <span class="method-name">batch</span><span
577
+ class="method-args">(node_references, default_provider = nil, parallel = true, &code)</span>
578
+ <span class="method-click-advice">click to toggle source</span>
579
+ </div>
580
+
581
+
582
+ <div class="method-description">
583
+
584
+
585
+
586
+
587
+
588
+ <div class="method-source-code" id="batch-source">
589
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 408</span>
590
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">batch</span>(<span class="ruby-identifier">node_references</span>, <span class="ruby-identifier">default_provider</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">parallel</span> = <span class="ruby-keyword">true</span>, &amp;<span class="ruby-identifier">code</span>)
591
+ <span class="ruby-identifier">success</span> = <span class="ruby-keyword">true</span>
592
+
593
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">has_nodes?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span> <span class="ruby-identifier">node_references</span>.<span class="ruby-identifier">empty?</span>
594
+ <span class="ruby-comment"># Execute action on selected nodes </span>
595
+ <span class="ruby-identifier">nodes</span> = <span class="ruby-identifier">nodes_by_reference</span>(<span class="ruby-identifier">node_references</span>, <span class="ruby-identifier">default_provider</span>)
596
+
597
+ <span class="ruby-keyword">if</span> <span class="ruby-constant">CORL</span>.<span class="ruby-identifier">parallel?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">parallel</span>
598
+ <span class="ruby-identifier">values</span> = []
599
+ <span class="ruby-identifier">nodes</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">node</span><span class="ruby-operator">|</span>
600
+ <span class="ruby-identifier">values</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">Celluloid</span><span class="ruby-operator">::</span><span class="ruby-constant">Future</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">node</span>, &amp;<span class="ruby-identifier">code</span>)
601
+ <span class="ruby-keyword">end</span>
602
+ <span class="ruby-identifier">values</span> = <span class="ruby-identifier">values</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">future</span><span class="ruby-operator">|</span> <span class="ruby-identifier">future</span>.<span class="ruby-identifier">value</span> }
603
+ <span class="ruby-identifier">success</span> = <span class="ruby-keyword">false</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">values</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-keyword">false</span>)
604
+ <span class="ruby-keyword">else</span>
605
+ <span class="ruby-identifier">nodes</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">node</span><span class="ruby-operator">|</span>
606
+ <span class="ruby-identifier">proc_success</span> = <span class="ruby-identifier">code</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">node</span>)
607
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">proc_success</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">false</span>
608
+ <span class="ruby-identifier">success</span> = <span class="ruby-keyword">false</span>
609
+ <span class="ruby-keyword">break</span>
610
+ <span class="ruby-keyword">end</span>
611
+ <span class="ruby-keyword">end</span>
612
+ <span class="ruby-keyword">end</span>
613
+ <span class="ruby-keyword">end</span>
614
+ <span class="ruby-identifier">success</span>
615
+ <span class="ruby-keyword">end</span></pre>
616
+ </div><!-- batch-source -->
617
+
618
+ </div>
619
+
620
+
621
+
622
+
623
+ </div><!-- batch-method -->
624
+
625
+
626
+ <div id="method-i-build" class="method-detail ">
627
+
628
+ <div class="method-heading">
629
+ <span class="method-name">build</span><span
630
+ class="method-args">()</span>
631
+ <span class="method-click-advice">click to toggle source</span>
632
+ </div>
633
+
634
+
635
+ <div class="method-description">
636
+
637
+
638
+
639
+
640
+
641
+ <div class="method-source-code" id="build-source">
642
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 219</span>
643
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">build</span>
644
+ <span class="ruby-ivar">@build</span>
645
+ <span class="ruby-keyword">end</span></pre>
646
+ </div><!-- build-source -->
647
+
648
+ </div>
649
+
650
+
651
+
652
+
653
+ </div><!-- build-method -->
654
+
655
+
656
+ <div id="method-i-build_directory" class="method-detail ">
657
+
658
+ <div class="method-heading">
659
+ <span class="method-name">build_directory</span><span
660
+ class="method-args">()</span>
661
+ <span class="method-click-advice">click to toggle source</span>
662
+ </div>
663
+
664
+
665
+ <div class="method-description">
666
+
667
+
668
+
669
+
670
+
671
+ <div class="method-source-code" id="build_directory-source">
672
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 79</span>
673
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">build_directory</span>
674
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">directory</span>, <span class="ruby-string">&#39;build&#39;</span>)
675
+ <span class="ruby-keyword">end</span></pre>
676
+ </div><!-- build_directory-source -->
677
+
678
+ </div>
679
+
680
+
681
+
682
+
683
+ </div><!-- build_directory-method -->
684
+
685
+
686
+ <div id="method-i-cache" class="method-detail ">
687
+
688
+ <div class="method-heading">
689
+ <span class="method-name">cache</span><span
690
+ class="method-args">()</span>
691
+ <span class="method-click-advice">click to toggle source</span>
692
+ </div>
693
+
694
+
695
+ <div class="method-description">
696
+
697
+
698
+
699
+
700
+
701
+ <div class="method-source-code" id="cache-source">
702
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 90</span>
703
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">cache</span>
704
+ <span class="ruby-identifier">config</span>.<span class="ruby-identifier">cache</span>
705
+ <span class="ruby-keyword">end</span></pre>
706
+ </div><!-- cache-source -->
707
+
708
+ </div>
709
+
710
+
711
+
712
+
713
+ </div><!-- cache-method -->
714
+
715
+
716
+ <div id="method-i-delete_attachments" class="method-detail ">
717
+
718
+ <div class="method-heading">
719
+ <span class="method-name">delete_attachments</span><span
720
+ class="method-args">(ids, options = {})</span>
721
+ <span class="method-click-advice">click to toggle source</span>
722
+ </div>
723
+
724
+
725
+ <div class="method-description">
726
+
727
+
728
+
729
+
730
+
731
+ <div class="method-source-code" id="delete_attachments-source">
732
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 266</span>
733
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">delete_attachments</span>(<span class="ruby-identifier">ids</span>, <span class="ruby-identifier">options</span> = {})
734
+ <span class="ruby-identifier">config</span>.<span class="ruby-identifier">delete_attachments</span>(<span class="ruby-identifier">ids</span>, <span class="ruby-identifier">options</span>)
735
+ <span class="ruby-keyword">end</span></pre>
736
+ </div><!-- delete_attachments-source -->
737
+
738
+ </div>
739
+
740
+
741
+
742
+
743
+ </div><!-- delete_attachments-method -->
744
+
745
+
746
+ <div id="method-i-directory" class="method-detail ">
747
+
748
+ <div class="method-heading">
749
+ <span class="method-name">directory</span><span
750
+ class="method-args">()</span>
751
+ <span class="method-click-advice">click to toggle source</span>
752
+ </div>
753
+
754
+
755
+ <div class="method-description">
756
+
757
+
758
+
759
+
760
+
761
+ <div class="method-source-code" id="directory-source">
762
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 73</span>
763
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">directory</span>
764
+ <span class="ruby-identifier">config</span>.<span class="ruby-identifier">directory</span>
765
+ <span class="ruby-keyword">end</span></pre>
766
+ </div><!-- directory-source -->
767
+
768
+ </div>
769
+
770
+
771
+
772
+
773
+ </div><!-- directory-method -->
774
+
775
+
776
+ <div id="method-i-each_node_config" class="method-detail ">
777
+
778
+ <div class="method-heading">
779
+ <span class="method-name">each_node_config</span><span
780
+ class="method-args">(provider = nil) { |node_provider, name, info| ... }</span>
781
+ <span class="method-click-advice">click to toggle source</span>
782
+ </div>
783
+
784
+
785
+ <div class="method-description">
786
+
787
+
788
+
789
+
790
+
791
+ <div class="method-source-code" id="each_node_config-source">
792
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 396</span>
793
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">each_node_config</span>(<span class="ruby-identifier">provider</span> = <span class="ruby-keyword">nil</span>)
794
+ <span class="ruby-identifier">node_config</span>.<span class="ruby-identifier">export</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">node_provider</span>, <span class="ruby-identifier">nodes</span><span class="ruby-operator">|</span>
795
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">provider</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">provider</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">node_provider</span>
796
+ <span class="ruby-identifier">nodes</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">info</span><span class="ruby-operator">|</span>
797
+ <span class="ruby-keyword">yield</span>(<span class="ruby-identifier">node_provider</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">info</span>)
798
+ <span class="ruby-keyword">end</span>
799
+ <span class="ruby-keyword">end</span>
800
+ <span class="ruby-keyword">end</span>
801
+ <span class="ruby-keyword">end</span></pre>
802
+ </div><!-- each_node_config-source -->
803
+
804
+ </div>
805
+
806
+
807
+
808
+
809
+ </div><!-- each_node_config-method -->
810
+
811
+
812
+ <div id="method-i-has_nodes-3F" class="method-detail ">
813
+
814
+ <div class="method-heading">
815
+ <span class="method-name">has_nodes?</span><span
816
+ class="method-args">(provider = nil)</span>
817
+ <span class="method-click-advice">click to toggle source</span>
818
+ </div>
819
+
820
+
821
+ <div class="method-description">
822
+
823
+
824
+
825
+
826
+
827
+ <div class="method-source-code" id="has_nodes-3F-source">
828
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 38</span>
829
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">has_nodes?</span>(<span class="ruby-identifier">provider</span> = <span class="ruby-keyword">nil</span>)
830
+ <span class="ruby-identifier">node_config</span>(<span class="ruby-identifier">provider</span>).<span class="ruby-identifier">export</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">?</span> <span class="ruby-keyword">false</span> <span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>
831
+ <span class="ruby-keyword">end</span></pre>
832
+ </div><!-- has_nodes-3F-source -->
833
+
834
+ </div>
835
+
836
+
837
+
838
+
839
+ </div><!-- has_nodes-3F-method -->
840
+
841
+
842
+ <div id="method-i-hiera_override_dir" class="method-detail ">
843
+
844
+ <div class="method-heading">
845
+ <span class="method-name">hiera_override_dir</span><span
846
+ class="method-args">()</span>
847
+ <span class="method-click-advice">click to toggle source</span>
848
+ </div>
849
+
850
+
851
+ <div class="method-description">
852
+
853
+
854
+
855
+
856
+
857
+ <div class="method-source-code" id="hiera_override_dir-source">
858
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 61</span>
859
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">hiera_override_dir</span>
860
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">directory</span>, <span class="ruby-string">&#39;config&#39;</span>)
861
+ <span class="ruby-keyword">end</span></pre>
862
+ </div><!-- hiera_override_dir-source -->
863
+
864
+ </div>
865
+
866
+
867
+
868
+
869
+ </div><!-- hiera_override_dir-method -->
870
+
871
+
872
+ <div id="method-i-hiera_var" class="method-detail ">
873
+
874
+ <div class="method-heading">
875
+ <span class="method-name">hiera_var</span><span
876
+ class="method-args">()</span>
877
+ <span class="method-click-advice">click to toggle source</span>
878
+ </div>
879
+
880
+
881
+ <div class="method-description">
882
+
883
+
884
+
885
+
886
+
887
+ <div class="method-source-code" id="hiera_var-source">
888
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 51</span>
889
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">hiera_var</span>
890
+ <span class="ruby-ivar">@hiera</span>
891
+ <span class="ruby-keyword">end</span></pre>
892
+ </div><!-- hiera_var-source -->
893
+
894
+ </div>
895
+
896
+
897
+
898
+
899
+ </div><!-- hiera_var-method -->
900
+
901
+
902
+ <div id="method-i-hiera_var-3D" class="method-detail ">
903
+
904
+ <div class="method-heading">
905
+ <span class="method-name">hiera_var=</span><span
906
+ class="method-args">(hiera)</span>
907
+ <span class="method-click-advice">click to toggle source</span>
908
+ </div>
909
+
910
+
911
+ <div class="method-description">
912
+
913
+
914
+
915
+
916
+
917
+ <div class="method-source-code" id="hiera_var-3D-source">
918
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 55</span>
919
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">hiera_var=</span><span class="ruby-identifier">hiera</span>
920
+ <span class="ruby-ivar">@hiera</span> = <span class="ruby-identifier">hiera</span>
921
+ <span class="ruby-keyword">end</span></pre>
922
+ </div><!-- hiera_var-3D-source -->
923
+
924
+ </div>
925
+
926
+
927
+
928
+
929
+ </div><!-- hiera_var-3D-method -->
930
+
931
+
932
+ <div id="method-i-home" class="method-detail ">
933
+
934
+ <div class="method-heading">
935
+ <span class="method-name">home</span><span
936
+ class="method-args">()</span>
937
+ <span class="method-click-advice">click to toggle source</span>
938
+ </div>
939
+
940
+
941
+ <div class="method-description">
942
+
943
+
944
+
945
+
946
+
947
+ <div class="method-source-code" id="home-source">
948
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 67</span>
949
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">home</span>
950
+ <span class="ruby-identifier">extension_set</span>(<span class="ruby-value">:home</span>, ( <span class="ruby-constant">ENV</span>[<span class="ruby-string">&#39;USER&#39;</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&#39;root&#39;</span> <span class="ruby-operator">?</span> <span class="ruby-string">&#39;/root&#39;</span> <span class="ruby-operator">:</span> <span class="ruby-constant">ENV</span>[<span class="ruby-string">&#39;HOME&#39;</span>] ))
951
+ <span class="ruby-keyword">end</span></pre>
952
+ </div><!-- home-source -->
953
+
954
+ </div>
955
+
956
+
957
+
958
+
959
+ </div><!-- home-method -->
960
+
961
+
962
+ <div id="method-i-ignore" class="method-detail ">
963
+
964
+ <div class="method-heading">
965
+ <span class="method-name">ignore</span><span
966
+ class="method-args">(files)</span>
967
+ <span class="method-click-advice">click to toggle source</span>
968
+ </div>
969
+
970
+
971
+ <div class="method-description">
972
+
973
+
974
+
975
+
976
+
977
+ <div class="method-source-code" id="ignore-source">
978
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 96</span>
979
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">ignore</span>(<span class="ruby-identifier">files</span>)
980
+ <span class="ruby-identifier">config</span>.<span class="ruby-identifier">ignore</span>(<span class="ruby-identifier">files</span>)
981
+ <span class="ruby-keyword">end</span></pre>
982
+ </div><!-- ignore-source -->
983
+
984
+ </div>
985
+
986
+
987
+
988
+
989
+ </div><!-- ignore-method -->
990
+
991
+
992
+ <div id="method-i-init_node" class="method-detail ">
993
+
994
+ <div class="method-heading">
995
+ <span class="method-name">init_node</span><span
996
+ class="method-args">(node, options = {}) { |"bootstrap_| ... }</span>
997
+ <span class="method-click-advice">click to toggle source</span>
998
+ </div>
999
+
1000
+
1001
+ <div class="method-description">
1002
+
1003
+
1004
+
1005
+
1006
+
1007
+ <div class="method-source-code" id="init_node-source">
1008
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 318</span>
1009
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">init_node</span>(<span class="ruby-identifier">node</span>, <span class="ruby-identifier">options</span> = {})
1010
+ <span class="ruby-identifier">config</span> = <span class="ruby-constant">Config</span>.<span class="ruby-identifier">ensure</span>(<span class="ruby-identifier">options</span>)
1011
+ <span class="ruby-identifier">success</span> = <span class="ruby-keyword">true</span>
1012
+
1013
+ <span class="ruby-identifier">bootstrap_requested</span> = <span class="ruby-identifier">config</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-value">:bootstrap</span>)
1014
+ <span class="ruby-identifier">bootstrap</span> = <span class="ruby-identifier">config</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:bootstrap</span>, <span class="ruby-keyword">false</span>)
1015
+
1016
+ <span class="ruby-identifier">seed_requested</span> = <span class="ruby-identifier">config</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-value">:seed</span>)
1017
+ <span class="ruby-identifier">seed</span> = <span class="ruby-identifier">config</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:seed</span>, <span class="ruby-keyword">false</span>)
1018
+
1019
+ <span class="ruby-keyword">unless</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">cache_setting</span>(<span class="ruby-value">:initialized</span>)
1020
+ <span class="ruby-identifier">bootstrap</span> = <span class="ruby-keyword">true</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">bootstrap_requested</span>
1021
+ <span class="ruby-identifier">seed</span> = <span class="ruby-keyword">true</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">seed_requested</span>
1022
+ <span class="ruby-keyword">end</span>
1023
+
1024
+ <span class="ruby-identifier">provision</span> = <span class="ruby-identifier">config</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:provision</span>, <span class="ruby-keyword">true</span>)
1025
+
1026
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">bootstrap</span>
1027
+ <span class="ruby-comment"># Bootstrap machine</span>
1028
+ <span class="ruby-identifier">success</span> = <span class="ruby-identifier">node</span>.<span class="ruby-identifier">bootstrap</span>(<span class="ruby-identifier">home</span>, <span class="ruby-identifier">extended_config</span>(<span class="ruby-value">:bootstrap</span>, <span class="ruby-identifier">config</span>)) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">op</span>, <span class="ruby-identifier">data</span><span class="ruby-operator">|</span>
1029
+ <span class="ruby-identifier">block_given?</span> <span class="ruby-operator">?</span> <span class="ruby-keyword">yield</span>(<span class="ruby-node">&quot;bootstrap_#{op}&quot;</span>.<span class="ruby-identifier">to_sym</span>, <span class="ruby-identifier">data</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">data</span>
1030
+ <span class="ruby-keyword">end</span>
1031
+ <span class="ruby-keyword">end</span>
1032
+
1033
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">success</span>
1034
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">seed</span>
1035
+ <span class="ruby-identifier">seed_project</span> = <span class="ruby-identifier">config</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value">:project_reference</span>, <span class="ruby-keyword">nil</span>)
1036
+ <span class="ruby-identifier">save_config</span> = { <span class="ruby-value">:commit</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>, <span class="ruby-value">:remote</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">remote_name</span>, <span class="ruby-value">:push</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span> }
1037
+
1038
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">seed_project</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">remote_name</span>
1039
+ <span class="ruby-comment"># Reset project remote</span>
1040
+ <span class="ruby-identifier">seed_info</span> = <span class="ruby-constant">Plugin</span><span class="ruby-operator">::</span><span class="ruby-constant">Project</span>.<span class="ruby-identifier">translate_reference</span>(<span class="ruby-identifier">seed_project</span>)
1041
+
1042
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">seed_info</span>
1043
+ <span class="ruby-identifier">seed_url</span> = <span class="ruby-identifier">seed_info</span>[<span class="ruby-value">:url</span>]
1044
+ <span class="ruby-identifier">seed_branch</span> = <span class="ruby-identifier">seed_info</span>[<span class="ruby-value">:revision</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">seed_info</span>[<span class="ruby-value">:revision</span>]
1045
+ <span class="ruby-keyword">else</span>
1046
+ <span class="ruby-identifier">seed_url</span> = <span class="ruby-identifier">seed_project</span>
1047
+ <span class="ruby-keyword">end</span>
1048
+ <span class="ruby-identifier">set_remote</span>(<span class="ruby-value">:origin</span>, <span class="ruby-identifier">seed_url</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">remote_name</span>.<span class="ruby-identifier">to_sym</span> <span class="ruby-operator">==</span> <span class="ruby-value">:edit</span>
1049
+ <span class="ruby-identifier">set_remote</span>(<span class="ruby-identifier">remote_name</span>, <span class="ruby-identifier">seed_url</span>)
1050
+ <span class="ruby-identifier">save_config</span>[<span class="ruby-value">:pull</span>] = <span class="ruby-keyword">false</span>
1051
+ <span class="ruby-keyword">end</span>
1052
+
1053
+ <span class="ruby-comment"># Save network changes (preliminary)</span>
1054
+ <span class="ruby-identifier">success</span> = <span class="ruby-identifier">node</span>.<span class="ruby-identifier">save</span>(<span class="ruby-identifier">extended_config</span>(<span class="ruby-value">:node_save</span>, <span class="ruby-identifier">save_config</span>))
1055
+
1056
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">success</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">seed_project</span>
1057
+ <span class="ruby-comment"># Seed machine with remote project reference</span>
1058
+ <span class="ruby-identifier">result</span> = <span class="ruby-identifier">node</span>.<span class="ruby-identifier">node_seed</span>({
1059
+ <span class="ruby-value">:project_reference</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">seed_project</span>,
1060
+ <span class="ruby-value">:project_branch</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">seed_branch</span>
1061
+ }) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">op</span>, <span class="ruby-identifier">data</span><span class="ruby-operator">|</span>
1062
+ <span class="ruby-keyword">yield</span>(<span class="ruby-node">&quot;seed_#{op}&quot;</span>.<span class="ruby-identifier">to_sym</span>, <span class="ruby-identifier">data</span>)
1063
+ <span class="ruby-keyword">end</span>
1064
+ <span class="ruby-identifier">success</span> = <span class="ruby-identifier">result</span>.<span class="ruby-identifier">status</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">code</span>.<span class="ruby-identifier">success</span>
1065
+ <span class="ruby-keyword">end</span>
1066
+ <span class="ruby-keyword">end</span>
1067
+
1068
+ <span class="ruby-identifier">node</span>.<span class="ruby-identifier">set_cache_setting</span>(<span class="ruby-value">:initialized</span>, <span class="ruby-keyword">true</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">success</span>
1069
+
1070
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">success</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">provision</span>
1071
+ <span class="ruby-comment"># Run configured provisioners on machine</span>
1072
+ <span class="ruby-identifier">result</span> = <span class="ruby-identifier">node</span>.<span class="ruby-identifier">node_provision</span>(<span class="ruby-identifier">config</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">op</span>, <span class="ruby-identifier">data</span><span class="ruby-operator">|</span>
1073
+ <span class="ruby-keyword">yield</span>(<span class="ruby-node">&quot;provision_#{op}&quot;</span>.<span class="ruby-identifier">to_sym</span>, <span class="ruby-identifier">data</span>)
1074
+ <span class="ruby-keyword">end</span>
1075
+ <span class="ruby-identifier">success</span> = <span class="ruby-identifier">result</span>.<span class="ruby-identifier">status</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">code</span>.<span class="ruby-identifier">success</span>
1076
+ <span class="ruby-keyword">end</span>
1077
+
1078
+ <span class="ruby-comment"># Update local network project</span>
1079
+ <span class="ruby-identifier">success</span> = <span class="ruby-identifier">load</span>({ <span class="ruby-value">:remote</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">remote_name</span>, <span class="ruby-value">:pull</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span> }) <span class="ruby-keyword">if</span> <span class="ruby-identifier">success</span>
1080
+ <span class="ruby-keyword">end</span>
1081
+ <span class="ruby-identifier">success</span>
1082
+ <span class="ruby-keyword">end</span></pre>
1083
+ </div><!-- init_node-source -->
1084
+
1085
+ </div>
1086
+
1087
+
1088
+
1089
+
1090
+ </div><!-- init_node-method -->
1091
+
1092
+
1093
+ <div id="method-i-key_cache_directory" class="method-detail ">
1094
+
1095
+ <div class="method-heading">
1096
+ <span class="method-name">key_cache_directory</span><span
1097
+ class="method-args">()</span>
1098
+ <span class="method-click-advice">click to toggle source</span>
1099
+ </div>
1100
+
1101
+
1102
+ <div class="method-description">
1103
+
1104
+
1105
+
1106
+
1107
+
1108
+ <div class="method-source-code" id="key_cache_directory-source">
1109
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 85</span>
1110
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">key_cache_directory</span>
1111
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">build_directory</span>, <span class="ruby-string">&#39;keys&#39;</span>)
1112
+ <span class="ruby-keyword">end</span></pre>
1113
+ </div><!-- key_cache_directory-source -->
1114
+
1115
+ </div>
1116
+
1117
+
1118
+
1119
+
1120
+ </div><!-- key_cache_directory-method -->
1121
+
1122
+
1123
+ <div id="method-i-load" class="method-detail ">
1124
+
1125
+ <div class="method-heading">
1126
+ <span class="method-name">load</span><span
1127
+ class="method-args">(options = {})</span>
1128
+ <span class="method-click-advice">click to toggle source</span>
1129
+ </div>
1130
+
1131
+
1132
+ <div class="method-description">
1133
+
1134
+
1135
+
1136
+
1137
+
1138
+ <div class="method-source-code" id="load-source">
1139
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 226</span>
1140
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">load</span>(<span class="ruby-identifier">options</span> = {})
1141
+ <span class="ruby-identifier">config</span>.<span class="ruby-identifier">load</span>(<span class="ruby-identifier">options</span>)
1142
+ <span class="ruby-keyword">end</span></pre>
1143
+ </div><!-- load-source -->
1144
+
1145
+ </div>
1146
+
1147
+
1148
+
1149
+
1150
+ </div><!-- load-method -->
1151
+
1152
+
1153
+ <div id="method-i-local_node" class="method-detail ">
1154
+
1155
+ <div class="method-heading">
1156
+ <span class="method-name">local_node</span><span
1157
+ class="method-args">(require_new = false)</span>
1158
+ <span class="method-click-advice">click to toggle source</span>
1159
+ </div>
1160
+
1161
+
1162
+ <div class="method-description">
1163
+
1164
+
1165
+
1166
+
1167
+
1168
+ <div class="method-source-code" id="local_node-source">
1169
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 182</span>
1170
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">local_node</span>(<span class="ruby-identifier">require_new</span> = <span class="ruby-keyword">false</span>)
1171
+ <span class="ruby-identifier">ip_address</span> = <span class="ruby-constant">CORL</span>.<span class="ruby-identifier">public_ip</span>
1172
+ <span class="ruby-identifier">local_node</span> = <span class="ruby-identifier">node_by_ip</span>(<span class="ruby-identifier">ip_address</span>, <span class="ruby-identifier">require_new</span>)
1173
+
1174
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">local_node</span>.<span class="ruby-identifier">nil?</span>
1175
+ <span class="ruby-identifier">name</span> = <span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Data</span>.<span class="ruby-identifier">ensure_value</span>(<span class="ruby-identifier">lookup</span>(<span class="ruby-value">:fqdn</span>), <span class="ruby-identifier">ip_address</span>)
1176
+ <span class="ruby-identifier">local_node</span> = <span class="ruby-constant">CORL</span>.<span class="ruby-identifier">node</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">extended_config</span>(<span class="ruby-value">:local_node</span>).<span class="ruby-identifier">import</span>({ <span class="ruby-value">:meta</span> =<span class="ruby-operator">&gt;</span> { <span class="ruby-value">:parent</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">myself</span> }}), <span class="ruby-value">:local</span>)
1177
+ <span class="ruby-keyword">else</span>
1178
+ <span class="ruby-identifier">local_node</span>.<span class="ruby-identifier">network</span> = <span class="ruby-identifier">myself</span>
1179
+ <span class="ruby-identifier">local_node</span>.<span class="ruby-identifier">normalize</span>(<span class="ruby-keyword">true</span>)
1180
+ <span class="ruby-identifier">local_node</span>.<span class="ruby-identifier">localize</span>
1181
+ <span class="ruby-keyword">end</span>
1182
+ <span class="ruby-identifier">local_node</span>
1183
+ <span class="ruby-keyword">end</span></pre>
1184
+ </div><!-- local_node-source -->
1185
+
1186
+ </div>
1187
+
1188
+
1189
+
1190
+
1191
+ </div><!-- local_node-method -->
1192
+
1193
+
1194
+ <div id="method-i-node_by_ip" class="method-detail ">
1195
+
1196
+ <div class="method-heading">
1197
+ <span class="method-name">node_by_ip</span><span
1198
+ class="method-args">(public_ip, require_new = false)</span>
1199
+ <span class="method-click-advice">click to toggle source</span>
1200
+ </div>
1201
+
1202
+
1203
+ <div class="method-description">
1204
+
1205
+
1206
+
1207
+
1208
+
1209
+ <div class="method-source-code" id="node_by_ip-source">
1210
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 173</span>
1211
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">node_by_ip</span>(<span class="ruby-identifier">public_ip</span>, <span class="ruby-identifier">require_new</span> = <span class="ruby-keyword">false</span>)
1212
+ <span class="ruby-identifier">each_node_config</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">provider</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">info</span><span class="ruby-operator">|</span>
1213
+ <span class="ruby-keyword">return</span> <span class="ruby-identifier">node</span>(<span class="ruby-identifier">provider</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">require_new</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">info</span>[<span class="ruby-value">:public_ip</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">public_ip</span>
1214
+ <span class="ruby-keyword">end</span>
1215
+ <span class="ruby-keyword">nil</span>
1216
+ <span class="ruby-keyword">end</span></pre>
1217
+ </div><!-- node_by_ip-source -->
1218
+
1219
+ </div>
1220
+
1221
+
1222
+
1223
+
1224
+ </div><!-- node_by_ip-method -->
1225
+
1226
+
1227
+ <div id="method-i-node_groups" class="method-detail ">
1228
+
1229
+ <div class="method-heading">
1230
+ <span class="method-name">node_groups</span><span
1231
+ class="method-args">()</span>
1232
+ <span class="method-click-advice">click to toggle source</span>
1233
+ </div>
1234
+
1235
+
1236
+ <div class="method-description">
1237
+
1238
+
1239
+
1240
+
1241
+
1242
+ <div class="method-source-code" id="node_groups-source">
1243
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 112</span>
1244
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">node_groups</span>
1245
+ <span class="ruby-identifier">groups</span> = {}
1246
+
1247
+ <span class="ruby-identifier">each_node_config</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">provider</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">info</span><span class="ruby-operator">|</span>
1248
+ <span class="ruby-identifier">search_node</span>(<span class="ruby-identifier">provider</span>, <span class="ruby-identifier">name</span>, <span class="ruby-value">:settings</span>, [], <span class="ruby-value">:array</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">group</span><span class="ruby-operator">|</span>
1249
+ <span class="ruby-identifier">group</span> = <span class="ruby-identifier">group</span>.<span class="ruby-identifier">to_sym</span>
1250
+ <span class="ruby-identifier">groups</span>[<span class="ruby-identifier">group</span>] = [] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">group</span>)
1251
+ <span class="ruby-identifier">groups</span>[<span class="ruby-identifier">group</span>] <span class="ruby-operator">&lt;&lt;</span> { <span class="ruby-value">:provider</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">provider</span>, <span class="ruby-value">:name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">name</span> }
1252
+ <span class="ruby-keyword">end</span>
1253
+ <span class="ruby-keyword">end</span>
1254
+ <span class="ruby-identifier">groups</span>
1255
+ <span class="ruby-keyword">end</span></pre>
1256
+ </div><!-- node_groups-source -->
1257
+
1258
+ </div>
1259
+
1260
+
1261
+
1262
+
1263
+ </div><!-- node_groups-method -->
1264
+
1265
+
1266
+ <div id="method-i-node_info" class="method-detail ">
1267
+
1268
+ <div class="method-heading">
1269
+ <span class="method-name">node_info</span><span
1270
+ class="method-args">(references, default_provider = nil)</span>
1271
+ <span class="method-click-advice">click to toggle source</span>
1272
+ </div>
1273
+
1274
+
1275
+ <div class="method-description">
1276
+
1277
+
1278
+
1279
+
1280
+
1281
+ <div class="method-source-code" id="node_info-source">
1282
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 127</span>
1283
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">node_info</span>(<span class="ruby-identifier">references</span>, <span class="ruby-identifier">default_provider</span> = <span class="ruby-keyword">nil</span>)
1284
+ <span class="ruby-identifier">groups</span> = <span class="ruby-identifier">node_groups</span>
1285
+ <span class="ruby-identifier">node_info</span> = {}
1286
+
1287
+ <span class="ruby-identifier">default_provider</span> = <span class="ruby-constant">Manager</span>.<span class="ruby-identifier">connection</span>.<span class="ruby-identifier">type_default</span>(<span class="ruby-value">:node</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">default_provider</span>.<span class="ruby-identifier">nil?</span>
1288
+
1289
+ <span class="ruby-identifier">references</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">reference</span><span class="ruby-operator">|</span>
1290
+ <span class="ruby-identifier">info</span> = <span class="ruby-constant">Plugin</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">translate_reference</span>(<span class="ruby-identifier">reference</span>)
1291
+ <span class="ruby-identifier">info</span> = { <span class="ruby-value">:provider</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">default_provider</span>, <span class="ruby-value">:name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">reference</span> } <span class="ruby-keyword">unless</span> <span class="ruby-identifier">info</span>
1292
+ <span class="ruby-identifier">name</span> = <span class="ruby-identifier">info</span>[<span class="ruby-value">:name</span>].<span class="ruby-identifier">to_sym</span>
1293
+
1294
+ <span class="ruby-comment"># Check for group membership</span>
1295
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">name</span>)
1296
+ <span class="ruby-identifier">groups</span>[<span class="ruby-identifier">name</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">member_info</span><span class="ruby-operator">|</span>
1297
+ <span class="ruby-identifier">provider</span> = <span class="ruby-identifier">member_info</span>[<span class="ruby-value">:provider</span>].<span class="ruby-identifier">to_sym</span>
1298
+
1299
+ <span class="ruby-identifier">node_info</span>[<span class="ruby-identifier">provider</span>] = [] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">node_info</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">provider</span>)
1300
+ <span class="ruby-identifier">node_info</span>[<span class="ruby-identifier">provider</span>] <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">member_info</span>[<span class="ruby-value">:name</span>]
1301
+ <span class="ruby-keyword">end</span>
1302
+ <span class="ruby-keyword">else</span>
1303
+ <span class="ruby-comment"># Not a group</span>
1304
+ <span class="ruby-identifier">provider</span> = <span class="ruby-identifier">info</span>[<span class="ruby-value">:provider</span>].<span class="ruby-identifier">to_sym</span>
1305
+
1306
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">node_config</span>.<span class="ruby-identifier">export</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">provider</span>)
1307
+ <span class="ruby-identifier">node_found</span> = <span class="ruby-keyword">false</span>
1308
+
1309
+ <span class="ruby-identifier">each_node_config</span>(<span class="ruby-identifier">provider</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">node_provider</span>, <span class="ruby-identifier">node_name</span>, <span class="ruby-identifier">node</span><span class="ruby-operator">|</span>
1310
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">node_name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">name</span>
1311
+ <span class="ruby-identifier">node_info</span>[<span class="ruby-identifier">node_provider</span>] = [] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">node_info</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">node_provider</span>)
1312
+ <span class="ruby-identifier">node_info</span>[<span class="ruby-identifier">node_provider</span>] <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">node_name</span>
1313
+ <span class="ruby-identifier">node_found</span> = <span class="ruby-keyword">true</span>
1314
+ <span class="ruby-keyword">break</span>
1315
+ <span class="ruby-keyword">end</span>
1316
+ <span class="ruby-keyword">end</span>
1317
+
1318
+ <span class="ruby-keyword">unless</span> <span class="ruby-identifier">node_found</span>
1319
+ <span class="ruby-comment"># TODO: Error or something?</span>
1320
+ <span class="ruby-keyword">end</span>
1321
+ <span class="ruby-keyword">end</span>
1322
+ <span class="ruby-keyword">end</span>
1323
+ <span class="ruby-keyword">end</span>
1324
+ <span class="ruby-identifier">node_info</span>
1325
+ <span class="ruby-keyword">end</span></pre>
1326
+ </div><!-- node_info-source -->
1327
+
1328
+ </div>
1329
+
1330
+
1331
+
1332
+
1333
+ </div><!-- node_info-method -->
1334
+
1335
+
1336
+ <div id="method-i-nodes_by_reference" class="method-detail ">
1337
+
1338
+ <div class="method-heading">
1339
+ <span class="method-name">nodes_by_reference</span><span
1340
+ class="method-args">(references, default_provider = nil, require_new = false)</span>
1341
+ <span class="method-click-advice">click to toggle source</span>
1342
+ </div>
1343
+
1344
+
1345
+ <div class="method-description">
1346
+
1347
+
1348
+
1349
+
1350
+
1351
+ <div class="method-source-code" id="nodes_by_reference-source">
1352
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 199</span>
1353
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">nodes_by_reference</span>(<span class="ruby-identifier">references</span>, <span class="ruby-identifier">default_provider</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">require_new</span> = <span class="ruby-keyword">false</span>)
1354
+ <span class="ruby-identifier">nodes</span> = []
1355
+
1356
+ <span class="ruby-identifier">node_info</span>(<span class="ruby-identifier">references</span>, <span class="ruby-identifier">default_provider</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">provider</span>, <span class="ruby-identifier">names</span><span class="ruby-operator">|</span>
1357
+ <span class="ruby-identifier">names</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
1358
+ <span class="ruby-identifier">nodes</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">node</span>(<span class="ruby-identifier">provider</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">require_new</span>)
1359
+ <span class="ruby-keyword">end</span>
1360
+ <span class="ruby-keyword">end</span>
1361
+ <span class="ruby-identifier">nodes</span>
1362
+ <span class="ruby-keyword">end</span></pre>
1363
+ </div><!-- nodes_by_reference-source -->
1364
+
1365
+ </div>
1366
+
1367
+
1368
+
1369
+
1370
+ </div><!-- nodes_by_reference-method -->
1371
+
1372
+
1373
+ <div id="method-i-normalize" class="method-detail ">
1374
+
1375
+ <div class="method-heading">
1376
+ <span class="method-name">normalize</span><span
1377
+ class="method-args">(reload)</span>
1378
+ <span class="method-click-advice">click to toggle source</span>
1379
+ </div>
1380
+
1381
+
1382
+ <div class="method-description">
1383
+
1384
+
1385
+
1386
+
1387
+
1388
+ <div class="method-source-code" id="normalize-source">
1389
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 11</span>
1390
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">normalize</span>(<span class="ruby-identifier">reload</span>)
1391
+ <span class="ruby-keyword">super</span>
1392
+
1393
+ <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">&quot;Initializing network: reloading? #{reload}&quot;</span>)
1394
+ <span class="ruby-identifier">myself</span>.<span class="ruby-identifier">config</span> = <span class="ruby-constant">CORL</span>.<span class="ruby-identifier">configuration</span>(<span class="ruby-constant">Config</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">myself</span>.<span class="ruby-identifier">_export</span>).<span class="ruby-identifier">import</span>({ <span class="ruby-value">:autosave</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">false</span>, <span class="ruby-value">:create</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">false</span> })) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">reload</span>
1395
+
1396
+ <span class="ruby-identifier">config</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:directory</span>) <span class="ruby-comment"># TODO: Figure out what to do with this??</span>
1397
+
1398
+ <span class="ruby-keyword">unless</span> <span class="ruby-identifier">reload</span>
1399
+ <span class="ruby-ivar">@build</span> = <span class="ruby-constant">Build</span>.<span class="ruby-identifier">new</span>
1400
+ <span class="ruby-identifier">ignore</span>([ <span class="ruby-string">&#39;build&#39;</span>, <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&#39;config&#39;</span>, <span class="ruby-string">&#39;identities&#39;</span>) ])
1401
+ <span class="ruby-keyword">end</span>
1402
+ <span class="ruby-keyword">end</span></pre>
1403
+ </div><!-- normalize-source -->
1404
+
1405
+ </div>
1406
+
1407
+
1408
+
1409
+
1410
+ </div><!-- normalize-method -->
1411
+
1412
+
1413
+ <div id="method-i-remote" class="method-detail ">
1414
+
1415
+ <div class="method-heading">
1416
+ <span class="method-name">remote</span><span
1417
+ class="method-args">(name)</span>
1418
+ <span class="method-click-advice">click to toggle source</span>
1419
+ </div>
1420
+
1421
+
1422
+ <div class="method-description">
1423
+
1424
+
1425
+
1426
+
1427
+
1428
+ <div class="method-source-code" id="remote-source">
1429
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 102</span>
1430
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">remote</span>(<span class="ruby-identifier">name</span>)
1431
+ <span class="ruby-identifier">config</span>.<span class="ruby-identifier">remote</span>(<span class="ruby-identifier">name</span>)
1432
+ <span class="ruby-keyword">end</span></pre>
1433
+ </div><!-- remote-source -->
1434
+
1435
+ </div>
1436
+
1437
+
1438
+
1439
+
1440
+ </div><!-- remote-method -->
1441
+
1442
+
1443
+ <div id="method-i-remove_plugin" class="method-detail ">
1444
+
1445
+ <div class="method-heading">
1446
+ <span class="method-name">remove_plugin</span><span
1447
+ class="method-args">()</span>
1448
+ <span class="method-click-advice">click to toggle source</span>
1449
+ </div>
1450
+
1451
+
1452
+ <div class="method-description">
1453
+
1454
+
1455
+
1456
+
1457
+
1458
+ <div class="method-source-code" id="remove_plugin-source">
1459
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 27</span>
1460
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">remove_plugin</span>
1461
+ <span class="ruby-constant">CORL</span>.<span class="ruby-identifier">remove_plugin</span>(<span class="ruby-identifier">config</span>)
1462
+
1463
+ <span class="ruby-identifier">each_plugin</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">type</span>, <span class="ruby-identifier">provider</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">plugin</span><span class="ruby-operator">|</span>
1464
+ <span class="ruby-constant">CORL</span>.<span class="ruby-identifier">remove_plugin</span>(<span class="ruby-identifier">plugin</span>)
1465
+ <span class="ruby-keyword">end</span>
1466
+ <span class="ruby-keyword">end</span></pre>
1467
+ </div><!-- remove_plugin-source -->
1468
+
1469
+ </div>
1470
+
1471
+
1472
+
1473
+
1474
+ </div><!-- remove_plugin-method -->
1475
+
1476
+
1477
+ <div id="method-i-save" class="method-detail ">
1478
+
1479
+ <div class="method-heading">
1480
+ <span class="method-name">save</span><span
1481
+ class="method-args">(options = {})</span>
1482
+ <span class="method-click-advice">click to toggle source</span>
1483
+ </div>
1484
+
1485
+
1486
+ <div class="method-description">
1487
+
1488
+
1489
+
1490
+
1491
+
1492
+ <div class="method-source-code" id="save-source">
1493
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 232</span>
1494
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">save</span>(<span class="ruby-identifier">options</span> = {})
1495
+ <span class="ruby-identifier">config</span>.<span class="ruby-identifier">save</span>(<span class="ruby-identifier">options</span>)
1496
+ <span class="ruby-keyword">end</span></pre>
1497
+ </div><!-- save-source -->
1498
+
1499
+ </div>
1500
+
1501
+
1502
+
1503
+
1504
+ </div><!-- save-method -->
1505
+
1506
+
1507
+ <div id="method-i-set_remote" class="method-detail ">
1508
+
1509
+ <div class="method-heading">
1510
+ <span class="method-name">set_remote</span><span
1511
+ class="method-args">(name, location)</span>
1512
+ <span class="method-click-advice">click to toggle source</span>
1513
+ </div>
1514
+
1515
+
1516
+ <div class="method-description">
1517
+
1518
+
1519
+
1520
+
1521
+
1522
+ <div class="method-source-code" id="set_remote-source">
1523
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 106</span>
1524
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">set_remote</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">location</span>)
1525
+ <span class="ruby-identifier">config</span>.<span class="ruby-identifier">set_remote</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">location</span>)
1526
+ <span class="ruby-keyword">end</span></pre>
1527
+ </div><!-- set_remote-source -->
1528
+
1529
+ </div>
1530
+
1531
+
1532
+
1533
+
1534
+ </div><!-- set_remote-method -->
1535
+
1536
+
1537
+ <div id="method-i-test_node" class="method-detail ">
1538
+
1539
+ <div class="method-heading">
1540
+ <span class="method-name">test_node</span><span
1541
+ class="method-args">(provider, options = {})</span>
1542
+ <span class="method-click-advice">click to toggle source</span>
1543
+ </div>
1544
+
1545
+
1546
+ <div class="method-description">
1547
+
1548
+
1549
+
1550
+
1551
+
1552
+ <div class="method-source-code" id="test_node-source">
1553
+ <pre><span class="ruby-comment"># File lib/core/plugin/network.rb, line 212</span>
1554
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">test_node</span>(<span class="ruby-identifier">provider</span>, <span class="ruby-identifier">options</span> = {})
1555
+ <span class="ruby-identifier">config</span> = <span class="ruby-constant">Config</span>.<span class="ruby-identifier">ensure</span>(<span class="ruby-identifier">options</span>).<span class="ruby-identifier">import</span>({ <span class="ruby-value">:meta</span> =<span class="ruby-operator">&gt;</span> { <span class="ruby-value">:parent</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">myself</span> } })
1556
+ <span class="ruby-constant">CORL</span>.<span class="ruby-identifier">node</span>(<span class="ruby-value">:test</span>, <span class="ruby-identifier">config</span>.<span class="ruby-identifier">export</span>, <span class="ruby-identifier">provider</span>)
1557
+ <span class="ruby-keyword">end</span></pre>
1558
+ </div><!-- test_node-source -->
1559
+
1560
+ </div>
1561
+
1562
+
1563
+
1564
+
1565
+ </div><!-- test_node-method -->
1566
+
1567
+
1568
+ </section><!-- public-instance-method-details -->
1569
+
1570
+ </section><!-- 5Buntitled-5D -->
1571
+
1572
+ </div><!-- documentation -->
1573
+
1574
+
1575
+ <footer id="validator-badges">
1576
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
1577
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.2.
1578
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
1579
+ </footer>
1580
+