vagrant 0.8.10 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (324) hide show
  1. data/CHANGELOG.md +77 -1
  2. data/Gemfile +0 -14
  3. data/LICENSE +1 -1
  4. data/bin/vagrant +47 -20
  5. data/config/default.rb +6 -14
  6. data/lib/vagrant.rb +132 -5
  7. data/lib/vagrant/action.rb +45 -123
  8. data/lib/vagrant/action/box/destroy.rb +7 -3
  9. data/lib/vagrant/action/box/download.rb +8 -8
  10. data/lib/vagrant/action/box/package.rb +2 -2
  11. data/lib/vagrant/action/box/unpackage.rb +13 -7
  12. data/lib/vagrant/action/box/verify.rb +5 -5
  13. data/lib/vagrant/action/builder.rb +23 -19
  14. data/lib/vagrant/action/builtin.rb +117 -79
  15. data/lib/vagrant/action/env/set.rb +7 -4
  16. data/lib/vagrant/action/environment.rb +3 -41
  17. data/lib/vagrant/action/general/package.rb +14 -29
  18. data/lib/vagrant/action/general/validate.rb +2 -2
  19. data/lib/vagrant/action/runner.rb +53 -0
  20. data/lib/vagrant/action/vm/boot.rb +9 -9
  21. data/lib/vagrant/action/vm/check_accessible.rb +2 -2
  22. data/lib/vagrant/action/vm/check_box.rb +10 -12
  23. data/lib/vagrant/action/vm/check_guest_additions.rb +8 -8
  24. data/lib/vagrant/action/vm/check_port_collisions.rb +85 -0
  25. data/lib/vagrant/action/vm/clean_machine_folder.rb +4 -4
  26. data/lib/vagrant/action/vm/clear_forwarded_ports.rb +3 -11
  27. data/lib/vagrant/action/vm/clear_network_interfaces.rb +31 -0
  28. data/lib/vagrant/action/vm/clear_shared_folders.rb +2 -11
  29. data/lib/vagrant/action/vm/customize.rb +19 -9
  30. data/lib/vagrant/action/vm/destroy.rb +4 -4
  31. data/lib/vagrant/action/vm/destroy_unused_network_interfaces.rb +2 -12
  32. data/lib/vagrant/action/vm/discard_state.rb +4 -4
  33. data/lib/vagrant/action/vm/export.rb +13 -8
  34. data/lib/vagrant/action/vm/forward_ports.rb +55 -102
  35. data/lib/vagrant/action/vm/halt.rb +9 -6
  36. data/lib/vagrant/action/vm/host_name.rb +4 -4
  37. data/lib/vagrant/action/vm/import.rb +19 -10
  38. data/lib/vagrant/action/vm/match_mac_address.rb +4 -9
  39. data/lib/vagrant/action/vm/network.rb +300 -94
  40. data/lib/vagrant/action/vm/nfs.rb +41 -26
  41. data/lib/vagrant/action/vm/package.rb +1 -1
  42. data/lib/vagrant/action/vm/package_vagrantfile.rb +5 -2
  43. data/lib/vagrant/action/vm/provision.rb +42 -13
  44. data/lib/vagrant/action/vm/provisioner_cleanup.rb +2 -2
  45. data/lib/vagrant/action/vm/{clear_nfs_exports.rb → prune_nfs_exports.rb} +7 -7
  46. data/lib/vagrant/action/vm/resume.rb +4 -4
  47. data/lib/vagrant/action/vm/setup_package_files.rb +54 -0
  48. data/lib/vagrant/action/vm/share_folders.rb +63 -39
  49. data/lib/vagrant/action/vm/suspend.rb +4 -4
  50. data/lib/vagrant/action/warden.rb +13 -6
  51. data/lib/vagrant/box.rb +9 -55
  52. data/lib/vagrant/box_collection.rb +22 -17
  53. data/lib/vagrant/cli.rb +62 -47
  54. data/lib/vagrant/command.rb +18 -20
  55. data/lib/vagrant/command/base.rb +135 -90
  56. data/lib/vagrant/command/box.rb +46 -21
  57. data/lib/vagrant/command/box_add.rb +33 -0
  58. data/lib/vagrant/command/box_list.rb +25 -0
  59. data/lib/vagrant/command/box_remove.rb +23 -0
  60. data/lib/vagrant/command/box_repackage.rb +23 -0
  61. data/lib/vagrant/command/destroy.rb +16 -5
  62. data/lib/vagrant/command/halt.rb +25 -7
  63. data/lib/vagrant/command/init.rb +30 -7
  64. data/lib/vagrant/command/package.rb +49 -18
  65. data/lib/vagrant/command/provision.rb +22 -9
  66. data/lib/vagrant/command/reload.rb +18 -5
  67. data/lib/vagrant/command/resume.rb +18 -5
  68. data/lib/vagrant/command/ssh.rb +69 -31
  69. data/lib/vagrant/command/ssh_config.rb +37 -22
  70. data/lib/vagrant/command/status.rb +22 -20
  71. data/lib/vagrant/command/suspend.rb +18 -5
  72. data/lib/vagrant/command/up.rb +41 -8
  73. data/lib/vagrant/communication.rb +7 -0
  74. data/lib/vagrant/communication/base.rb +56 -0
  75. data/lib/vagrant/communication/ssh.rb +200 -0
  76. data/lib/vagrant/config.rb +29 -103
  77. data/lib/vagrant/config/base.rb +18 -26
  78. data/lib/vagrant/config/container.rb +37 -0
  79. data/lib/vagrant/config/error_recorder.rb +1 -1
  80. data/lib/vagrant/config/loader.rb +125 -0
  81. data/lib/vagrant/config/nfs.rb +1 -3
  82. data/lib/vagrant/config/package.rb +1 -3
  83. data/lib/vagrant/config/ssh.rb +31 -16
  84. data/lib/vagrant/config/top.rb +36 -25
  85. data/lib/vagrant/config/vagrant.rb +2 -5
  86. data/lib/vagrant/config/vm.rb +115 -56
  87. data/lib/vagrant/config/vm/provisioner.rb +16 -20
  88. data/lib/vagrant/config/vm/sub_vm.rb +1 -1
  89. data/lib/vagrant/data_store.rb +23 -15
  90. data/lib/vagrant/downloaders/base.rb +7 -5
  91. data/lib/vagrant/downloaders/file.rb +4 -4
  92. data/lib/vagrant/downloaders/http.rb +4 -5
  93. data/lib/vagrant/driver.rb +7 -0
  94. data/lib/vagrant/driver/virtualbox.rb +121 -0
  95. data/lib/vagrant/driver/virtualbox_4_0.rb +411 -0
  96. data/lib/vagrant/driver/virtualbox_4_1.rb +411 -0
  97. data/lib/vagrant/driver/virtualbox_base.rb +284 -0
  98. data/lib/vagrant/environment.rb +221 -240
  99. data/lib/vagrant/errors.rb +74 -25
  100. data/lib/vagrant/guest.rb +16 -0
  101. data/lib/vagrant/guest/arch.rb +48 -0
  102. data/lib/vagrant/{systems → guest}/base.rb +30 -18
  103. data/lib/vagrant/guest/debian.rb +61 -0
  104. data/lib/vagrant/{systems → guest}/freebsd.rb +11 -18
  105. data/lib/vagrant/guest/gentoo.rb +32 -0
  106. data/lib/vagrant/guest/linux.rb +78 -0
  107. data/lib/vagrant/{systems → guest}/linux/config.rb +2 -4
  108. data/lib/vagrant/guest/linux/error.rb +9 -0
  109. data/lib/vagrant/guest/redhat.rb +66 -0
  110. data/lib/vagrant/guest/solaris.rb +114 -0
  111. data/lib/vagrant/{systems → guest}/suse.rb +2 -2
  112. data/lib/vagrant/guest/ubuntu.rb +23 -0
  113. data/lib/vagrant/hosts.rb +23 -6
  114. data/lib/vagrant/hosts/arch.rb +7 -3
  115. data/lib/vagrant/hosts/base.rb +36 -46
  116. data/lib/vagrant/hosts/bsd.rb +53 -16
  117. data/lib/vagrant/hosts/fedora.rb +14 -0
  118. data/lib/vagrant/hosts/freebsd.rb +6 -36
  119. data/lib/vagrant/hosts/linux.rb +45 -20
  120. data/lib/vagrant/hosts/windows.rb +16 -0
  121. data/lib/vagrant/provisioners.rb +10 -7
  122. data/lib/vagrant/provisioners/base.rb +11 -34
  123. data/lib/vagrant/provisioners/chef.rb +30 -26
  124. data/lib/vagrant/provisioners/chef_client.rb +37 -23
  125. data/lib/vagrant/provisioners/chef_solo.rb +61 -16
  126. data/lib/vagrant/provisioners/puppet.rb +70 -38
  127. data/lib/vagrant/provisioners/puppet_server.rb +12 -13
  128. data/lib/vagrant/provisioners/shell.rb +24 -24
  129. data/lib/vagrant/registry.rb +49 -0
  130. data/lib/vagrant/ssh.rb +82 -153
  131. data/lib/vagrant/ui.rb +118 -50
  132. data/lib/vagrant/util/busy.rb +1 -1
  133. data/lib/vagrant/util/file_mode.rb +12 -0
  134. data/lib/vagrant/util/network_ip.rb +28 -0
  135. data/lib/vagrant/util/platform.rb +1 -0
  136. data/lib/vagrant/util/subprocess.rb +227 -0
  137. data/lib/vagrant/version.rb +1 -1
  138. data/lib/vagrant/vm.rb +111 -97
  139. data/tasks/acceptance.rake +3 -3
  140. data/tasks/test.rake +7 -2
  141. data/templates/commands/init/Vagrantfile.erb +11 -4
  142. data/templates/{ssh_config.erb → commands/ssh_config/config.erb} +0 -0
  143. data/templates/guests/arch/network_dhcp.erb +7 -0
  144. data/templates/guests/arch/network_static.erb +7 -0
  145. data/templates/guests/debian/network_dhcp.erb +6 -0
  146. data/templates/guests/debian/network_static.erb +7 -0
  147. data/templates/guests/gentoo/network_dhcp.erb +4 -0
  148. data/templates/guests/gentoo/network_static.erb +4 -0
  149. data/templates/guests/redhat/network_dhcp.erb +6 -0
  150. data/templates/guests/redhat/network_static.erb +7 -0
  151. data/templates/locales/en.yml +241 -122
  152. data/templates/{chef_server_client.erb → provisioners/chef_client/client.erb} +0 -0
  153. data/templates/{chef_solo_solo.erb → provisioners/chef_solo/solo.erb} +0 -0
  154. data/test/acceptance/base.rb +10 -10
  155. data/test/acceptance/box_test.rb +28 -6
  156. data/test/acceptance/destroy_test.rb +1 -1
  157. data/test/acceptance/halt_test.rb +4 -4
  158. data/test/acceptance/init_test.rb +3 -3
  159. data/test/acceptance/networking/host_only_test.rb +37 -0
  160. data/test/acceptance/networking/port_forward_test.rb +125 -0
  161. data/test/acceptance/package_test.rb +46 -0
  162. data/test/acceptance/provisioning/basic_test.rb +61 -0
  163. data/test/acceptance/provisioning/chef_solo_test.rb +37 -0
  164. data/test/acceptance/provisioning/shell_test.rb +53 -0
  165. data/test/acceptance/resume_test.rb +1 -1
  166. data/test/acceptance/skeletons/chef_solo_basic/README.md +3 -0
  167. data/test/acceptance/skeletons/chef_solo_basic/cookbooks/basic/recipes/default.rb +5 -0
  168. data/test/acceptance/skeletons/chef_solo_json/README.md +3 -0
  169. data/test/acceptance/skeletons/chef_solo_json/cookbooks/basic/recipes/default.rb +6 -0
  170. data/test/acceptance/skeletons/provisioner_multi/README.md +3 -0
  171. data/test/acceptance/skeletons/provisioner_multi/cookbooks/basic/recipes/default.rb +5 -0
  172. data/test/acceptance/ssh_test.rb +7 -2
  173. data/test/acceptance/support/config.rb +1 -1
  174. data/test/acceptance/support/isolated_environment.rb +41 -150
  175. data/test/acceptance/support/matchers/match_output.rb +1 -1
  176. data/test/acceptance/support/matchers/succeed.rb +14 -0
  177. data/test/acceptance/support/network_tests.rb +29 -0
  178. data/test/acceptance/support/output.rb +9 -1
  179. data/test/acceptance/support/shared/base_context.rb +16 -9
  180. data/test/acceptance/support/shared/command_examples.rb +4 -4
  181. data/test/acceptance/suspend_test.rb +1 -1
  182. data/test/acceptance/up_basic_test.rb +26 -7
  183. data/test/acceptance/up_with_box_url.rb +1 -1
  184. data/test/acceptance/vagrant_test.rb +1 -1
  185. data/test/acceptance/version_test.rb +0 -5
  186. data/test/support/isolated_environment.rb +46 -0
  187. data/test/{acceptance/support → support}/tempdir.rb +0 -0
  188. data/test/unit/base.rb +21 -0
  189. data/test/unit/support/isolated_environment.rb +39 -0
  190. data/test/unit/support/shared/base_context.rb +30 -0
  191. data/test/unit/vagrant/action/builder_test.rb +126 -177
  192. data/test/unit/vagrant/action/environment_test.rb +10 -21
  193. data/test/unit/vagrant/action/runner_test.rb +65 -0
  194. data/test/unit/vagrant/action/warden_test.rb +64 -97
  195. data/test/unit/vagrant/box_collection_test.rb +44 -33
  196. data/test/unit/vagrant/box_test.rb +25 -65
  197. data/test/unit/vagrant/command/base_test.rb +141 -14
  198. data/test/unit/vagrant/config/base_test.rb +16 -43
  199. data/test/unit/vagrant/config/loader_test.rb +79 -0
  200. data/test/unit/vagrant/config/top_test.rb +69 -0
  201. data/test/unit/vagrant/config/vm_test.rb +62 -47
  202. data/test/unit/vagrant/config_test.rb +16 -151
  203. data/test/unit/vagrant/data_store_test.rb +43 -61
  204. data/test/unit/vagrant/downloaders/base_test.rb +12 -22
  205. data/test/unit/vagrant/downloaders/file_test.rb +58 -31
  206. data/test/unit/vagrant/downloaders/http_test.rb +12 -86
  207. data/test/unit/vagrant/environment_test.rb +107 -536
  208. data/test/unit/vagrant/hosts_test.rb +36 -0
  209. data/test/unit/vagrant/registry_test.rb +56 -0
  210. data/test/unit/vagrant/util/file_checksum_test.rb +23 -0
  211. data/test/unit/vagrant/util/hash_with_indifferent_access_test.rb +23 -24
  212. data/test/unit/vagrant/util/network_ip_test.rb +17 -0
  213. data/test/unit/vagrant/util/retryable_test.rb +90 -34
  214. data/test/unit/vagrant_test.rb +27 -0
  215. data/test/{unit → unit_legacy}/locales/en.yml +0 -0
  216. data/test/{unit → unit_legacy}/test_helper.rb +0 -0
  217. data/test/{unit → unit_legacy}/vagrant/action/box/destroy_test.rb +0 -0
  218. data/test/{unit → unit_legacy}/vagrant/action/box/download_test.rb +0 -0
  219. data/test/{unit → unit_legacy}/vagrant/action/box/package_test.rb +0 -0
  220. data/test/{unit → unit_legacy}/vagrant/action/box/unpackage_test.rb +0 -0
  221. data/test/{unit → unit_legacy}/vagrant/action/box/verify_test.rb +0 -0
  222. data/test/{unit → unit_legacy}/vagrant/action/env/set_test.rb +0 -0
  223. data/test/{unit → unit_legacy}/vagrant/action/general/package_test.rb +0 -0
  224. data/test/{unit → unit_legacy}/vagrant/action/general/validate_test.rb +0 -0
  225. data/test/{unit → unit_legacy}/vagrant/action/vm/boot_test.rb +0 -0
  226. data/test/{unit → unit_legacy}/vagrant/action/vm/check_accessible_test.rb +0 -0
  227. data/test/{unit → unit_legacy}/vagrant/action/vm/check_box_test.rb +0 -0
  228. data/test/{unit → unit_legacy}/vagrant/action/vm/check_guest_additions_test.rb +0 -0
  229. data/test/{unit → unit_legacy}/vagrant/action/vm/clean_machine_folder_test.rb +0 -0
  230. data/test/{unit → unit_legacy}/vagrant/action/vm/clear_forwarded_ports_test.rb +0 -0
  231. data/test/{unit → unit_legacy}/vagrant/action/vm/clear_nfs_exports_test.rb +0 -0
  232. data/test/{unit → unit_legacy}/vagrant/action/vm/clear_shared_folders_test.rb +0 -0
  233. data/test/{unit → unit_legacy}/vagrant/action/vm/customize_test.rb +0 -0
  234. data/test/{unit → unit_legacy}/vagrant/action/vm/destroy_test.rb +0 -0
  235. data/test/{unit → unit_legacy}/vagrant/action/vm/destroy_unused_network_interfaces_test.rb +0 -0
  236. data/test/{unit → unit_legacy}/vagrant/action/vm/discard_state_test.rb +0 -0
  237. data/test/{unit → unit_legacy}/vagrant/action/vm/export_test.rb +0 -0
  238. data/test/{unit → unit_legacy}/vagrant/action/vm/forward_ports_helpers_test.rb +0 -0
  239. data/test/{unit → unit_legacy}/vagrant/action/vm/forward_ports_test.rb +0 -0
  240. data/test/{unit → unit_legacy}/vagrant/action/vm/halt_test.rb +0 -0
  241. data/test/{unit → unit_legacy}/vagrant/action/vm/host_name_test.rb +0 -0
  242. data/test/{unit → unit_legacy}/vagrant/action/vm/import_test.rb +0 -0
  243. data/test/{unit → unit_legacy}/vagrant/action/vm/match_mac_address_test.rb +0 -0
  244. data/test/{unit → unit_legacy}/vagrant/action/vm/modify_test.rb +0 -0
  245. data/test/{unit → unit_legacy}/vagrant/action/vm/network_test.rb +0 -0
  246. data/test/{unit → unit_legacy}/vagrant/action/vm/nfs_helpers_test.rb +0 -0
  247. data/test/{unit → unit_legacy}/vagrant/action/vm/nfs_test.rb +0 -0
  248. data/test/{unit → unit_legacy}/vagrant/action/vm/package_test.rb +0 -0
  249. data/test/{unit → unit_legacy}/vagrant/action/vm/package_vagrantfile_test.rb +0 -0
  250. data/test/{unit → unit_legacy}/vagrant/action/vm/provision_test.rb +0 -0
  251. data/test/{unit → unit_legacy}/vagrant/action/vm/provisioner_cleanup_test.rb +0 -0
  252. data/test/{unit → unit_legacy}/vagrant/action/vm/resume_test.rb +0 -0
  253. data/test/{unit → unit_legacy}/vagrant/action/vm/share_folders_test.rb +0 -0
  254. data/test/{unit → unit_legacy}/vagrant/action/vm/suspend_test.rb +0 -0
  255. data/test/{unit → unit_legacy}/vagrant/action_test.rb +0 -0
  256. data/test/unit_legacy/vagrant/box_collection_test.rb +45 -0
  257. data/test/unit_legacy/vagrant/box_test.rb +74 -0
  258. data/test/{unit → unit_legacy}/vagrant/cli_test.rb +0 -0
  259. data/test/unit_legacy/vagrant/command/base_test.rb +23 -0
  260. data/test/{unit → unit_legacy}/vagrant/command/group_base_test.rb +0 -0
  261. data/test/{unit → unit_legacy}/vagrant/command/helpers_test.rb +0 -0
  262. data/test/{unit → unit_legacy}/vagrant/command/init_test.rb +0 -0
  263. data/test/{unit → unit_legacy}/vagrant/command/package_test.rb +0 -0
  264. data/test/unit_legacy/vagrant/config/base_test.rb +52 -0
  265. data/test/{unit → unit_legacy}/vagrant/config/error_recorder_test.rb +0 -0
  266. data/test/{unit → unit_legacy}/vagrant/config/ssh_test.rb +0 -0
  267. data/test/{unit → unit_legacy}/vagrant/config/vagrant_test.rb +0 -0
  268. data/test/{unit → unit_legacy}/vagrant/config/vm/provisioner_test.rb +0 -0
  269. data/test/unit_legacy/vagrant/config/vm_test.rb +47 -0
  270. data/test/unit_legacy/vagrant/config_test.rb +148 -0
  271. data/test/unit_legacy/vagrant/downloaders/http_test.rb +93 -0
  272. data/test/unit_legacy/vagrant/environment_test.rb +539 -0
  273. data/test/{unit → unit_legacy}/vagrant/errors_test.rb +0 -0
  274. data/test/{unit → unit_legacy}/vagrant/hosts/base_test.rb +0 -0
  275. data/test/{unit → unit_legacy}/vagrant/hosts/bsd_test.rb +0 -0
  276. data/test/{unit → unit_legacy}/vagrant/hosts/linux_test.rb +0 -0
  277. data/test/{unit → unit_legacy}/vagrant/plugin_test.rb +0 -0
  278. data/test/{unit → unit_legacy}/vagrant/provisioners/base_test.rb +0 -0
  279. data/test/{unit → unit_legacy}/vagrant/provisioners/chef_client_test.rb +0 -0
  280. data/test/{unit → unit_legacy}/vagrant/provisioners/chef_solo_test.rb +0 -0
  281. data/test/{unit → unit_legacy}/vagrant/provisioners/chef_test.rb +0 -0
  282. data/test/{unit → unit_legacy}/vagrant/provisioners/puppet_server_test.rb +0 -0
  283. data/test/{unit → unit_legacy}/vagrant/provisioners/puppet_test.rb +0 -0
  284. data/test/{unit → unit_legacy}/vagrant/provisioners/shell_test.rb +0 -0
  285. data/test/{unit → unit_legacy}/vagrant/ssh/session_test.rb +0 -0
  286. data/test/{unit → unit_legacy}/vagrant/ssh_test.rb +0 -0
  287. data/test/{unit → unit_legacy}/vagrant/systems/base_test.rb +0 -0
  288. data/test/{unit → unit_legacy}/vagrant/systems/linux_test.rb +0 -0
  289. data/test/{unit → unit_legacy}/vagrant/util/busy_test.rb +0 -0
  290. data/test/{unit → unit_legacy}/vagrant/util/counter_test.rb +0 -0
  291. data/test/{unit → unit_legacy}/vagrant/util/platform_test.rb +0 -0
  292. data/test/{unit → unit_legacy}/vagrant/util/stacked_proc_runner_test.rb +0 -0
  293. data/test/{unit → unit_legacy}/vagrant/util/template_renderer_test.rb +0 -0
  294. data/test/{unit → unit_legacy}/vagrant/vm_test.rb +0 -0
  295. data/vagrant.gemspec +7 -9
  296. metadata +214 -216
  297. data/keys/vagrant.ppk +0 -26
  298. data/lib/vagrant/action/box.rb +0 -11
  299. data/lib/vagrant/action/env.rb +0 -7
  300. data/lib/vagrant/action/general.rb +0 -8
  301. data/lib/vagrant/action/vm.rb +0 -34
  302. data/lib/vagrant/action/vm/forward_ports_helpers.rb +0 -28
  303. data/lib/vagrant/action/vm/modify.rb +0 -37
  304. data/lib/vagrant/action/vm/nfs_helpers.rb +0 -11
  305. data/lib/vagrant/command/group_base.rb +0 -107
  306. data/lib/vagrant/command/helpers.rb +0 -33
  307. data/lib/vagrant/command/named_base.rb +0 -14
  308. data/lib/vagrant/command/upgrade_to_060.rb +0 -45
  309. data/lib/vagrant/command/version.rb +0 -13
  310. data/lib/vagrant/ssh/session.rb +0 -136
  311. data/lib/vagrant/systems.rb +0 -13
  312. data/lib/vagrant/systems/arch.rb +0 -34
  313. data/lib/vagrant/systems/debian.rb +0 -36
  314. data/lib/vagrant/systems/gentoo.rb +0 -27
  315. data/lib/vagrant/systems/linux.rb +0 -82
  316. data/lib/vagrant/systems/linux/error.rb +0 -9
  317. data/lib/vagrant/systems/redhat.rb +0 -48
  318. data/lib/vagrant/systems/solaris.rb +0 -113
  319. data/lib/vagrant/systems/ubuntu.rb +0 -17
  320. data/templates/network_entry_arch.erb +0 -9
  321. data/templates/network_entry_debian.erb +0 -8
  322. data/templates/network_entry_gentoo.erb +0 -5
  323. data/templates/network_entry_redhat.erb +0 -9
  324. data/test/unit/vagrant/ui_test.rb +0 -29
@@ -1,7 +1,83 @@
1
+ ## 0.9.0 (January 17, 2012)
2
+
3
+ - VirtualBox 4.0 support backported in addition to supporting VirtualBox 4.1.
4
+ - `config.vm.network` syntax changed so that the first argument is now the type
5
+ of argument. Previously where you had `config.vm.network "33.33.33.10"` you
6
+ should now put `config.vm.network :hostonly, "33.33.33.10"`. This is in order
7
+ to support bridged networking, as well.
8
+ - `config.vm.forward_port` no longer requires a name parameter.
9
+ - Bridged networking. `config.vm.network` with `:bridged` as the option will
10
+ setup a bridged network.
11
+ - Host only networks can be configured with DHCP now. Specify `:dhcp` as
12
+ the IP and it will be done.
13
+ - `config.vm.customize` now takes a command to send to `VBoxManage`, so any
14
+ arbitrary command can be sent. The older style of passing a block no longer
15
+ works and Vagrant will give a proper error message if it notices this old-style
16
+ being used.
17
+ - `config.ssh.forwarded_port_key` is gone. Vagrant no longer cares about
18
+ forwarded port names for any reason. Please use `config.ssh.guest_port`
19
+ (more below).
20
+ - `config.ssh.forwarded_port_destination` has been replaced by
21
+ `config.ssh.guest_port` which more accurately reflects what it is
22
+ used for. Vagrant will automatically scan forwarded ports that match the
23
+ guest port to find the SSH port.
24
+ - Logging. The entire Vagrant source has had logging sprinkled throughout
25
+ to make debugging issues easier. To enable logging, set the VAGRANT_LOG
26
+ environmental variable to the log level you wish to see. By default,
27
+ logging is silent.
28
+ - `system` renamed to `guest` throughout the source. Any `config.vm.system`
29
+ configurations must be changed to `config.vm.guest`
30
+ - Puppet provisioner no longer defaults manifest to "box.pp." Instead, it
31
+ is now "default.pp"
32
+ - All Vagrant commands that take a VM name in a Multi-VM environment
33
+ can now be given a regular expression. If the name starts and ends with a "/"
34
+ then it is assumed to be a regular expression. [GH-573]
35
+ - Added a "--plain" flag to `vagrant ssh` which will cause Vagrant to not
36
+ perform any authentication. It will simply `ssh` into the proper IP and
37
+ port of the virtual machine.
38
+ - If a shared folder now has a `:create` flag set to `true`, the path on the
39
+ host will be created if it doesn't exist.
40
+ - Added `--force` flag to `box add`, which will overwite any existing boxes
41
+ if they exist. [GH-631]
42
+ - Added `--provision-with` to `up` which configures what provisioners run,
43
+ by shortcut. [GH-367]
44
+ - Arbitrary mount options can be passed with `:extra` to any shared
45
+ folders. [GH-551]
46
+ - Options passed after a `--` to `vagrant ssh` are now passed directly to
47
+ `ssh`. [GH-554]
48
+ - Ubuntu guests will now emit a `vagrant-mounted` upstart event after shared
49
+ folders are mounted.
50
+ - `attempts` is a new option on chef client and chef solo provisioners. This
51
+ will run the provisioner multiple times until erroring about failing
52
+ convergence. [GH-282]
53
+ - Removed Thor as a dependency for the command line interfaces. This resulted
54
+ in general speed increases across all command line commands.
55
+ - Linux uses `shutdown -h` instead of `halt` to hopefully more consistently
56
+ power off the system. [GH-575]
57
+ - Tweaks to SSH to hopefully be more reliable in coming up.
58
+ - Helpful error message when SCP is unavailable in the guest. [GH-568]
59
+ - Error message for improperly packaged box files. [GH-198]
60
+ - Copy insecure private key to user-owned directory so even
61
+ `sudo` installed Vagrant installations work. [GH-580]
62
+ - Provisioner stdout/stderr is now color coded based on stdout/stderr.
63
+ stdout is green, stderr is red. [GH-595]
64
+ - Chef solo now prompts users to run a `reload` if shared folders
65
+ are not found on the VM. [GH-253]
66
+ - "--no-provision" once again works for certain commands. [GH-591]
67
+ - Resuming a VM from a saved state will show an error message if there
68
+ would be port collisions. [GH-602]
69
+ - `vagrant ssh -c` will now exit with the same exit code as the command
70
+ run. [GH-598]
71
+ - `vagrant ssh -c` will now send stderr to stderr and stdout to stdout
72
+ on the host machine, instead of all output to stdout.
73
+ - `vagrant box add` path now accepts unexpanded shell paths such as
74
+ `~/foo` and will properly expand them. [GH-633]
75
+ - Vagrant can now be interrupted during the "importing" step.
76
+ - NFS exports will no longer be cleared when an expected error occurs. [GH-577]
77
+
1
78
  ## 0.8.10 (December 10, 2011)
2
79
 
3
80
  - Revert the SSH tweaks made in 0.8.8. It affected stability
4
- that I'd rather not test in a patch release.
5
81
 
6
82
  ## 0.8.8 (December 1, 2011)
7
83
 
data/Gemfile CHANGED
@@ -1,17 +1,3 @@
1
- require "rbconfig"
2
- platform = RbConfig::CONFIG["host_os"].downcase
3
-
4
1
  source "http://rubygems.org"
5
2
 
6
3
  gemspec
7
-
8
- # Use the following gems straight from git, since Vagrant dev
9
- # typically coincides with it
10
- gem "virtualbox", :git => "git://github.com/mitchellh/virtualbox.git"
11
-
12
- if platform.include?("mingw") || platform.include?("mswin")
13
- # JRuby requires these gems for development, but only
14
- # on windows.
15
- gem "jruby-openssl", "~> 0.7.4", :platforms => :jruby
16
- gem "jruby-win32ole", "~> 0.8.5", :platforms => :jruby
17
- end
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2010 Mitchell Hashimoto and John Bender
3
+ Copyright (c) 2010-2012Mitchell Hashimoto and John Bender
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,33 +1,60 @@
1
1
  #!/usr/bin/env ruby
2
+ require 'log4r'
2
3
  require 'vagrant'
3
4
  require 'vagrant/cli'
5
+ require 'vagrant/util/platform'
4
6
 
5
- env = Vagrant::Environment.new
7
+ # Create a logger right away
8
+ logger = Log4r::Logger.new("vagrant::bin::vagrant")
9
+ logger.info("`vagrant` invoked: #{ARGV.inspect}")
6
10
 
7
- begin
8
- # Begin logging early here
9
- env.logger.info("vagrant") { "`vagrant` invoked: #{ARGV.inspect}" }
11
+ # Stdout/stderr should not buffer output
12
+ $stdout.sync = true
13
+ $stderr.sync = true
10
14
 
11
- # Disable color if the proper argument was passed
12
- shell = nil
13
- if !$stdout.tty? || ARGV.include?("--no-color")
14
- shell = Thor::Shell::Basic.new
15
- else
16
- shell = Thor::Base.shell.new
17
- end
15
+ # These will be the options that are passed to initialze the Vagrant
16
+ # environment.
17
+ opts = {}
18
18
 
19
- # Set the UI early in case any errors are raised, and load
20
- # the config immediately, so we gather any new commands from
21
- # plugins
22
- env.ui = Vagrant::UI::Shell.new(env, shell)
19
+ # Disable color if the proper argument was passed or if we're
20
+ # on Windows since the default Windows terminal doesn't support
21
+ # colors.
22
+ if !$stdout.tty? || ARGV.include?("--no-color") || Vagrant::Util::Platform.windows?
23
+ # Delete the argument from the list so that it doesn't cause any
24
+ # invalid arguments down the road.
25
+ ARGV.delete("--no-color")
26
+ opts[:ui_class] = Vagrant::UI::Basic
27
+ else
28
+ opts[:ui_class] = Vagrant::UI::Colored
29
+ end
30
+
31
+ env = nil
32
+ begin
33
+ # Create the environment, which is the cwd of wherever the
34
+ # `vagrant` command was invoked from
35
+ logger.debug("Creating Vagrant environment")
36
+ env = Vagrant::Environment.new(opts)
37
+
38
+ # Load the environment
39
+ logger.debug("Loading environment")
23
40
  env.load!
24
41
 
25
- # Kick start the CLI
26
- Vagrant::CLI.start(ARGV, :env => env)
42
+ # Execute the CLI interface
43
+ env.cli(ARGV)
27
44
  rescue Vagrant::Errors::VagrantError => e
28
- opts = { :prefix => false }
29
- env.ui.error e.message, opts if e.message
30
- env.ui.error e.backtrace.join("\n"), opts if ENV["VAGRANT_DEBUG"]
45
+ logger.error("Vagrant experienced an error! Details:")
46
+ logger.error(e.inspect)
47
+ logger.error(e.message)
48
+ logger.error(e.backtrace.join("\n"))
49
+
50
+ if env
51
+ opts = { :prefix => false }
52
+ env.ui.error e.message, opts if e.message
53
+ else
54
+ $stderr.puts "Vagrant failed to initialize at a very early stage:\n\n"
55
+ $stderr.puts e.message
56
+ end
57
+
31
58
  exit e.status_code if e.respond_to?(:status_code)
32
59
  exit 999 # An error occurred with no status code defined
33
60
  end
@@ -2,30 +2,22 @@ Vagrant::Config.run do |config|
2
2
  # default config goes here
3
3
  config.vagrant.dotfile_name = ".vagrant"
4
4
  config.vagrant.host = :detect
5
- config.vagrant.ssh_session_cache = false
6
5
 
7
6
  config.ssh.username = "vagrant"
7
+ config.ssh.password = "vagrant"
8
8
  config.ssh.host = "127.0.0.1"
9
- config.ssh.forwarded_port_key = "ssh"
10
- config.ssh.forwarded_port_destination = 22
9
+ config.ssh.guest_port = 22
11
10
  config.ssh.max_tries = 100
12
- config.ssh.timeout = 7
13
- config.ssh.private_key_path = File.expand_path("keys/vagrant", Vagrant.source_root)
11
+ config.ssh.timeout = 10
14
12
  config.ssh.forward_agent = false
15
13
  config.ssh.forward_x11 = false
16
14
 
17
15
  config.vm.auto_port_range = (2200..2250)
18
- config.vm.box_ovf = "box.ovf"
19
16
  config.vm.box_url = nil
20
17
  config.vm.base_mac = nil
21
- config.vm.forward_port("ssh", 22, 2222, :auto => true)
22
- config.vm.boot_mode = "vrdp"
23
- config.vm.system = :linux
24
-
25
- config.vm.customize do |vm|
26
- # Make VM name the name of the containing folder by default
27
- vm.name = File.basename(config.env.cwd) + "_#{Time.now.to_i}"
28
- end
18
+ config.vm.forward_port 22, 2222, :name => "ssh", :auto => true
19
+ config.vm.boot_mode = "headless"
20
+ config.vm.guest = :linux
29
21
 
30
22
  # Share the root folder. This can then be overridden by
31
23
  # other Vagrantfiles, if they wish.
@@ -1,7 +1,36 @@
1
+ # Enable logging if it is requested. We do this before
2
+ # anything else so that we can setup the output before
3
+ # any logging occurs.
4
+ if ENV["VAGRANT_LOG"] && ENV["VAGRANT_LOG"] != ""
5
+ # Require Log4r and define the levels we'll be using
6
+ require 'log4r'
7
+ require 'log4r/config'
8
+ Log4r.define_levels(*Log4r::Log4rConfig::LogLevels)
9
+
10
+ level = nil
11
+ begin
12
+ level = Log4r.const_get(ENV["VAGRANT_LOG"].upcase)
13
+ rescue NameError
14
+ # This means that the logging constant wasn't found,
15
+ # which is fine. We just keep `level` as `nil`. But
16
+ # we tell the user.
17
+ $stderr.puts "Invalid VAGRANT_LOG level is set: #{ENV["VAGRANT_LOG"]}"
18
+ end
19
+
20
+ # Set the logging level on all "vagrant" namespaced
21
+ # logs as long as we have a valid level.
22
+ if level
23
+ logger = Log4r::Logger.new("vagrant")
24
+ logger.outputters = Log4r::Outputter.stdout
25
+ logger.level = level
26
+ logger = nil
27
+ end
28
+ end
29
+
1
30
  require 'pathname'
31
+ require 'childprocess'
2
32
  require 'json'
3
33
  require 'i18n'
4
- require 'virtualbox'
5
34
 
6
35
  # OpenSSL must be loaded here since when it is loaded via `autoload`
7
36
  # there are issues with ciphers not being properly loaded.
@@ -12,13 +41,19 @@ module Vagrant
12
41
  autoload :Box, 'vagrant/box'
13
42
  autoload :BoxCollection, 'vagrant/box_collection'
14
43
  autoload :CLI, 'vagrant/cli'
44
+ autoload :Command, 'vagrant/command'
45
+ autoload :Communication, 'vagrant/communication'
15
46
  autoload :Config, 'vagrant/config'
16
47
  autoload :DataStore, 'vagrant/data_store'
17
48
  autoload :Downloaders, 'vagrant/downloaders'
49
+ autoload :Driver, 'vagrant/driver'
18
50
  autoload :Environment, 'vagrant/environment'
19
51
  autoload :Errors, 'vagrant/errors'
52
+ autoload :Guest, 'vagrant/guest'
20
53
  autoload :Hosts, 'vagrant/hosts'
21
54
  autoload :Plugin, 'vagrant/plugin'
55
+ autoload :Provisioners, 'vagrant/provisioners'
56
+ autoload :Registry, 'vagrant/registry'
22
57
  autoload :SSH, 'vagrant/ssh'
23
58
  autoload :TestHelpers, 'vagrant/test_helpers'
24
59
  autoload :UI, 'vagrant/ui'
@@ -30,15 +65,107 @@ module Vagrant
30
65
  def self.source_root
31
66
  @source_root ||= Pathname.new(File.expand_path('../../', __FILE__))
32
67
  end
68
+
69
+ # Global registry of commands that are available via the CLI.
70
+ #
71
+ # This registry is used to look up the sub-commands that are available
72
+ # to Vagrant.
73
+ def self.commands
74
+ @commands ||= Registry.new
75
+ end
76
+
77
+ # Global registry of config keys that are available.
78
+ #
79
+ # This registry is used to look up the keys for `config` objects.
80
+ # For example, `config.vagrant` looks up the `:vagrant` config key
81
+ # for the configuration class to use.
82
+ def self.config_keys
83
+ @config_keys ||= Registry.new
84
+ end
85
+
86
+ # Global registry of available host classes and shortcut symbols
87
+ # associated with them.
88
+ #
89
+ # This registry is used to look up the shorcuts for `config.vagrant.host`,
90
+ # or to query all hosts for automatically detecting the host system.
91
+ # The registry is global to all of Vagrant.
92
+ def self.hosts
93
+ @hosts ||= Registry.new
94
+ end
95
+
96
+ # Global registry of available guest classes and shortcut symbols
97
+ # associated with them.
98
+ #
99
+ # This registry is used to look up the shortcuts for `config.vm.guest`.
100
+ def self.guests
101
+ @guests ||= Registry.new
102
+ end
103
+
104
+ # Global registry of provisioners.
105
+ #
106
+ # This registry is used to look up the provisioners provided for
107
+ # `config.vm.provision`.
108
+ def self.provisioners
109
+ @provisioners ||= Registry.new
110
+ end
33
111
  end
34
112
 
35
113
  # # Default I18n to load the en locale
36
114
  I18n.load_path << File.expand_path("templates/locales/en.yml", Vagrant.source_root)
37
115
 
116
+ # Register the built-in commands
117
+ Vagrant.commands.register(:box) { Vagrant::Command::Box }
118
+ Vagrant.commands.register(:destroy) { Vagrant::Command::Destroy }
119
+ Vagrant.commands.register(:halt) { Vagrant::Command::Halt }
120
+ Vagrant.commands.register(:init) { Vagrant::Command::Init }
121
+ Vagrant.commands.register(:package) { Vagrant::Command::Package }
122
+ Vagrant.commands.register(:provision) { Vagrant::Command::Provision }
123
+ Vagrant.commands.register(:reload) { Vagrant::Command::Reload }
124
+ Vagrant.commands.register(:resume) { Vagrant::Command::Resume }
125
+ Vagrant.commands.register(:ssh) { Vagrant::Command::SSH }
126
+ Vagrant.commands.register(:"ssh-config") { Vagrant::Command::SSHConfig }
127
+ Vagrant.commands.register(:status) { Vagrant::Command::Status }
128
+ Vagrant.commands.register(:suspend) { Vagrant::Command::Suspend }
129
+ Vagrant.commands.register(:up) { Vagrant::Command::Up }
130
+
131
+ # Register the built-in config keys
132
+ Vagrant.config_keys.register(:vagrant) { Vagrant::Config::VagrantConfig }
133
+ Vagrant.config_keys.register(:ssh) { Vagrant::Config::SSHConfig }
134
+ Vagrant.config_keys.register(:nfs) { Vagrant::Config::NFSConfig }
135
+ Vagrant.config_keys.register(:vm) { Vagrant::Config::VMConfig }
136
+ Vagrant.config_keys.register(:package) { Vagrant::Config::PackageConfig }
137
+
138
+ # Register the built-in hosts
139
+ Vagrant.hosts.register(:arch) { Vagrant::Hosts::Arch }
140
+ Vagrant.hosts.register(:bsd) { Vagrant::Hosts::BSD }
141
+ Vagrant.hosts.register(:fedora) { Vagrant::Hosts::Fedora }
142
+ Vagrant.hosts.register(:freebsd) { Vagrant::Hosts::FreeBSD }
143
+ Vagrant.hosts.register(:linux) { Vagrant::Hosts::Linux }
144
+ Vagrant.hosts.register(:windows) { Vagrant::Hosts::Windows }
145
+
146
+ # Register the built-in guests
147
+ Vagrant.guests.register(:arch) { Vagrant::Guest::Arch }
148
+ Vagrant.guests.register(:debian) { Vagrant::Guest::Debian }
149
+ Vagrant.guests.register(:freebsd) { Vagrant::Guest::FreeBSD }
150
+ Vagrant.guests.register(:gentoo) { Vagrant::Guest::Gentoo }
151
+ Vagrant.guests.register(:linux) { Vagrant::Guest::Linux }
152
+ Vagrant.guests.register(:redhat) { Vagrant::Guest::Redhat }
153
+ Vagrant.guests.register(:solaris) { Vagrant::Guest::Solaris }
154
+ Vagrant.guests.register(:suse) { Vagrant::Guest::Suse }
155
+ Vagrant.guests.register(:ubuntu) { Vagrant::Guest::Ubuntu }
156
+
157
+ # Register the built-in provisioners
158
+ Vagrant.provisioners.register(:chef_solo) { Vagrant::Provisioners::ChefSolo }
159
+ Vagrant.provisioners.register(:chef_client) { Vagrant::Provisioners::ChefClient }
160
+ Vagrant.provisioners.register(:puppet) { Vagrant::Provisioners::Puppet }
161
+ Vagrant.provisioners.register(:puppet_server) { Vagrant::Provisioners::PuppetServer }
162
+ Vagrant.provisioners.register(:shell) { Vagrant::Provisioners::Shell }
163
+
164
+ # Register the built-in systems
165
+ Vagrant.config_keys.register(:freebsd) { Vagrant::Guest::FreeBSD::FreeBSDConfig }
166
+ Vagrant.config_keys.register(:linux) { Vagrant::Guest::Linux::LinuxConfig }
167
+ Vagrant.config_keys.register(:solaris) { Vagrant::Guest::Solaris::SolarisConfig }
168
+
38
169
  # Load the things which must be loaded before anything else.
39
- require 'vagrant/command'
40
- require 'vagrant/provisioners'
41
- require 'vagrant/systems'
42
170
  require 'vagrant/version'
43
- Vagrant::Action.builtin!
44
171
  Vagrant::Plugin.load!
@@ -1,138 +1,60 @@
1
1
  require 'vagrant/action/builder'
2
2
  require 'vagrant/action/builtin'
3
3
 
4
- # The builtin middlewares
5
- require 'vagrant/action/box'
6
- require 'vagrant/action/env'
7
- require 'vagrant/action/general'
8
- require 'vagrant/action/vm'
9
-
10
4
  module Vagrant
11
- # Manages action running and registration. Every Vagrant environment
12
- # has an instance of {Action} to allow for running in the context of
13
- # the environment, which is accessible at {Environment#actions}. Actions
14
- # are the foundation of most functionality in Vagrant, and are implemented
15
- # architecturally as "middleware."
16
- #
17
- # # Registering an Action
18
- #
19
- # The main benefits of registering an action is the ability to retrieve and
20
- # modify that registered action, as well as easily run the action. An example
21
- # of registering an action is shown below, with a simple middleware which just
22
- # outputs to `STDOUT`:
23
- #
24
- # class StdoutMiddleware
25
- # def initialize(app, env)
26
- # @app = app
27
- # end
28
- #
29
- # def call(env)
30
- # puts "HI!"
31
- # @app.call(env)
32
- # end
33
- # end
34
- #
35
- # Vagrant::Action.register(:stdout, StdoutMiddleware)
36
- #
37
- # Then to run a registered action, assuming `env` is a loaded {Environment}:
38
- #
39
- # env.actions.run(:stdout)
40
- #
41
- # Or to retrieve the action class for any reason:
42
- #
43
- # Vagrant::Action[:stdout]
44
- #
45
- # # Running an Action
46
- #
47
- # There are various built-in registered actions such as `start`, `stop`, `up`,
48
- # etc. Actions are built to be run in the context of an environment, so use
49
- # {Environment#actions} to run all actions. Then simply call {#run}:
50
- #
51
- # env.actions.run(:name)
52
- #
53
- # Where `:name` is the name of the registered action.
54
- #
55
- class Action
5
+ module Action
56
6
  autoload :Environment, 'vagrant/action/environment'
7
+ autoload :Runner, 'vagrant/action/runner'
57
8
  autoload :Warden, 'vagrant/action/warden'
58
9
 
59
- include Util
60
- @@reported_interrupt = false
61
-
62
- class << self
63
- # Returns the list of registered actions.
64
- #
65
- # @return [Array]
66
- def actions
67
- @actions ||= {}
68
- end
69
-
70
- # Registers an action and associates it with a symbol. This
71
- # symbol can then be referenced in other action builds and
72
- # callbacks can be registered on that symbol.
73
- #
74
- # @param [Symbol] key
75
- def register(key, callable)
76
- actions[key.to_sym] = callable
77
- end
78
-
79
- # Retrieves a registered action by key.
80
- #
81
- # @param [Symbol] key
82
- def [](key)
83
- actions[key.to_sym]
84
- end
10
+ module Box
11
+ autoload :Destroy, 'vagrant/action/box/destroy'
12
+ autoload :Download, 'vagrant/action/box/download'
13
+ autoload :Package, 'vagrant/action/box/package'
14
+ autoload :Unpackage, 'vagrant/action/box/unpackage'
15
+ autoload :Verify, 'vagrant/action/box/verify'
85
16
  end
86
17
 
87
- # The environment to run the actions in.
88
- attr_reader :env
89
-
90
- # Initializes the action with the given environment which the actions
91
- # will be run in.
92
- #
93
- # @param [Environment] env
94
- def initialize(env)
95
- @env = env
18
+ module Env
19
+ autoload :Set, 'vagrant/action/env/set'
96
20
  end
97
21
 
98
- # Runs the given callable object in the context of the environment.
99
- # If a symbol is given as the `callable` parameter, then it is looked
100
- # up in the registered actions list which are registered with {register}.
101
- #
102
- # Any options given are injected into the environment hash.
103
- #
104
- # @param [Object] callable An object which responds to `call`.
105
- def run(callable_id, options=nil)
106
- callable = callable_id
107
- callable = Builder.new.use(callable_id) if callable_id.kind_of?(Class)
108
- callable = self.class.actions[callable_id] if callable_id.kind_of?(Symbol)
109
- raise ArgumentError, "Argument to run must be a callable object or registered action." if !callable || !callable.respond_to?(:call)
110
-
111
- action_environment = Action::Environment.new(env)
112
- action_environment.merge!(options || {})
113
-
114
- # Run the before action run callback, if we're not doing that already
115
- run(:before_action_run, action_environment) if callable_id != :before_action_run
116
-
117
- # Run the action chain in a busy block, marking the environment as
118
- # interrupted if a SIGINT occurs, and exiting cleanly once the
119
- # chain has been run.
120
- int_callback = lambda do
121
- if action_environment.interrupted?
122
- env.ui.error I18n.t("vagrant.actions.runner.exit_immediately")
123
- abort
124
- end
125
-
126
- env.ui.warn I18n.t("vagrant.actions.runner.waiting_cleanup") if !@@reported_interrupt
127
- action_environment.interrupt!
128
- @@reported_interrupt = true
129
- end
22
+ module General
23
+ autoload :Package, 'vagrant/action/general/package'
24
+ autoload :Validate, 'vagrant/action/general/validate'
25
+ end
130
26
 
131
- # We place a process lock around every action that is called
132
- env.logger.info "Running action: #{callable_id}"
133
- env.lock do
134
- Busy.busy(int_callback) { callable.call(action_environment) }
135
- end
27
+ module VM
28
+ autoload :Boot, 'vagrant/action/vm/boot'
29
+ autoload :CheckAccessible, 'vagrant/action/vm/check_accessible'
30
+ autoload :CheckBox, 'vagrant/action/vm/check_box'
31
+ autoload :CheckGuestAdditions, 'vagrant/action/vm/check_guest_additions'
32
+ autoload :CheckPortCollisions, 'vagrant/action/vm/check_port_collisions'
33
+ autoload :CleanMachineFolder, 'vagrant/action/vm/clean_machine_folder'
34
+ autoload :ClearForwardedPorts, 'vagrant/action/vm/clear_forwarded_ports'
35
+ autoload :ClearNetworkInterfaces, 'vagrant/action/vm/clear_network_interfaces'
36
+ autoload :ClearSharedFolders, 'vagrant/action/vm/clear_shared_folders'
37
+ autoload :Customize, 'vagrant/action/vm/customize'
38
+ autoload :Destroy, 'vagrant/action/vm/destroy'
39
+ autoload :DestroyUnusedNetworkInterfaces, 'vagrant/action/vm/destroy_unused_network_interfaces'
40
+ autoload :DiscardState, 'vagrant/action/vm/discard_state'
41
+ autoload :Export, 'vagrant/action/vm/export'
42
+ autoload :ForwardPorts, 'vagrant/action/vm/forward_ports'
43
+ autoload :Halt, 'vagrant/action/vm/halt'
44
+ autoload :HostName, 'vagrant/action/vm/host_name'
45
+ autoload :Import, 'vagrant/action/vm/import'
46
+ autoload :MatchMACAddress, 'vagrant/action/vm/match_mac_address'
47
+ autoload :Network, 'vagrant/action/vm/network'
48
+ autoload :NFS, 'vagrant/action/vm/nfs'
49
+ autoload :Package, 'vagrant/action/vm/package'
50
+ autoload :PackageVagrantfile, 'vagrant/action/vm/package_vagrantfile'
51
+ autoload :Provision, 'vagrant/action/vm/provision'
52
+ autoload :ProvisionerCleanup, 'vagrant/action/vm/provisioner_cleanup'
53
+ autoload :PruneNFSExports, 'vagrant/action/vm/prune_nfs_exports'
54
+ autoload :Resume, 'vagrant/action/vm/resume'
55
+ autoload :ShareFolders, 'vagrant/action/vm/share_folders'
56
+ autoload :SetupPackageFiles, 'vagrant/action/vm/setup_package_files'
57
+ autoload :Suspend, 'vagrant/action/vm/suspend'
136
58
  end
137
59
  end
138
60
  end