corl 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (511) hide show
  1. checksums.yaml +7 -7
  2. data/.gitignore +51 -0
  3. data/Gemfile +6 -11
  4. data/Gemfile.lock +122 -147
  5. data/Rakefile +22 -21
  6. data/TODO.rdoc +12 -0
  7. data/VERSION +1 -1
  8. data/bin/corl +15 -21
  9. data/bootstrap/bootstrap.sh +50 -16
  10. data/bootstrap/lib/shell/os.sh +2 -2
  11. data/bootstrap/os/ubuntu/00_base.sh +11 -4
  12. data/bootstrap/os/ubuntu/01_git.sh +6 -3
  13. data/bootstrap/os/ubuntu/{02-editor.sh → 02_editor.sh} +8 -2
  14. data/bootstrap/os/ubuntu/05_ruby.sh +63 -15
  15. data/bootstrap/os/ubuntu/06_puppet.sh +9 -4
  16. data/bootstrap/os/ubuntu/09_nucleon.sh +25 -9
  17. data/bootstrap/os/ubuntu/10_corl.sh +24 -10
  18. data/corl.gemspec +27 -502
  19. data/lib/CORL/configuration/file.rb +112 -112
  20. data/lib/CORL/machine/rackspace.rb +18 -17
  21. data/lib/core/facade.rb +1 -1
  22. data/lib/core/plugin/agent.rb +141 -0
  23. data/lib/core/plugin/cloud_action.rb +67 -62
  24. data/lib/core/plugin/configuration.rb +71 -70
  25. data/lib/core/plugin/network.rb +163 -151
  26. data/lib/core/plugin/node.rb +457 -422
  27. data/lib/core/vagrant/commands/launcher.rb +13 -13
  28. data/lib/core/vagrant/provisioner/config.rb +1 -3
  29. data/lib/nucleon/action/node/bootstrap.rb +21 -16
  30. data/lib/nucleon/action/node/destroy.rb +13 -13
  31. data/lib/nucleon/action/node/seed.rb +62 -64
  32. data/lib/nucleon/action/node/status.rb +39 -32
  33. data/locales/en.yml +121 -116
  34. data/spec/spec_helper.rb +1 -4
  35. metadata +111 -641
  36. data/.document +0 -5
  37. data/lib/core/mod/fog_rackspace_server.rb +0 -29
  38. data/lib/core/vagrant/Vagrantfile +0 -10
  39. data/lib/nucleon/action/plugin/template/nucleon.action.erb +0 -56
  40. data/rdoc/site/0.4.29/CORL/Action/Authorize.html +0 -485
  41. data/rdoc/site/0.4.29/CORL/Action/Bootstrap.html +0 -546
  42. data/rdoc/site/0.4.29/CORL/Action/Build.html +0 -396
  43. data/rdoc/site/0.4.29/CORL/Action/Destroy.html +0 -515
  44. data/rdoc/site/0.4.29/CORL/Action/Exec.html +0 -472
  45. data/rdoc/site/0.4.29/CORL/Action/Facts.html +0 -398
  46. data/rdoc/site/0.4.29/CORL/Action/Image.html +0 -515
  47. data/rdoc/site/0.4.29/CORL/Action/Images.html +0 -514
  48. data/rdoc/site/0.4.29/CORL/Action/Ip.html +0 -395
  49. data/rdoc/site/0.4.29/CORL/Action/Keypair.html +0 -494
  50. data/rdoc/site/0.4.29/CORL/Action/Lookup.html +0 -474
  51. data/rdoc/site/0.4.29/CORL/Action/Machines.html +0 -509
  52. data/rdoc/site/0.4.29/CORL/Action/Provision.html +0 -456
  53. data/rdoc/site/0.4.29/CORL/Action/Reboot.html +0 -515
  54. data/rdoc/site/0.4.29/CORL/Action/Regions.html +0 -509
  55. data/rdoc/site/0.4.29/CORL/Action/Revoke.html +0 -483
  56. data/rdoc/site/0.4.29/CORL/Action/Seed.html +0 -544
  57. data/rdoc/site/0.4.29/CORL/Action/Spawn.html +0 -616
  58. data/rdoc/site/0.4.29/CORL/Action/Ssh.html +0 -526
  59. data/rdoc/site/0.4.29/CORL/Action/Start.html +0 -515
  60. data/rdoc/site/0.4.29/CORL/Action/Stop.html +0 -515
  61. data/rdoc/site/0.4.29/CORL/Action/Vagrantfile.html +0 -457
  62. data/rdoc/site/0.4.29/CORL/Action.html +0 -360
  63. data/rdoc/site/0.4.29/CORL/Configuration/File.html +0 -1128
  64. data/rdoc/site/0.4.29/CORL/Configuration.html +0 -339
  65. data/rdoc/site/0.4.29/CORL/Errors.html +0 -339
  66. data/rdoc/site/0.4.29/CORL/Event/Puppet.html +0 -673
  67. data/rdoc/site/0.4.29/CORL/Event.html +0 -339
  68. data/rdoc/site/0.4.29/CORL/Facade.html +0 -742
  69. data/rdoc/site/0.4.29/CORL/Machine/Aws.html +0 -733
  70. data/rdoc/site/0.4.29/CORL/Machine/Fog.html +0 -1269
  71. data/rdoc/site/0.4.29/CORL/Machine/Physical.html +0 -1039
  72. data/rdoc/site/0.4.29/CORL/Machine/Rackspace.html +0 -514
  73. data/rdoc/site/0.4.29/CORL/Machine/Vagrant.html +0 -1300
  74. data/rdoc/site/0.4.29/CORL/Machine.html +0 -343
  75. data/rdoc/site/0.4.29/CORL/Mixin/Action/Keypair.html +0 -572
  76. data/rdoc/site/0.4.29/CORL/Mixin/Action.html +0 -339
  77. data/rdoc/site/0.4.29/CORL/Mixin/Lookup.html +0 -954
  78. data/rdoc/site/0.4.29/CORL/Mixin/Machine/SSH.html +0 -643
  79. data/rdoc/site/0.4.29/CORL/Mixin/Machine.html +0 -339
  80. data/rdoc/site/0.4.29/CORL/Mixin/Macro/NetworkSettings.html +0 -464
  81. data/rdoc/site/0.4.29/CORL/Mixin/Macro.html +0 -339
  82. data/rdoc/site/0.4.29/CORL/Mixin.html +0 -342
  83. data/rdoc/site/0.4.29/CORL/Network/Default.html +0 -391
  84. data/rdoc/site/0.4.29/CORL/Network.html +0 -339
  85. data/rdoc/site/0.4.29/CORL/Node/Aws.html +0 -716
  86. data/rdoc/site/0.4.29/CORL/Node/Fog.html +0 -1192
  87. data/rdoc/site/0.4.29/CORL/Node/Local.html +0 -424
  88. data/rdoc/site/0.4.29/CORL/Node/Rackspace.html +0 -709
  89. data/rdoc/site/0.4.29/CORL/Node/Vagrant.html +0 -1451
  90. data/rdoc/site/0.4.29/CORL/Node.html +0 -343
  91. data/rdoc/site/0.4.29/CORL/Plugin/CloudAction.html +0 -810
  92. data/rdoc/site/0.4.29/CORL/Plugin.html +0 -339
  93. data/rdoc/site/0.4.29/CORL/Provisioner/Puppetnode.html +0 -1095
  94. data/rdoc/site/0.4.29/CORL/Provisioner.html +0 -339
  95. data/rdoc/site/0.4.29/CORL/Template/Environment.html +0 -528
  96. data/rdoc/site/0.4.29/CORL/Template.html +0 -339
  97. data/rdoc/site/0.4.29/CORL/Util/Puppet/Resource.html +0 -1038
  98. data/rdoc/site/0.4.29/CORL/Util/Puppet/ResourceGroup.html +0 -920
  99. data/rdoc/site/0.4.29/CORL/Util/Puppet.html +0 -1087
  100. data/rdoc/site/0.4.29/CORL/Util.html +0 -341
  101. data/rdoc/site/0.4.29/CORL/Vagrant/Config.html +0 -896
  102. data/rdoc/site/0.4.29/CORL/Vagrant.html +0 -418
  103. data/rdoc/site/0.4.29/CORL.html +0 -465
  104. data/rdoc/site/0.4.29/Facter/Util/Loader.html +0 -396
  105. data/rdoc/site/0.4.29/Facter/Util.html +0 -339
  106. data/rdoc/site/0.4.29/Facter.html +0 -339
  107. data/rdoc/site/0.4.29/Fog/Compute/AWS/Server.html +0 -423
  108. data/rdoc/site/0.4.29/Fog/Compute/AWS.html +0 -345
  109. data/rdoc/site/0.4.29/Fog/Compute/RackspaceV2/Server.html +0 -408
  110. data/rdoc/site/0.4.29/Fog/Compute/RackspaceV2.html +0 -345
  111. data/rdoc/site/0.4.29/Fog/Compute.html +0 -340
  112. data/rdoc/site/0.4.29/Fog.html +0 -340
  113. data/rdoc/site/0.4.29/Hiera/Backend.html +0 -422
  114. data/rdoc/site/0.4.29/Hiera/Corl_logger.html +0 -449
  115. data/rdoc/site/0.4.29/Hiera.html +0 -346
  116. data/rdoc/site/0.4.29/Nucleon/Config.html +0 -357
  117. data/rdoc/site/0.4.29/Nucleon/Plugin/Base.html +0 -345
  118. data/rdoc/site/0.4.29/Nucleon/Plugin/Configuration.html +0 -1213
  119. data/rdoc/site/0.4.29/Nucleon/Plugin/Machine.html +0 -1279
  120. data/rdoc/site/0.4.29/Nucleon/Plugin/Network.html +0 -1425
  121. data/rdoc/site/0.4.29/Nucleon/Plugin/Node.html +0 -3715
  122. data/rdoc/site/0.4.29/Nucleon/Plugin/Provisioner.html +0 -1297
  123. data/rdoc/site/0.4.29/Nucleon/Plugin.html +0 -344
  124. data/rdoc/site/0.4.29/Nucleon.html +0 -344
  125. data/rdoc/site/0.4.29/Object.html +0 -358
  126. data/rdoc/site/0.4.29/Puppet/DataBinding/Corl.html +0 -345
  127. data/rdoc/site/0.4.29/Puppet/DataBinding.html +0 -338
  128. data/rdoc/site/0.4.29/Puppet/Indirector/Corl.html +0 -454
  129. data/rdoc/site/0.4.29/Puppet/Indirector.html +0 -338
  130. data/rdoc/site/0.4.29/Puppet/Parser/Functions.html +0 -480
  131. data/rdoc/site/0.4.29/Puppet/Parser.html +0 -338
  132. data/rdoc/site/0.4.29/Puppet.html +0 -338
  133. data/rdoc/site/0.4.29/README_rdoc.html +0 -340
  134. data/rdoc/site/0.4.29/Vagrant/Config/Loader.html +0 -399
  135. data/rdoc/site/0.4.29/Vagrant/Config.html +0 -339
  136. data/rdoc/site/0.4.29/Vagrant/Vagrantfile.html +0 -392
  137. data/rdoc/site/0.4.29/Vagrant.html +0 -346
  138. data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action/DeleteCache.html +0 -396
  139. data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action/InitKeys.html +0 -408
  140. data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action/LinkNetwork.html +0 -406
  141. data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action.html +0 -341
  142. data/rdoc/site/0.4.29/VagrantPlugins/CORL/BaseAction.html +0 -491
  143. data/rdoc/site/0.4.29/VagrantPlugins/CORL/Command/Launcher.html +0 -533
  144. data/rdoc/site/0.4.29/VagrantPlugins/CORL/Command.html +0 -339
  145. data/rdoc/site/0.4.29/VagrantPlugins/CORL/Config/CORL.html +0 -732
  146. data/rdoc/site/0.4.29/VagrantPlugins/CORL/Config.html +0 -339
  147. data/rdoc/site/0.4.29/VagrantPlugins/CORL/Plugin.html +0 -345
  148. data/rdoc/site/0.4.29/VagrantPlugins/CORL/Provisioner/CORL.html +0 -536
  149. data/rdoc/site/0.4.29/VagrantPlugins/CORL/Provisioner.html +0 -339
  150. data/rdoc/site/0.4.29/VagrantPlugins/CORL.html +0 -346
  151. data/rdoc/site/0.4.29/VagrantPlugins.html +0 -346
  152. data/rdoc/site/0.4.29/created.rid +0 -96
  153. data/rdoc/site/0.4.29/images/add.png +0 -0
  154. data/rdoc/site/0.4.29/images/brick.png +0 -0
  155. data/rdoc/site/0.4.29/images/brick_link.png +0 -0
  156. data/rdoc/site/0.4.29/images/bug.png +0 -0
  157. data/rdoc/site/0.4.29/images/bullet_black.png +0 -0
  158. data/rdoc/site/0.4.29/images/bullet_toggle_minus.png +0 -0
  159. data/rdoc/site/0.4.29/images/bullet_toggle_plus.png +0 -0
  160. data/rdoc/site/0.4.29/images/date.png +0 -0
  161. data/rdoc/site/0.4.29/images/delete.png +0 -0
  162. data/rdoc/site/0.4.29/images/find.png +0 -0
  163. data/rdoc/site/0.4.29/images/loadingAnimation.gif +0 -0
  164. data/rdoc/site/0.4.29/images/macFFBgHack.png +0 -0
  165. data/rdoc/site/0.4.29/images/package.png +0 -0
  166. data/rdoc/site/0.4.29/images/page_green.png +0 -0
  167. data/rdoc/site/0.4.29/images/page_white_text.png +0 -0
  168. data/rdoc/site/0.4.29/images/page_white_width.png +0 -0
  169. data/rdoc/site/0.4.29/images/plugin.png +0 -0
  170. data/rdoc/site/0.4.29/images/ruby.png +0 -0
  171. data/rdoc/site/0.4.29/images/tag_blue.png +0 -0
  172. data/rdoc/site/0.4.29/images/tag_green.png +0 -0
  173. data/rdoc/site/0.4.29/images/transparent.png +0 -0
  174. data/rdoc/site/0.4.29/images/wrench.png +0 -0
  175. data/rdoc/site/0.4.29/images/wrench_orange.png +0 -0
  176. data/rdoc/site/0.4.29/images/zoom.png +0 -0
  177. data/rdoc/site/0.4.29/index.html +0 -339
  178. data/rdoc/site/0.4.29/js/darkfish.js +0 -155
  179. data/rdoc/site/0.4.29/js/jquery.js +0 -18
  180. data/rdoc/site/0.4.29/js/navigation.js +0 -142
  181. data/rdoc/site/0.4.29/js/search.js +0 -94
  182. data/rdoc/site/0.4.29/js/search_index.js +0 -1
  183. data/rdoc/site/0.4.29/js/searcher.js +0 -228
  184. data/rdoc/site/0.4.29/rdoc.css +0 -543
  185. data/rdoc/site/0.4.29/table_of_contents.html +0 -1561
  186. data/rdoc/site/0.5.0/CORL/Build.html +0 -757
  187. data/rdoc/site/0.5.0/CORL/Builder/Identity.html +0 -569
  188. data/rdoc/site/0.5.0/CORL/Builder/Package.html +0 -576
  189. data/rdoc/site/0.5.0/CORL/Builder.html +0 -360
  190. data/rdoc/site/0.5.0/CORL/Configuration/File.html +0 -1148
  191. data/rdoc/site/0.5.0/CORL/Configuration.html +0 -359
  192. data/rdoc/site/0.5.0/CORL/Errors.html +0 -359
  193. data/rdoc/site/0.5.0/CORL/Facade.html +0 -899
  194. data/rdoc/site/0.5.0/CORL/Machine/AWS.html +0 -753
  195. data/rdoc/site/0.5.0/CORL/Machine/Fog.html +0 -1289
  196. data/rdoc/site/0.5.0/CORL/Machine/Physical.html +0 -1059
  197. data/rdoc/site/0.5.0/CORL/Machine/Rackspace.html +0 -534
  198. data/rdoc/site/0.5.0/CORL/Machine/Vagrant.html +0 -1320
  199. data/rdoc/site/0.5.0/CORL/Machine.html +0 -363
  200. data/rdoc/site/0.5.0/CORL/Mixin/Action/Keypair.html +0 -592
  201. data/rdoc/site/0.5.0/CORL/Mixin/Action.html +0 -359
  202. data/rdoc/site/0.5.0/CORL/Mixin/Builder/Global.html +0 -604
  203. data/rdoc/site/0.5.0/CORL/Mixin/Builder/Instance.html +0 -696
  204. data/rdoc/site/0.5.0/CORL/Mixin/Builder.html +0 -359
  205. data/rdoc/site/0.5.0/CORL/Mixin/Lookup.html +0 -1139
  206. data/rdoc/site/0.5.0/CORL/Mixin/Machine/SSH.html +0 -675
  207. data/rdoc/site/0.5.0/CORL/Mixin/Machine.html +0 -359
  208. data/rdoc/site/0.5.0/CORL/Mixin/Macro/NetworkSettings.html +0 -484
  209. data/rdoc/site/0.5.0/CORL/Mixin/Macro.html +0 -359
  210. data/rdoc/site/0.5.0/CORL/Mixin.html +0 -363
  211. data/rdoc/site/0.5.0/CORL/Network/CORL.html +0 -411
  212. data/rdoc/site/0.5.0/CORL/Network.html +0 -359
  213. data/rdoc/site/0.5.0/CORL/Node/AWS.html +0 -736
  214. data/rdoc/site/0.5.0/CORL/Node/Fog.html +0 -1212
  215. data/rdoc/site/0.5.0/CORL/Node/Local.html +0 -444
  216. data/rdoc/site/0.5.0/CORL/Node/Rackspace.html +0 -729
  217. data/rdoc/site/0.5.0/CORL/Node/Vagrant.html +0 -1476
  218. data/rdoc/site/0.5.0/CORL/Node.html +0 -363
  219. data/rdoc/site/0.5.0/CORL/Plugin/Builder.html +0 -500
  220. data/rdoc/site/0.5.0/CORL/Plugin/Configuration.html +0 -1271
  221. data/rdoc/site/0.5.0/CORL/Plugin/Machine.html +0 -1299
  222. data/rdoc/site/0.5.0/CORL/Plugin/Network.html +0 -1580
  223. data/rdoc/site/0.5.0/CORL/Plugin/Node.html +0 -4041
  224. data/rdoc/site/0.5.0/CORL/Plugin/Provisioner.html +0 -1115
  225. data/rdoc/site/0.5.0/CORL/Plugin.html +0 -649
  226. data/rdoc/site/0.5.0/CORL/Provisioner/Puppetnode.html +0 -1177
  227. data/rdoc/site/0.5.0/CORL/Provisioner.html +0 -359
  228. data/rdoc/site/0.5.0/CORL/Util/Puppet/Resource.html +0 -1058
  229. data/rdoc/site/0.5.0/CORL/Util/Puppet/ResourceGroup.html +0 -940
  230. data/rdoc/site/0.5.0/CORL/Util/Puppet.html +0 -1107
  231. data/rdoc/site/0.5.0/CORL/Util.html +0 -361
  232. data/rdoc/site/0.5.0/CORL/Vagrant/Config.html +0 -943
  233. data/rdoc/site/0.5.0/CORL/Vagrant.html +0 -438
  234. data/rdoc/site/0.5.0/CORL.html +0 -471
  235. data/rdoc/site/0.5.0/Fog/Compute/AWS/Server.html +0 -443
  236. data/rdoc/site/0.5.0/Fog/Compute/AWS.html +0 -365
  237. data/rdoc/site/0.5.0/Fog/Compute/RackspaceV2/Server.html +0 -428
  238. data/rdoc/site/0.5.0/Fog/Compute/RackspaceV2.html +0 -365
  239. data/rdoc/site/0.5.0/Fog/Compute.html +0 -360
  240. data/rdoc/site/0.5.0/Fog.html +0 -360
  241. data/rdoc/site/0.5.0/Hiera/Backend.html +0 -442
  242. data/rdoc/site/0.5.0/Hiera/Corl_logger.html +0 -469
  243. data/rdoc/site/0.5.0/Hiera.html +0 -366
  244. data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Create.html +0 -538
  245. data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Hiera.html +0 -566
  246. data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Images.html +0 -572
  247. data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Inspect.html +0 -524
  248. data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Machines.html +0 -567
  249. data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Regions.html +0 -567
  250. data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Vagrantfile.html +0 -515
  251. data/rdoc/site/0.5.0/Nucleon/Action/Cloud.html +0 -365
  252. data/rdoc/site/0.5.0/Nucleon/Action/Node/Authorize.html +0 -543
  253. data/rdoc/site/0.5.0/Nucleon/Action/Node/Bootstrap.html +0 -604
  254. data/rdoc/site/0.5.0/Nucleon/Action/Node/Build.html +0 -526
  255. data/rdoc/site/0.5.0/Nucleon/Action/Node/Destroy.html +0 -573
  256. data/rdoc/site/0.5.0/Nucleon/Action/Node/Exec.html +0 -530
  257. data/rdoc/site/0.5.0/Nucleon/Action/Node/Facts.html +0 -456
  258. data/rdoc/site/0.5.0/Nucleon/Action/Node/IP.html +0 -453
  259. data/rdoc/site/0.5.0/Nucleon/Action/Node/Image.html +0 -573
  260. data/rdoc/site/0.5.0/Nucleon/Action/Node/Keypair.html +0 -572
  261. data/rdoc/site/0.5.0/Nucleon/Action/Node/Lookup.html +0 -532
  262. data/rdoc/site/0.5.0/Nucleon/Action/Node/Provision.html +0 -553
  263. data/rdoc/site/0.5.0/Nucleon/Action/Node/Reboot.html +0 -573
  264. data/rdoc/site/0.5.0/Nucleon/Action/Node/Revoke.html +0 -541
  265. data/rdoc/site/0.5.0/Nucleon/Action/Node/SSH.html +0 -583
  266. data/rdoc/site/0.5.0/Nucleon/Action/Node/Seed.html +0 -602
  267. data/rdoc/site/0.5.0/Nucleon/Action/Node/Spawn.html +0 -675
  268. data/rdoc/site/0.5.0/Nucleon/Action/Node/Start.html +0 -573
  269. data/rdoc/site/0.5.0/Nucleon/Action/Node/Stop.html +0 -573
  270. data/rdoc/site/0.5.0/Nucleon/Action/Node.html +0 -376
  271. data/rdoc/site/0.5.0/Nucleon/Action.html +0 -383
  272. data/rdoc/site/0.5.0/Nucleon/Config.html +0 -377
  273. data/rdoc/site/0.5.0/Nucleon/Event/Puppet.html +0 -693
  274. data/rdoc/site/0.5.0/Nucleon/Event.html +0 -359
  275. data/rdoc/site/0.5.0/Nucleon/Plugin/Base.html +0 -365
  276. data/rdoc/site/0.5.0/Nucleon/Plugin/CloudAction.html +0 -838
  277. data/rdoc/site/0.5.0/Nucleon/Plugin.html +0 -360
  278. data/rdoc/site/0.5.0/Nucleon/Template/Environment.html +0 -548
  279. data/rdoc/site/0.5.0/Nucleon/Template.html +0 -359
  280. data/rdoc/site/0.5.0/Nucleon.html +0 -387
  281. data/rdoc/site/0.5.0/Object.html +0 -378
  282. data/rdoc/site/0.5.0/Puppet/DataBinding/Corl.html +0 -365
  283. data/rdoc/site/0.5.0/Puppet/DataBinding.html +0 -358
  284. data/rdoc/site/0.5.0/Puppet/Indirector/Corl.html +0 -477
  285. data/rdoc/site/0.5.0/Puppet/Indirector.html +0 -358
  286. data/rdoc/site/0.5.0/Puppet/Parser/Functions.html +0 -500
  287. data/rdoc/site/0.5.0/Puppet/Parser.html +0 -358
  288. data/rdoc/site/0.5.0/Puppet.html +0 -358
  289. data/rdoc/site/0.5.0/README_rdoc.html +0 -360
  290. data/rdoc/site/0.5.0/Vagrant/Config/Loader.html +0 -419
  291. data/rdoc/site/0.5.0/Vagrant/Config.html +0 -359
  292. data/rdoc/site/0.5.0/Vagrant/Vagrantfile.html +0 -412
  293. data/rdoc/site/0.5.0/Vagrant.html +0 -366
  294. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Action/DeleteCache.html +0 -422
  295. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Action/InitKeys.html +0 -428
  296. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Action/LinkNetwork.html +0 -426
  297. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Action.html +0 -361
  298. data/rdoc/site/0.5.0/VagrantPlugins/CORL/BaseAction.html +0 -511
  299. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Command/Launcher.html +0 -553
  300. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Command.html +0 -359
  301. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Config/CORL.html +0 -752
  302. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Config.html +0 -359
  303. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Plugin.html +0 -365
  304. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Provisioner/CORL.html +0 -556
  305. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Provisioner.html +0 -359
  306. data/rdoc/site/0.5.0/VagrantPlugins/CORL.html +0 -366
  307. data/rdoc/site/0.5.0/VagrantPlugins.html +0 -366
  308. data/rdoc/site/0.5.0/created.rid +0 -103
  309. data/rdoc/site/0.5.0/images/add.png +0 -0
  310. data/rdoc/site/0.5.0/images/brick.png +0 -0
  311. data/rdoc/site/0.5.0/images/brick_link.png +0 -0
  312. data/rdoc/site/0.5.0/images/bug.png +0 -0
  313. data/rdoc/site/0.5.0/images/bullet_black.png +0 -0
  314. data/rdoc/site/0.5.0/images/bullet_toggle_minus.png +0 -0
  315. data/rdoc/site/0.5.0/images/bullet_toggle_plus.png +0 -0
  316. data/rdoc/site/0.5.0/images/date.png +0 -0
  317. data/rdoc/site/0.5.0/images/delete.png +0 -0
  318. data/rdoc/site/0.5.0/images/find.png +0 -0
  319. data/rdoc/site/0.5.0/images/loadingAnimation.gif +0 -0
  320. data/rdoc/site/0.5.0/images/macFFBgHack.png +0 -0
  321. data/rdoc/site/0.5.0/images/package.png +0 -0
  322. data/rdoc/site/0.5.0/images/page_green.png +0 -0
  323. data/rdoc/site/0.5.0/images/page_white_text.png +0 -0
  324. data/rdoc/site/0.5.0/images/page_white_width.png +0 -0
  325. data/rdoc/site/0.5.0/images/plugin.png +0 -0
  326. data/rdoc/site/0.5.0/images/ruby.png +0 -0
  327. data/rdoc/site/0.5.0/images/tag_blue.png +0 -0
  328. data/rdoc/site/0.5.0/images/tag_green.png +0 -0
  329. data/rdoc/site/0.5.0/images/transparent.png +0 -0
  330. data/rdoc/site/0.5.0/images/wrench.png +0 -0
  331. data/rdoc/site/0.5.0/images/wrench_orange.png +0 -0
  332. data/rdoc/site/0.5.0/images/zoom.png +0 -0
  333. data/rdoc/site/0.5.0/index.html +0 -359
  334. data/rdoc/site/0.5.0/js/darkfish.js +0 -155
  335. data/rdoc/site/0.5.0/js/jquery.js +0 -18
  336. data/rdoc/site/0.5.0/js/navigation.js +0 -142
  337. data/rdoc/site/0.5.0/js/search.js +0 -94
  338. data/rdoc/site/0.5.0/js/search_index.js +0 -1
  339. data/rdoc/site/0.5.0/js/searcher.js +0 -228
  340. data/rdoc/site/0.5.0/rdoc.css +0 -543
  341. data/rdoc/site/0.5.0/table_of_contents.html +0 -1797
  342. data/rdoc/site/0.5.1/CORL/Build.html +0 -781
  343. data/rdoc/site/0.5.1/CORL/Builder/Identity.html +0 -596
  344. data/rdoc/site/0.5.1/CORL/Builder/Package.html +0 -600
  345. data/rdoc/site/0.5.1/CORL/Builder.html +0 -384
  346. data/rdoc/site/0.5.1/CORL/Configuration/File.html +0 -1186
  347. data/rdoc/site/0.5.1/CORL/Configuration.html +0 -383
  348. data/rdoc/site/0.5.1/CORL/Errors.html +0 -383
  349. data/rdoc/site/0.5.1/CORL/Facade.html +0 -927
  350. data/rdoc/site/0.5.1/CORL/Machine/AWS.html +0 -777
  351. data/rdoc/site/0.5.1/CORL/Machine/Fog.html +0 -1313
  352. data/rdoc/site/0.5.1/CORL/Machine/Physical.html +0 -1083
  353. data/rdoc/site/0.5.1/CORL/Machine/Rackspace.html +0 -558
  354. data/rdoc/site/0.5.1/CORL/Machine/Vagrant.html +0 -1344
  355. data/rdoc/site/0.5.1/CORL/Machine.html +0 -387
  356. data/rdoc/site/0.5.1/CORL/Mixin/Action/Keypair.html +0 -616
  357. data/rdoc/site/0.5.1/CORL/Mixin/Action/Registration.html +0 -469
  358. data/rdoc/site/0.5.1/CORL/Mixin/Action.html +0 -384
  359. data/rdoc/site/0.5.1/CORL/Mixin/Builder/Global.html +0 -628
  360. data/rdoc/site/0.5.1/CORL/Mixin/Builder/Instance.html +0 -720
  361. data/rdoc/site/0.5.1/CORL/Mixin/Builder.html +0 -383
  362. data/rdoc/site/0.5.1/CORL/Mixin/Lookup.html +0 -1315
  363. data/rdoc/site/0.5.1/CORL/Mixin/Machine/SSH.html +0 -699
  364. data/rdoc/site/0.5.1/CORL/Mixin/Machine.html +0 -383
  365. data/rdoc/site/0.5.1/CORL/Mixin/Macro/NetworkSettings.html +0 -508
  366. data/rdoc/site/0.5.1/CORL/Mixin/Macro.html +0 -383
  367. data/rdoc/site/0.5.1/CORL/Mixin.html +0 -388
  368. data/rdoc/site/0.5.1/CORL/Network/CORL.html +0 -435
  369. data/rdoc/site/0.5.1/CORL/Network.html +0 -383
  370. data/rdoc/site/0.5.1/CORL/Node/AWS.html +0 -760
  371. data/rdoc/site/0.5.1/CORL/Node/Fog.html +0 -1268
  372. data/rdoc/site/0.5.1/CORL/Node/Local.html +0 -468
  373. data/rdoc/site/0.5.1/CORL/Node/Rackspace.html +0 -753
  374. data/rdoc/site/0.5.1/CORL/Node/Vagrant.html +0 -1497
  375. data/rdoc/site/0.5.1/CORL/Node.html +0 -387
  376. data/rdoc/site/0.5.1/CORL/Plugin/Builder.html +0 -524
  377. data/rdoc/site/0.5.1/CORL/Plugin/Configuration.html +0 -1294
  378. data/rdoc/site/0.5.1/CORL/Plugin/Machine.html +0 -1323
  379. data/rdoc/site/0.5.1/CORL/Plugin/Network.html +0 -1766
  380. data/rdoc/site/0.5.1/CORL/Plugin/Node.html +0 -4263
  381. data/rdoc/site/0.5.1/CORL/Plugin/Provisioner.html +0 -1139
  382. data/rdoc/site/0.5.1/CORL/Plugin.html +0 -673
  383. data/rdoc/site/0.5.1/CORL/Provisioner/Puppetnode.html +0 -1201
  384. data/rdoc/site/0.5.1/CORL/Provisioner.html +0 -383
  385. data/rdoc/site/0.5.1/CORL/Util/Puppet/Resource.html +0 -1082
  386. data/rdoc/site/0.5.1/CORL/Util/Puppet/ResourceGroup.html +0 -964
  387. data/rdoc/site/0.5.1/CORL/Util/Puppet.html +0 -1131
  388. data/rdoc/site/0.5.1/CORL/Util.html +0 -385
  389. data/rdoc/site/0.5.1/CORL/Vagrant/Config.html +0 -967
  390. data/rdoc/site/0.5.1/CORL/Vagrant.html +0 -462
  391. data/rdoc/site/0.5.1/CORL.html +0 -496
  392. data/rdoc/site/0.5.1/Fog/Compute/AWS/Server.html +0 -467
  393. data/rdoc/site/0.5.1/Fog/Compute/AWS.html +0 -389
  394. data/rdoc/site/0.5.1/Fog/Compute/RackspaceV2/Server.html +0 -452
  395. data/rdoc/site/0.5.1/Fog/Compute/RackspaceV2.html +0 -389
  396. data/rdoc/site/0.5.1/Fog/Compute.html +0 -384
  397. data/rdoc/site/0.5.1/Fog.html +0 -384
  398. data/rdoc/site/0.5.1/Hiera/Backend.html +0 -466
  399. data/rdoc/site/0.5.1/Hiera/Corl_logger.html +0 -493
  400. data/rdoc/site/0.5.1/Hiera.html +0 -390
  401. data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Config.html +0 -978
  402. data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Create.html +0 -562
  403. data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Images.html +0 -596
  404. data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Inspect.html +0 -567
  405. data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Machines.html +0 -591
  406. data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Regions.html +0 -591
  407. data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Settings.html +0 -878
  408. data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Vagrantfile.html +0 -539
  409. data/rdoc/site/0.5.1/Nucleon/Action/Cloud.html +0 -390
  410. data/rdoc/site/0.5.1/Nucleon/Action/Node/Authorize.html +0 -567
  411. data/rdoc/site/0.5.1/Nucleon/Action/Node/Bootstrap.html +0 -628
  412. data/rdoc/site/0.5.1/Nucleon/Action/Node/Build.html +0 -550
  413. data/rdoc/site/0.5.1/Nucleon/Action/Node/Cache.html +0 -773
  414. data/rdoc/site/0.5.1/Nucleon/Action/Node/Destroy.html +0 -597
  415. data/rdoc/site/0.5.1/Nucleon/Action/Node/Exec.html +0 -554
  416. data/rdoc/site/0.5.1/Nucleon/Action/Node/Fact.html +0 -733
  417. data/rdoc/site/0.5.1/Nucleon/Action/Node/Facts.html +0 -505
  418. data/rdoc/site/0.5.1/Nucleon/Action/Node/Group.html +0 -729
  419. data/rdoc/site/0.5.1/Nucleon/Action/Node/Groups.html +0 -505
  420. data/rdoc/site/0.5.1/Nucleon/Action/Node/IP.html +0 -477
  421. data/rdoc/site/0.5.1/Nucleon/Action/Node/Identity.html +0 -614
  422. data/rdoc/site/0.5.1/Nucleon/Action/Node/Image.html +0 -597
  423. data/rdoc/site/0.5.1/Nucleon/Action/Node/Keypair.html +0 -596
  424. data/rdoc/site/0.5.1/Nucleon/Action/Node/Lookup.html +0 -579
  425. data/rdoc/site/0.5.1/Nucleon/Action/Node/Provision.html +0 -577
  426. data/rdoc/site/0.5.1/Nucleon/Action/Node/Reboot.html +0 -597
  427. data/rdoc/site/0.5.1/Nucleon/Action/Node/Revoke.html +0 -565
  428. data/rdoc/site/0.5.1/Nucleon/Action/Node/SSH.html +0 -607
  429. data/rdoc/site/0.5.1/Nucleon/Action/Node/Seed.html +0 -626
  430. data/rdoc/site/0.5.1/Nucleon/Action/Node/Spawn.html +0 -699
  431. data/rdoc/site/0.5.1/Nucleon/Action/Node/Start.html +0 -597
  432. data/rdoc/site/0.5.1/Nucleon/Action/Node/Status.html +0 -615
  433. data/rdoc/site/0.5.1/Nucleon/Action/Node/Stop.html +0 -597
  434. data/rdoc/site/0.5.1/Nucleon/Action/Node.html +0 -406
  435. data/rdoc/site/0.5.1/Nucleon/Action/Plugin/Create.html +0 -736
  436. data/rdoc/site/0.5.1/Nucleon/Action/Plugin/List.html +0 -570
  437. data/rdoc/site/0.5.1/Nucleon/Action/Plugin.html +0 -384
  438. data/rdoc/site/0.5.1/Nucleon/Action/Plugins.html +0 -435
  439. data/rdoc/site/0.5.1/Nucleon/Action.html +0 -417
  440. data/rdoc/site/0.5.1/Nucleon/Config.html +0 -401
  441. data/rdoc/site/0.5.1/Nucleon/Event/Puppet.html +0 -717
  442. data/rdoc/site/0.5.1/Nucleon/Event.html +0 -383
  443. data/rdoc/site/0.5.1/Nucleon/Plugin/Base.html +0 -389
  444. data/rdoc/site/0.5.1/Nucleon/Plugin/CloudAction.html +0 -894
  445. data/rdoc/site/0.5.1/Nucleon/Plugin.html +0 -384
  446. data/rdoc/site/0.5.1/Nucleon/Template/Environment.html +0 -572
  447. data/rdoc/site/0.5.1/Nucleon/Template.html +0 -383
  448. data/rdoc/site/0.5.1/Nucleon.html +0 -421
  449. data/rdoc/site/0.5.1/Object.html +0 -402
  450. data/rdoc/site/0.5.1/Puppet/DataBinding/Corl.html +0 -389
  451. data/rdoc/site/0.5.1/Puppet/DataBinding.html +0 -382
  452. data/rdoc/site/0.5.1/Puppet/Indirector/Corl.html +0 -501
  453. data/rdoc/site/0.5.1/Puppet/Indirector.html +0 -382
  454. data/rdoc/site/0.5.1/Puppet/Parser/Functions.html +0 -524
  455. data/rdoc/site/0.5.1/Puppet/Parser.html +0 -382
  456. data/rdoc/site/0.5.1/Puppet.html +0 -382
  457. data/rdoc/site/0.5.1/README_rdoc.html +0 -384
  458. data/rdoc/site/0.5.1/Vagrant/Config/Loader.html +0 -443
  459. data/rdoc/site/0.5.1/Vagrant/Config.html +0 -383
  460. data/rdoc/site/0.5.1/Vagrant/Vagrantfile.html +0 -436
  461. data/rdoc/site/0.5.1/Vagrant.html +0 -390
  462. data/rdoc/site/0.5.1/VagrantPlugins/CORL/Action/DeleteCache.html +0 -446
  463. data/rdoc/site/0.5.1/VagrantPlugins/CORL/Action/InitKeys.html +0 -452
  464. data/rdoc/site/0.5.1/VagrantPlugins/CORL/Action/LinkNetwork.html +0 -450
  465. data/rdoc/site/0.5.1/VagrantPlugins/CORL/Action.html +0 -385
  466. data/rdoc/site/0.5.1/VagrantPlugins/CORL/BaseAction.html +0 -535
  467. data/rdoc/site/0.5.1/VagrantPlugins/CORL/Command/Launcher.html +0 -577
  468. data/rdoc/site/0.5.1/VagrantPlugins/CORL/Command.html +0 -383
  469. data/rdoc/site/0.5.1/VagrantPlugins/CORL/Config/CORL.html +0 -776
  470. data/rdoc/site/0.5.1/VagrantPlugins/CORL/Config.html +0 -383
  471. data/rdoc/site/0.5.1/VagrantPlugins/CORL/Plugin.html +0 -389
  472. data/rdoc/site/0.5.1/VagrantPlugins/CORL/Provisioner/CORL.html +0 -580
  473. data/rdoc/site/0.5.1/VagrantPlugins/CORL/Provisioner.html +0 -383
  474. data/rdoc/site/0.5.1/VagrantPlugins/CORL.html +0 -390
  475. data/rdoc/site/0.5.1/VagrantPlugins.html +0 -390
  476. data/rdoc/site/0.5.1/created.rid +0 -114
  477. data/rdoc/site/0.5.1/images/add.png +0 -0
  478. data/rdoc/site/0.5.1/images/brick.png +0 -0
  479. data/rdoc/site/0.5.1/images/brick_link.png +0 -0
  480. data/rdoc/site/0.5.1/images/bug.png +0 -0
  481. data/rdoc/site/0.5.1/images/bullet_black.png +0 -0
  482. data/rdoc/site/0.5.1/images/bullet_toggle_minus.png +0 -0
  483. data/rdoc/site/0.5.1/images/bullet_toggle_plus.png +0 -0
  484. data/rdoc/site/0.5.1/images/date.png +0 -0
  485. data/rdoc/site/0.5.1/images/delete.png +0 -0
  486. data/rdoc/site/0.5.1/images/find.png +0 -0
  487. data/rdoc/site/0.5.1/images/loadingAnimation.gif +0 -0
  488. data/rdoc/site/0.5.1/images/macFFBgHack.png +0 -0
  489. data/rdoc/site/0.5.1/images/package.png +0 -0
  490. data/rdoc/site/0.5.1/images/page_green.png +0 -0
  491. data/rdoc/site/0.5.1/images/page_white_text.png +0 -0
  492. data/rdoc/site/0.5.1/images/page_white_width.png +0 -0
  493. data/rdoc/site/0.5.1/images/plugin.png +0 -0
  494. data/rdoc/site/0.5.1/images/ruby.png +0 -0
  495. data/rdoc/site/0.5.1/images/tag_blue.png +0 -0
  496. data/rdoc/site/0.5.1/images/tag_green.png +0 -0
  497. data/rdoc/site/0.5.1/images/transparent.png +0 -0
  498. data/rdoc/site/0.5.1/images/wrench.png +0 -0
  499. data/rdoc/site/0.5.1/images/wrench_orange.png +0 -0
  500. data/rdoc/site/0.5.1/images/zoom.png +0 -0
  501. data/rdoc/site/0.5.1/index.html +0 -383
  502. data/rdoc/site/0.5.1/js/darkfish.js +0 -155
  503. data/rdoc/site/0.5.1/js/jquery.js +0 -18
  504. data/rdoc/site/0.5.1/js/navigation.js +0 -142
  505. data/rdoc/site/0.5.1/js/search.js +0 -94
  506. data/rdoc/site/0.5.1/js/search_index.js +0 -1
  507. data/rdoc/site/0.5.1/js/searcher.js +0 -228
  508. data/rdoc/site/0.5.1/rdoc.css +0 -543
  509. data/rdoc/site/0.5.1/table_of_contents.html +0 -2005
  510. data/spec/corl_mock_input.rb +0 -29
  511. data/spec/corl_test_kernel.rb +0 -22
@@ -5,107 +5,107 @@ class File < Nucleon.plugin_class(:CORL, :configuration)
5
5
 
6
6
  #-----------------------------------------------------------------------------
7
7
  # Configuration plugin interface
8
-
8
+
9
9
  def normalize(reload)
10
- super do
10
+ super do
11
11
  _set(:search, Config.new)
12
12
  _set(:router, Config.new)
13
13
  end
14
14
  end
15
-
15
+
16
16
  #-----------------------------------------------------------------------------
17
17
  # Property accessors / modifiers
18
-
18
+
19
19
  def search
20
20
  _get(:search)
21
21
  end
22
-
22
+
23
23
  #---
24
-
24
+
25
25
  def router
26
26
  _get(:router)
27
27
  end
28
28
 
29
29
  #-----------------------------------------------------------------------------
30
-
30
+
31
31
  def set_location(directory)
32
32
  super
33
33
  search_files if directory
34
34
  end
35
-
35
+
36
36
  #-----------------------------------------------------------------------------
37
37
  # Configuration loading / saving
38
-
38
+
39
39
  def load(options = {})
40
- super do |method_config, properties|
40
+ super do |method_config, properties|
41
41
  success = true
42
-
42
+
43
43
  myself.status = code.success
44
-
44
+
45
45
  generate_routes = lambda do |config_name, file_properties, parents = []|
46
46
  file_properties.each do |name, value|
47
47
  keys = [ parents, name ].flatten
48
-
48
+
49
49
  if value.is_a?(Hash) && ! value.empty?
50
50
  generate_routes.call(config_name, value, keys)
51
51
  else
52
- router.set(keys, config_name)
52
+ router.set(keys, config_name)
53
53
  end
54
54
  end
55
55
  end
56
-
56
+
57
57
  if fetch_project(method_config)
58
58
  search.export.each do |config_name, info|
59
59
  provider = info[:provider]
60
60
  file = info[:file]
61
-
61
+
62
62
  logger.info("Loading #{provider} translated source configuration from #{file}")
63
-
63
+
64
64
  parser = CORL.translator(method_config, provider)
65
65
  raw = Util::Disk.read(file)
66
-
66
+
67
67
  if parser && raw && ! raw.empty?
68
68
  logger.debug("Source configuration file contents: #{raw}")
69
-
70
- begin
69
+
70
+ begin
71
71
  parse_properties = parser.parse(raw)
72
-
72
+
73
73
  generate_routes.call(config_name, parse_properties)
74
74
  properties.import(parse_properties)
75
-
75
+
76
76
  rescue => error
77
77
  ui_group(file) do
78
78
  error(error.message.sub(/^[^\:]+\:\s+/, ''), { :i18n => false })
79
79
  end
80
80
  myself.status = 255
81
81
  success = false
82
- end
82
+ end
83
83
  end
84
- CORL.remove_plugin(parser) if parser
84
+ CORL.remove_plugin(parser) if parser
85
85
  end
86
86
  end
87
87
  success
88
88
  end
89
89
  end
90
-
90
+
91
91
  #---
92
-
92
+
93
93
  # properties[key...] = values
94
94
  #
95
95
  # to
96
- #
96
+ #
97
97
  # file_data[config_name][key...] = config
98
-
99
- def separate
98
+
99
+ def separate
100
100
  file_data = Config.new
101
101
  default_provider = CORL.type_default(:nucleon, :translator)
102
-
102
+
103
103
  split_config = lambda do |properties, local_router, parents = []|
104
104
  properties.each do |name, value|
105
105
  next if name.to_sym == :nodes
106
-
106
+
107
107
  keys = [ parents, name ].flatten
108
-
108
+
109
109
  if value.is_a?(Hash) && ! value.empty?
110
110
  # Nested configurations
111
111
  if local_router.is_a?(Hash) && local_router.has_key?(name)
@@ -119,35 +119,35 @@ class File < Nucleon.plugin_class(:CORL, :configuration)
119
119
  else
120
120
  # Never encountered before
121
121
  config_name = nil
122
-
122
+
123
123
  config_name = select_largest(router.get(parents)) unless parents.empty?
124
- split_config.call(value, config_name, keys)
125
- end
124
+ split_config.call(value, config_name, keys)
125
+ end
126
126
  end
127
127
  else
128
128
  if local_router.is_a?(String)
129
129
  # Router is a config_name string
130
130
  file_data.set([ local_router, keys ].flatten, value)
131
-
131
+
132
132
  elsif local_router.is_a?(Hash)
133
133
  # Router is a hash with sub options we have to pick from
134
134
  config_name = select_largest(local_router)
135
- file_data.set([ config_name, keys ].flatten, value)
135
+ file_data.set([ config_name, keys ].flatten, value)
136
136
  else
137
137
  # Router is non existent. Resort to easily found default
138
138
  config_name = "corl.#{default_provider}"
139
- file_data.set([ config_name, keys ].flatten, value)
139
+ file_data.set([ config_name, keys ].flatten, value)
140
140
  end
141
- end
141
+ end
142
142
  end
143
143
  end
144
-
144
+
145
145
  if config.get(:nodes, false)
146
146
  config[:nodes].each do |provider, data|
147
147
  data.each do |name, info|
148
148
  config_name = ::File.join('nodes', provider.to_s, "#{name}.#{default_provider}")
149
149
  file_data.set([ config_name, :nodes, provider, name ], info)
150
-
150
+
151
151
  unless search[config_name]
152
152
  search[config_name] = {
153
153
  :provider => default_provider,
@@ -156,34 +156,34 @@ class File < Nucleon.plugin_class(:CORL, :configuration)
156
156
  end
157
157
  end
158
158
  end
159
- end
160
-
159
+ end
160
+
161
161
  # Whew! Glad that's over...
162
162
  split_config.call(Util::Data.subset(config.export, config.keys - [ :nodes ]), router.export)
163
- file_data
163
+ file_data
164
164
  end
165
165
  protected :separate
166
-
166
+
167
167
  #---
168
-
168
+
169
169
  def save(options = {})
170
170
  super do |method_config|
171
171
  config_files = []
172
- success = true
172
+ success = true
173
173
  deleted_keys = search.export.keys
174
-
174
+
175
175
  separate.export.each do |config_name, router_data|
176
176
  info = search[config_name]
177
177
  provider = info[:provider]
178
178
  file = info[:file]
179
- file_dir = ::File.dirname(file)
179
+ file_dir = ::File.dirname(file)
180
180
  deleted_keys = deleted_keys - [ config_name ]
181
-
181
+
182
182
  FileUtils.mkdir_p(file_dir) unless Dir.exists?(file_dir)
183
-
183
+
184
184
  if renderer = CORL.translator(method_config, provider)
185
185
  rendering = renderer.generate(router_data)
186
-
186
+
187
187
  if Util::Disk.write(file, rendering)
188
188
  config_files << config_name
189
189
  else
@@ -193,36 +193,36 @@ class File < Nucleon.plugin_class(:CORL, :configuration)
193
193
  else
194
194
  success = false
195
195
  end
196
- break unless success
196
+ break unless success
197
197
  end
198
198
  if success
199
199
  # Check for removals
200
200
  deleted_keys.each do |config_name|
201
201
  info = search[config_name]
202
-
202
+
203
203
  search.delete(config_name)
204
204
  FileUtils.rm_f(info[:file])
205
-
205
+
206
206
  config_files << config_name
207
207
  end
208
208
  end
209
209
  if success && ! config_files.empty?
210
210
  # Commit changes
211
211
  commit_files = [ config_files, method_config.get_array(:files) ].flatten
212
-
213
- logger.debug("Source configuration rendering: #{rendering}")
212
+
213
+ logger.debug("Source configuration rendering: #{rendering}")
214
214
  success = update_project(commit_files, method_config)
215
215
  end
216
216
  success
217
217
  end
218
218
  end
219
-
219
+
220
220
  #---
221
-
221
+
222
222
  def remove(options = {})
223
223
  super do |method_config|
224
224
  success = true
225
- config_files = []
225
+ config_files = []
226
226
  search.each do |config_name, info|
227
227
  config_files << info[:file]
228
228
  success = false unless Util::Disk.delete(info[:file])
@@ -231,45 +231,45 @@ class File < Nucleon.plugin_class(:CORL, :configuration)
231
231
  success
232
232
  end
233
233
  end
234
-
234
+
235
235
  #---
236
-
236
+
237
237
  def attach(type, name, data, options = {})
238
238
  super do |method_config|
239
239
  attach_path = Util::Disk.filename([ project.directory, type.to_s ])
240
240
  success = true
241
-
241
+
242
242
  begin
243
243
  FileUtils.mkdir_p(attach_path) unless Dir.exists?(attach_path)
244
-
244
+
245
245
  rescue => error
246
246
  warn(error.message, { :i18n => false })
247
247
  success = false
248
248
  end
249
-
249
+
250
250
  if success
251
251
  case method_config.get(:type, :source)
252
252
  when :source
253
253
  new_file = project.local_path(Util::Disk.filename([ attach_path, name ]))
254
-
255
- logger.debug("Attaching source data (length: #{data.length}) to configuration at #{attach_path}")
254
+
255
+ logger.debug("Attaching source data (length: #{data.length}) to configuration at #{attach_path}")
256
256
  success = Util::Disk.write(new_file, data)
257
-
258
- when :file
257
+
258
+ when :file
259
259
  file = ::File.expand_path(data)
260
260
  attach_ext = ::File.basename(file)
261
- new_file = project.local_path(Util::Disk.filename([ attach_path, "#{name}-#{attach_ext}" ]))
262
-
263
- logger.debug("Attaching file #{file} to configuration at #{attach_path}")
264
-
261
+ new_file = project.local_path(Util::Disk.filename([ attach_path, "#{name}-#{attach_ext}" ]))
262
+
263
+ logger.debug("Attaching file #{file} to configuration at #{attach_path}")
264
+
265
265
  begin
266
266
  FileUtils.mkdir_p(attach_path) unless Dir.exists?(attach_path)
267
267
  FileUtils.cp(file, new_file)
268
-
268
+
269
269
  rescue => error
270
270
  warn(error.message, { :i18n => false })
271
271
  success = false
272
- end
272
+ end
273
273
  end
274
274
  end
275
275
  if success && autosave
@@ -279,24 +279,24 @@ class File < Nucleon.plugin_class(:CORL, :configuration)
279
279
  success ? new_file : nil
280
280
  end
281
281
  end
282
-
282
+
283
283
  #---
284
-
284
+
285
285
  def delete_attachments(ids, options = {})
286
286
  super do |method_config|
287
287
  success = true
288
288
  files = []
289
-
289
+
290
290
  array(ids).each do |id|
291
291
  file = ::File.join(project.directory, id.to_s)
292
-
292
+
293
293
  if Util::Disk.delete(file)
294
294
  files << file
295
295
  else
296
296
  success = false
297
297
  end
298
298
  end
299
-
299
+
300
300
  if success && autosave
301
301
  logger.debug("Removing attached data from project as #{files.join(', ')}")
302
302
  success = update_project(files, method_config)
@@ -304,97 +304,97 @@ class File < Nucleon.plugin_class(:CORL, :configuration)
304
304
  success ? files : nil
305
305
  end
306
306
  end
307
-
307
+
308
308
  #-----------------------------------------------------------------------------
309
309
  # Utilities
310
-
310
+
311
311
  def search_files
312
-
312
+
313
313
  add_search_file = lambda do |config_name, file, provider, info|
314
- if Util::Disk.exists?(file)
314
+ if Util::Disk.exists?(file)
315
315
  search[config_name] = {
316
316
  :provider => provider,
317
317
  :info => info,
318
318
  :file => file
319
319
  }
320
320
  else
321
- logger.info("Configuration file #{file} does not exist")
322
- end
321
+ logger.info("Configuration file #{file} does not exist")
322
+ end
323
323
  end
324
-
324
+
325
325
  if Util::Data.empty?(project.directory)
326
- logger.debug("Clearing configuration file information")
326
+ logger.debug("Clearing configuration file information")
327
327
  search.clear
328
328
  else
329
329
  translators = CORL.loaded_plugins(:nucleon, :translator)
330
330
  file_bases = [ :corl, extension_set(:base, []) ].flatten.uniq
331
-
331
+
332
332
  project.localize do
333
333
  translators.each do |provider, info|
334
334
  Dir.glob(::File.join('nodes', '**', "*.#{provider}")).each do |file|
335
335
  config_name = file
336
336
  file = ::File.join(project.directory, file)
337
-
338
- add_search_file.call(config_name, file, provider, info)
337
+
338
+ add_search_file.call(config_name, file, provider, info)
339
339
  end
340
340
  end
341
341
  end
342
-
342
+
343
343
  translators.each do |provider, info|
344
344
  file_bases.each do |file_base|
345
345
  config_name = "#{file_base}.#{provider}"
346
346
  file = Util::Disk.filename([ project.directory, config_name ])
347
-
347
+
348
348
  add_search_file.call(config_name, file, provider, info)
349
349
  end
350
- end
350
+ end
351
351
  logger.debug("Setting configuration file information to #{search.inspect}")
352
352
  end
353
353
  load(_export) if autoload
354
354
  end
355
355
  protected :search_files
356
-
356
+
357
357
  #---
358
-
358
+
359
359
  def fetch_project(options = {})
360
360
  config = Config.ensure(options)
361
361
  success = true
362
362
  if remote = config.get(:remote, nil)
363
363
  logger.info("Pulling configuration updates from remote #{remote}")
364
- success = project.pull(remote, config) if config.get(:pull, true)
364
+ success = project.pull(remote, config) if config.get(:pull, true)
365
365
  end
366
366
  success
367
367
  end
368
368
  protected :fetch_project
369
-
369
+
370
370
  #---
371
-
371
+
372
372
  def update_project(files = [], options = {})
373
373
  config = Config.ensure(options)
374
374
  success = true
375
-
375
+
376
376
  commit_files = '.'
377
377
  commit_files = array(files).flatten unless files.empty?
378
-
379
- logger.info("Committing changes to configuration files")
378
+
379
+ logger.info("Committing changes to configuration files")
380
380
  success = project.commit(commit_files, config)
381
-
381
+
382
382
  if success && remote = config.get(:remote, nil)
383
383
  logger.info("Pushing configuration updates to remote #{remote}")
384
- success = project.pull(remote, config) if config.get(:pull, true)
385
- success = project.push(remote, config) if success && config.get(:push, true)
384
+ success = project.pull(remote, config) if config.get(:pull, true) && ! config.get(:push, false)
385
+ success = project.push(remote, config) if success && config.get(:push, true)
386
386
  end
387
387
  success
388
388
  end
389
389
  protected :update_project
390
-
390
+
391
391
  #---
392
-
392
+
393
393
  def select_largest(router)
394
394
  return router unless router.is_a?(Hash)
395
-
395
+
396
396
  config_map = {}
397
-
397
+
398
398
  count_config_names = lambda do |data|
399
399
  data = data.export if data.is_a?(CORL::Config)
400
400
  data.each do |name, value|
@@ -406,16 +406,16 @@ class File < Nucleon.plugin_class(:CORL, :configuration)
406
406
  end
407
407
  end
408
408
  end
409
-
409
+
410
410
  config_name = nil
411
411
  config_weight = nil
412
-
412
+
413
413
  count_config_names.call(router)
414
414
  config_map.each do |name, weight|
415
415
  if config_name.nil? || weight > config_weight
416
416
  config_name = name
417
417
  config_weight = weight
418
- end
418
+ end
419
419
  end
420
420
  config_name
421
421
  end
@@ -2,55 +2,56 @@
2
2
  module CORL
3
3
  module Machine
4
4
  class Rackspace < Fog
5
-
5
+
6
6
  #-----------------------------------------------------------------------------
7
7
  # Checks
8
-
8
+
9
9
  #-----------------------------------------------------------------------------
10
10
  # Property accessors / modifiers
11
-
11
+
12
12
  def set_connection
13
+ require 'fog-rackspace'
13
14
  super
14
- Kernel.load File.join(File.dirname(__FILE__), '..', '..', 'core', 'mod', 'fog_rackspace_server.rb')
15
+ #Kernel.load File.join(File.dirname(__FILE__), '..', '..', 'core', 'mod', 'fog_rackspace_server.rb')
15
16
  end
16
-
17
+
17
18
  #-----------------------------------------------------------------------------
18
19
  # Management
19
20
 
20
21
  def init_server
21
22
  super do
22
23
  myself.plugin_name = @server.id
23
-
24
+
24
25
  node[:id] = plugin_name
25
26
  node[:public_ip] = @server.public_ip_address
26
- node[:private_ip] = @server.private_ip_address
27
+ node[:private_ip] = @server.private_ip_address
27
28
  node[:machine_type] = @server.flavor.id
28
- node[:image] = @server.image.id
29
+ node[:image] = @server.image.id if @server.image
29
30
  node.user = @server.username unless node.user
30
-
31
+
31
32
  @server.private_key_path = node.private_key if node.private_key
32
33
  @server.public_key_path = node.public_key if node.public_key
33
- end
34
+ end
34
35
  end
35
-
36
+
36
37
  #---
37
-
38
+
38
39
  def reload(options = {})
39
40
  super do |config|
40
41
  success = server.reboot(config.get(:type, 'SOFT'))
41
-
42
+
42
43
  server.wait_for { ready? } if success
43
44
  success
44
45
  end
45
46
  end
46
-
47
+
47
48
  #---
48
-
49
+
49
50
  def create_image(options = {})
50
51
  super do |image_name, config, success|
51
- image = server.create_image(image_name)
52
+ image = server.create_image(image_name)
52
53
  image.wait_for { ready? }
53
-
54
+
54
55
  if image
55
56
  node[:image] = image.id
56
57
  success = true
data/lib/core/facade.rb CHANGED
@@ -105,7 +105,7 @@ module Facade
105
105
  plugin(:CORL, :builder, provider, options)
106
106
  end
107
107
 
108
- def builder(data, build_hash = false, keep_array = false)
108
+ def builders(data, build_hash = false, keep_array = false)
109
109
  plugins(:CORL, :builder, data, build_hash, keep_array)
110
110
  end
111
111