tnargav 1.2.3 → 1.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (380) hide show
  1. data/.gitignore +19 -3
  2. data/CHANGELOG.md +311 -0
  3. data/bin/vagrant +12 -0
  4. data/config/default.rb +2 -4
  5. data/keys/README.md +0 -7
  6. data/lib/vagrant.rb +7 -0
  7. data/lib/vagrant/action.rb +2 -0
  8. data/lib/vagrant/action/builtin/box_add.rb +12 -1
  9. data/lib/vagrant/action/builtin/confirm.rb +1 -0
  10. data/lib/vagrant/action/builtin/graceful_halt.rb +9 -5
  11. data/lib/vagrant/action/builtin/handle_box_url.rb +16 -7
  12. data/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb +1 -1
  13. data/lib/vagrant/action/builtin/mixin_provisioners.rb +43 -0
  14. data/lib/vagrant/action/builtin/nfs.rb +18 -8
  15. data/lib/vagrant/action/builtin/provision.rb +30 -21
  16. data/lib/vagrant/action/builtin/provisioner_cleanup.rb +35 -0
  17. data/lib/vagrant/action/builtin/wait_for_communicator.rb +84 -0
  18. data/lib/vagrant/action/warden.rb +2 -1
  19. data/lib/vagrant/box_collection.rb +62 -44
  20. data/lib/vagrant/cli.rb +1 -9
  21. data/lib/vagrant/config/v2/root.rb +6 -0
  22. data/lib/vagrant/environment.rb +27 -51
  23. data/lib/vagrant/errors.rb +33 -1
  24. data/lib/vagrant/guest.rb +2 -2
  25. data/lib/vagrant/machine.rb +14 -22
  26. data/lib/vagrant/plugin/v2/command.rb +4 -1
  27. data/lib/vagrant/plugin/v2/communicator.rb +21 -0
  28. data/lib/vagrant/plugin/v2/guest.rb +1 -56
  29. data/lib/vagrant/plugin/v2/provisioner.rb +6 -0
  30. data/lib/vagrant/util/downloader.rb +7 -2
  31. data/lib/vagrant/util/platform.rb +43 -0
  32. data/lib/vagrant/util/ssh.rb +5 -0
  33. data/lib/vagrant/util/subprocess.rb +16 -2
  34. data/lib/vagrant/version.rb +1 -1
  35. data/plugins/commands/box/command/remove.rb +22 -2
  36. data/plugins/commands/box/command/repackage.rb +1 -1
  37. data/plugins/commands/destroy/command.rb +8 -3
  38. data/plugins/commands/help/command.rb +12 -0
  39. data/plugins/commands/help/plugin.rb +17 -0
  40. data/plugins/commands/plugin/action.rb +11 -0
  41. data/plugins/commands/plugin/action/install_gem.rb +26 -1
  42. data/plugins/commands/plugin/action/plugin_exists_check.rb +26 -0
  43. data/plugins/commands/plugin/command/install.rb +4 -21
  44. data/plugins/commands/plugin/command/mixin_install_opts.rb +30 -0
  45. data/plugins/commands/plugin/command/root.rb +5 -0
  46. data/plugins/commands/plugin/command/update.rb +41 -0
  47. data/plugins/commands/reload/command.rb +4 -0
  48. data/plugins/commands/status/command.rb +6 -1
  49. data/plugins/commands/up/command.rb +10 -0
  50. data/plugins/commands/up/start_mixins.rb +12 -1
  51. data/plugins/communicators/ssh/communicator.rb +61 -6
  52. data/plugins/guests/arch/cap/change_host_name.rb +1 -2
  53. data/plugins/guests/arch/cap/configure_networks.rb +6 -0
  54. data/plugins/guests/coreos/cap/change_host_name.rb +15 -0
  55. data/plugins/guests/coreos/cap/configure_networks.rb +72 -0
  56. data/plugins/guests/coreos/guest.rb +9 -0
  57. data/plugins/guests/coreos/plugin.rb +25 -0
  58. data/plugins/guests/darwin/cap/change_host_name.rb +14 -0
  59. data/plugins/guests/darwin/cap/configure_networks.rb +52 -0
  60. data/plugins/guests/darwin/cap/halt.rb +16 -0
  61. data/plugins/guests/darwin/cap/mount_nfs_folder.rb +25 -0
  62. data/plugins/guests/darwin/cap/mount_vmware_shared_folder.rb +36 -0
  63. data/plugins/guests/darwin/cap/shell_expand_guest_path.rb +26 -0
  64. data/plugins/guests/darwin/cap/verify_vmware_hgfs.rb +12 -0
  65. data/plugins/guests/darwin/guest.rb +15 -0
  66. data/plugins/guests/darwin/plugin.rb +50 -0
  67. data/plugins/guests/debian/cap/change_host_name.rb +1 -0
  68. data/plugins/guests/gentoo/guest.rb +1 -1
  69. data/plugins/guests/linux/cap/mount_nfs.rb +9 -1
  70. data/plugins/guests/linux/cap/mount_virtualbox_shared_folder.rb +26 -7
  71. data/plugins/guests/linux/cap/shell_expand_guest_path.rb +4 -1
  72. data/plugins/guests/openbsd/cap/change_host_name.rb +14 -0
  73. data/plugins/guests/openbsd/cap/configure_networks.rb +40 -0
  74. data/plugins/guests/openbsd/cap/mount_nfs_folder.rb +14 -0
  75. data/plugins/guests/openbsd/plugin.rb +15 -0
  76. data/plugins/guests/solaris/cap/halt.rb +2 -1
  77. data/plugins/guests/solaris/cap/mount_virtualbox_shared_folder.rb +4 -1
  78. data/plugins/guests/solaris11/cap/change_host_name.rb +25 -0
  79. data/plugins/guests/solaris11/cap/configure_networks.rb +32 -0
  80. data/plugins/guests/solaris11/cap/halt.rb +26 -0
  81. data/plugins/guests/solaris11/cap/mount_virtualbox_shared_folder.rb +35 -0
  82. data/plugins/guests/solaris11/config.rb +22 -0
  83. data/plugins/guests/solaris11/guest.rb +15 -0
  84. data/plugins/guests/solaris11/plugin.rb +44 -0
  85. data/plugins/guests/suse/cap/configure_networks.rb +60 -0
  86. data/plugins/guests/suse/plugin.rb +5 -0
  87. data/plugins/guests/ubuntu/cap/change_host_name.rb +1 -0
  88. data/plugins/guests/ubuntu/cap/mount_nfs.rb +19 -0
  89. data/plugins/guests/ubuntu/cap/mount_virtualbox_shared_folder.rb +14 -0
  90. data/plugins/guests/ubuntu/guest.rb +0 -19
  91. data/plugins/guests/ubuntu/plugin.rb +10 -0
  92. data/plugins/hosts/arch/host.rb +5 -28
  93. data/plugins/hosts/bsd/host.rb +83 -7
  94. data/plugins/hosts/fedora/host.rb +12 -6
  95. data/plugins/hosts/gentoo/host.rb +3 -1
  96. data/plugins/hosts/linux/host.rb +42 -9
  97. data/plugins/hosts/opensuse/host.rb +3 -1
  98. data/plugins/hosts/slackware/host.rb +26 -0
  99. data/plugins/hosts/slackware/plugin.rb +15 -0
  100. data/plugins/kernel_v1/config/ssh.rb +2 -2
  101. data/plugins/kernel_v2/config/ssh.rb +8 -16
  102. data/plugins/kernel_v2/config/vm.rb +68 -11
  103. data/plugins/providers/virtualbox/action.rb +15 -2
  104. data/plugins/providers/virtualbox/action/boot.rb +0 -26
  105. data/plugins/providers/virtualbox/action/clear_network_interfaces.rb +1 -1
  106. data/plugins/providers/virtualbox/action/customize.rb +10 -3
  107. data/plugins/providers/virtualbox/action/destroy_unused_network_interfaces.rb +8 -1
  108. data/plugins/providers/virtualbox/action/forward_ports.rb +1 -0
  109. data/plugins/providers/virtualbox/action/import.rb +3 -0
  110. data/plugins/providers/virtualbox/action/network.rb +14 -2
  111. data/plugins/providers/virtualbox/action/prepare_nfs_settings.rb +7 -2
  112. data/plugins/providers/virtualbox/action/set_name.rb +13 -1
  113. data/plugins/providers/virtualbox/config.rb +39 -2
  114. data/plugins/providers/virtualbox/driver/base.rb +5 -0
  115. data/plugins/providers/virtualbox/driver/meta.rb +7 -1
  116. data/plugins/providers/virtualbox/driver/version_4_0.rb +2 -2
  117. data/plugins/providers/virtualbox/driver/version_4_1.rb +2 -2
  118. data/plugins/providers/virtualbox/driver/version_4_2.rb +17 -0
  119. data/plugins/providers/virtualbox/model/forwarded_port.rb +7 -1
  120. data/plugins/providers/virtualbox/util/compile_forwarded_ports.rb +5 -1
  121. data/plugins/provisioners/ansible/config.rb +40 -23
  122. data/plugins/provisioners/ansible/provisioner.rb +68 -13
  123. data/plugins/provisioners/cfengine/cap/debian/cfengine_install.rb +1 -1
  124. data/plugins/provisioners/cfengine/cap/redhat/cfengine_install.rb +1 -1
  125. data/plugins/provisioners/cfengine/config.rb +7 -1
  126. data/plugins/provisioners/cfengine/provisioner.rb +4 -5
  127. data/plugins/provisioners/chef/config/base.rb +31 -0
  128. data/plugins/provisioners/chef/config/chef_client.rb +15 -6
  129. data/plugins/provisioners/chef/config/chef_solo.rb +18 -11
  130. data/plugins/provisioners/chef/provisioner/base.rb +23 -3
  131. data/plugins/provisioners/chef/provisioner/chef_client.rb +25 -6
  132. data/plugins/provisioners/chef/provisioner/chef_solo.rb +16 -13
  133. data/plugins/provisioners/file/config.rb +29 -0
  134. data/plugins/provisioners/file/plugin.rb +23 -0
  135. data/plugins/provisioners/file/provisioner.rb +16 -0
  136. data/plugins/provisioners/puppet/config/puppet.rb +4 -1
  137. data/plugins/provisioners/puppet/provisioner/puppet.rb +15 -9
  138. data/plugins/provisioners/puppet/provisioner/puppet_server.rb +9 -2
  139. data/plugins/provisioners/salt/bootstrap-salt.sh +6 -0
  140. data/plugins/provisioners/salt/config.rb +105 -0
  141. data/plugins/provisioners/salt/errors.rb +11 -0
  142. data/plugins/provisioners/salt/plugin.rb +22 -0
  143. data/plugins/provisioners/salt/provisioner.rb +249 -0
  144. data/plugins/provisioners/shell/config.rb +11 -2
  145. data/plugins/provisioners/shell/provisioner.rb +15 -3
  146. data/scripts/website_push_docs.sh +12 -0
  147. data/scripts/website_push_www.sh +12 -0
  148. data/templates/commands/init/Vagrantfile.erb +5 -2
  149. data/templates/commands/ssh_config/config.erb +4 -0
  150. data/templates/guests/coreos/etcd.service.erb +10 -0
  151. data/templates/guests/fedora/network_static.erb +2 -3
  152. data/templates/guests/openbsd/network_dhcp.erb +1 -0
  153. data/templates/guests/openbsd/network_static.erb +1 -0
  154. data/templates/guests/suse/network_dhcp.erb +6 -0
  155. data/templates/guests/suse/network_static.erb +10 -0
  156. data/templates/locales/en.yml +123 -13
  157. data/templates/nfs/exports.erb +4 -4
  158. data/templates/nfs/exports_freebsd.erb +4 -4
  159. data/templates/nfs/exports_linux.erb +5 -3
  160. data/templates/provisioners/chef_client/client.erb +9 -0
  161. data/templates/provisioners/chef_solo/solo.erb +19 -1
  162. data/test/unit/vagrant/action/builtin/graceful_halt_test.rb +1 -2
  163. data/test/unit/vagrant/cli_test.rb +1 -0
  164. data/test/unit/vagrant/config/v2/root_test.rb +18 -0
  165. data/test/unit/vagrant/environment_test.rb +25 -0
  166. data/test/unit/vagrant/util/downloader_test.rb +4 -4
  167. data/test/unit/vagrant_test.rb +18 -0
  168. data/website/docs/.buildpacks +2 -0
  169. data/website/docs/Gemfile +13 -0
  170. data/website/docs/Gemfile.lock +141 -0
  171. data/website/docs/Procfile +1 -0
  172. data/website/docs/README.md +26 -0
  173. data/website/docs/config.rb +78 -0
  174. data/website/docs/config.ru +44 -0
  175. data/website/docs/helpers/sidebar_helpers.rb +19 -0
  176. data/website/docs/lib/redirect_to_latest.rb +25 -0
  177. data/website/docs/lib/redirect_v1_docs.rb +26 -0
  178. data/website/docs/source/404.html.erb +7 -0
  179. data/website/docs/source/images/bullet_1.png +0 -0
  180. data/website/docs/source/images/bullet_2.png +0 -0
  181. data/website/docs/source/images/bullet_3.png +0 -0
  182. data/website/docs/source/images/customers.png +0 -0
  183. data/website/docs/source/images/customers_small.png +0 -0
  184. data/website/docs/source/images/footer_background.png +0 -0
  185. data/website/docs/source/images/footer_hashi_logo.png +0 -0
  186. data/website/docs/source/images/footer_vagrant_logo.png +0 -0
  187. data/website/docs/source/images/get_started_background.png +0 -0
  188. data/website/docs/source/images/icon_caution.png +0 -0
  189. data/website/docs/source/images/logo_docs.png +0 -0
  190. data/website/docs/source/images/logo_docs_small.png +0 -0
  191. data/website/docs/source/images/logo_small.png +0 -0
  192. data/website/docs/source/images/logo_vagrant.png +0 -0
  193. data/website/docs/source/images/open_close.png +0 -0
  194. data/website/docs/source/images/search_icon.png +0 -0
  195. data/website/docs/source/images/sidebar_background_docs.png +0 -0
  196. data/website/docs/source/images/sidebar_background_inner.png +0 -0
  197. data/website/docs/source/images/steps_background.png +0 -0
  198. data/website/docs/source/images/vagrant_header_background.png +0 -0
  199. data/website/docs/source/index.html.erb +0 -0
  200. data/website/docs/source/javascripts/backstretch.js +4 -0
  201. data/website/docs/source/javascripts/bootstrap.min.js +7 -0
  202. data/website/docs/source/javascripts/fittext.js +43 -0
  203. data/website/docs/source/javascripts/grid-overlay.js +161 -0
  204. data/website/docs/source/javascripts/jquery.js +2 -0
  205. data/website/docs/source/javascripts/less-1.3.0.min.js +9 -0
  206. data/website/docs/source/javascripts/modernizr.js +1384 -0
  207. data/website/docs/source/javascripts/vagrantup.js +15 -0
  208. data/website/docs/source/layouts/layout.erb +266 -0
  209. data/website/docs/source/stylesheets/_base.less +317 -0
  210. data/website/docs/source/stylesheets/_components.less +74 -0
  211. data/website/docs/source/stylesheets/_footer.less +101 -0
  212. data/website/docs/source/stylesheets/_media-queries.less +452 -0
  213. data/website/docs/source/stylesheets/_mixins.less +174 -0
  214. data/website/docs/source/stylesheets/_nav.less +71 -0
  215. data/website/docs/source/stylesheets/_pages.less +276 -0
  216. data/website/docs/source/stylesheets/_sidebar.less +136 -0
  217. data/website/docs/source/stylesheets/_type.less +36 -0
  218. data/website/docs/source/stylesheets/_variables.less +39 -0
  219. data/website/docs/source/stylesheets/bootstrap.css +5946 -0
  220. data/website/docs/source/stylesheets/vagrantup.less +16 -0
  221. data/website/docs/source/v2/boxes.html.md +78 -0
  222. data/website/docs/source/v2/boxes/format.html.md +32 -0
  223. data/website/docs/source/v2/cli/box.html.md +62 -0
  224. data/website/docs/source/v2/cli/destroy.html.md +20 -0
  225. data/website/docs/source/v2/cli/halt.html.md +19 -0
  226. data/website/docs/source/v2/cli/index.html.md +24 -0
  227. data/website/docs/source/v2/cli/init.html.md +18 -0
  228. data/website/docs/source/v2/cli/package.html.md +43 -0
  229. data/website/docs/source/v2/cli/plugin.html.md +56 -0
  230. data/website/docs/source/v2/cli/provision.html.md +24 -0
  231. data/website/docs/source/v2/cli/reload.html.md +27 -0
  232. data/website/docs/source/v2/cli/resume.html.md +11 -0
  233. data/website/docs/source/v2/cli/ssh.html.md +24 -0
  234. data/website/docs/source/v2/cli/ssh_config.html.md +16 -0
  235. data/website/docs/source/v2/cli/status.html.md +14 -0
  236. data/website/docs/source/v2/cli/suspend.html.md +19 -0
  237. data/website/docs/source/v2/cli/up.html.md +34 -0
  238. data/website/docs/source/v2/debugging.html.md +42 -0
  239. data/website/docs/source/v2/getting-started/boxes.html.md +56 -0
  240. data/website/docs/source/v2/getting-started/index.html.md +43 -0
  241. data/website/docs/source/v2/getting-started/networking.html.md +45 -0
  242. data/website/docs/source/v2/getting-started/project_setup.html.md +38 -0
  243. data/website/docs/source/v2/getting-started/providers.html.md +37 -0
  244. data/website/docs/source/v2/getting-started/provisioning.html.md +75 -0
  245. data/website/docs/source/v2/getting-started/rebuild.html.md +17 -0
  246. data/website/docs/source/v2/getting-started/synced_folders.html.md +42 -0
  247. data/website/docs/source/v2/getting-started/teardown.html.md +41 -0
  248. data/website/docs/source/v2/getting-started/up.html.md +35 -0
  249. data/website/docs/source/v2/index.html.md +10 -0
  250. data/website/docs/source/v2/installation/backwards-compatibility.html.md +35 -0
  251. data/website/docs/source/v2/installation/index.html.md +28 -0
  252. data/website/docs/source/v2/installation/uninstallation.html.md +39 -0
  253. data/website/docs/source/v2/installation/upgrading-from-1-0.html.md +26 -0
  254. data/website/docs/source/v2/installation/upgrading.html.md +20 -0
  255. data/website/docs/source/v2/multi-machine/index.html.md +105 -0
  256. data/website/docs/source/v2/networking/basic_usage.html.md +43 -0
  257. data/website/docs/source/v2/networking/forwarded_ports.html.md +57 -0
  258. data/website/docs/source/v2/networking/index.html.md +40 -0
  259. data/website/docs/source/v2/networking/private_network.html.md +48 -0
  260. data/website/docs/source/v2/networking/public_network.html.md +53 -0
  261. data/website/docs/source/v2/plugins/commands.html.md +116 -0
  262. data/website/docs/source/v2/plugins/configuration.html.md +166 -0
  263. data/website/docs/source/v2/plugins/development-basics.html.md +139 -0
  264. data/website/docs/source/v2/plugins/guest-capabilities.html.md +100 -0
  265. data/website/docs/source/v2/plugins/guests.html.md +99 -0
  266. data/website/docs/source/v2/plugins/hosts.html.md +46 -0
  267. data/website/docs/source/v2/plugins/index.html.md +21 -0
  268. data/website/docs/source/v2/plugins/packaging.html.md +102 -0
  269. data/website/docs/source/v2/plugins/providers.html.md +234 -0
  270. data/website/docs/source/v2/plugins/provisioners.html.md +64 -0
  271. data/website/docs/source/v2/plugins/usage.html.md +58 -0
  272. data/website/docs/source/v2/providers/basic_usage.html.md +67 -0
  273. data/website/docs/source/v2/providers/configuration.html.md +89 -0
  274. data/website/docs/source/v2/providers/custom.html.md +9 -0
  275. data/website/docs/source/v2/providers/default.html.md +22 -0
  276. data/website/docs/source/v2/providers/index.html.md +23 -0
  277. data/website/docs/source/v2/providers/installation.html.md +11 -0
  278. data/website/docs/source/v2/provisioning/ansible.html.md +144 -0
  279. data/website/docs/source/v2/provisioning/basic_usage.html.md +67 -0
  280. data/website/docs/source/v2/provisioning/chef_client.html.md +109 -0
  281. data/website/docs/source/v2/provisioning/chef_solo.html.md +156 -0
  282. data/website/docs/source/v2/provisioning/index.html.md +28 -0
  283. data/website/docs/source/v2/provisioning/puppet_agent.html.md +70 -0
  284. data/website/docs/source/v2/provisioning/puppet_apply.html.md +114 -0
  285. data/website/docs/source/v2/provisioning/shell.html.md +88 -0
  286. data/website/docs/source/v2/synced-folders/basic_usage.html.md +53 -0
  287. data/website/docs/source/v2/synced-folders/index.html.md +17 -0
  288. data/website/docs/source/v2/synced-folders/nfs.html.md +53 -0
  289. data/website/docs/source/v2/vagrantfile/index.html.md +75 -0
  290. data/website/docs/source/v2/vagrantfile/machine_settings.html.md +84 -0
  291. data/website/docs/source/v2/vagrantfile/ssh_settings.html.md +61 -0
  292. data/website/docs/source/v2/vagrantfile/vagrant_settings.html.md +19 -0
  293. data/website/docs/source/v2/vagrantfile/version.html.md +64 -0
  294. data/website/docs/source/v2/virtualbox/boxes.html.md +71 -0
  295. data/website/docs/source/v2/virtualbox/configuration.html.md +63 -0
  296. data/website/docs/source/v2/virtualbox/index.html.md +21 -0
  297. data/website/docs/source/v2/virtualbox/usage.html.md +12 -0
  298. data/website/docs/source/v2/vmware/boxes.html.md +107 -0
  299. data/website/docs/source/v2/vmware/configuration.html.md +91 -0
  300. data/website/docs/source/v2/vmware/index.html.md +30 -0
  301. data/website/docs/source/v2/vmware/installation.html.md +40 -0
  302. data/website/docs/source/v2/vmware/known-issues.html.md +21 -0
  303. data/website/docs/source/v2/vmware/usage.html.md +27 -0
  304. data/website/docs/source/v2/why-vagrant/index.html.md +46 -0
  305. data/website/www/.buildpacks +2 -0
  306. data/website/www/Gemfile +15 -0
  307. data/website/www/Gemfile.lock +123 -0
  308. data/website/www/Procfile +1 -0
  309. data/website/www/README.md +26 -0
  310. data/website/www/config.rb +88 -0
  311. data/website/www/config.ru +39 -0
  312. data/website/www/helpers/sidebar_helpers.rb +12 -0
  313. data/website/www/lib/legacy_redirect.rb +32 -0
  314. data/website/www/source/404.html.erb +11 -0
  315. data/website/www/source/_sidebar_about.erb +5 -0
  316. data/website/www/source/_sidebar_blog.erb +11 -0
  317. data/website/www/source/_sidebar_support.html.erb +6 -0
  318. data/website/www/source/about.html.markdown +16 -0
  319. data/website/www/source/blog.html.erb +34 -0
  320. data/website/www/source/blog/2013-09-16-test.html.markdown +26 -0
  321. data/website/www/source/blog_feed.xml.builder +23 -0
  322. data/website/www/source/images/bullet_1.png +0 -0
  323. data/website/www/source/images/bullet_2.png +0 -0
  324. data/website/www/source/images/bullet_3.png +0 -0
  325. data/website/www/source/images/customers.png +0 -0
  326. data/website/www/source/images/customers_small.png +0 -0
  327. data/website/www/source/images/footer_background.png +0 -0
  328. data/website/www/source/images/footer_hashi_logo.png +0 -0
  329. data/website/www/source/images/footer_vagrant_logo.png +0 -0
  330. data/website/www/source/images/get_started_background.png +0 -0
  331. data/website/www/source/images/icon_caution.png +0 -0
  332. data/website/www/source/images/logo_docs.png +0 -0
  333. data/website/www/source/images/logo_docs_small.png +0 -0
  334. data/website/www/source/images/logo_small.png +0 -0
  335. data/website/www/source/images/logo_vagrant.png +0 -0
  336. data/website/www/source/images/open_close.png +0 -0
  337. data/website/www/source/images/search_icon.png +0 -0
  338. data/website/www/source/images/sidebar_background_docs.png +0 -0
  339. data/website/www/source/images/sidebar_background_inner.png +0 -0
  340. data/website/www/source/images/sponsors/fastly.png +0 -0
  341. data/website/www/source/images/sponsors/kiip.png +0 -0
  342. data/website/www/source/images/sponsors/softlayer.jpg +0 -0
  343. data/website/www/source/images/sponsors/typekit.png +0 -0
  344. data/website/www/source/images/steps_background.png +0 -0
  345. data/website/www/source/images/vagrant_header_background.png +0 -0
  346. data/website/www/source/images/vagrant_vmware_background.png +0 -0
  347. data/website/www/source/index.html.erb +109 -0
  348. data/website/www/source/javascripts/backstretch.js +4 -0
  349. data/website/www/source/javascripts/bootstrap.min.js +7 -0
  350. data/website/www/source/javascripts/fittext.js +43 -0
  351. data/website/www/source/javascripts/grid-overlay.js +161 -0
  352. data/website/www/source/javascripts/jquery.js +2 -0
  353. data/website/www/source/javascripts/less-1.3.0.min.js +9 -0
  354. data/website/www/source/javascripts/modernizr.js +1384 -0
  355. data/website/www/source/javascripts/vagrantup.js +58 -0
  356. data/website/www/source/layouts/blog_post.erb +42 -0
  357. data/website/www/source/layouts/inner.erb +34 -0
  358. data/website/www/source/layouts/layout.erb +107 -0
  359. data/website/www/source/sponsors.html.erb +23 -0
  360. data/website/www/source/stylesheets/_base.less +326 -0
  361. data/website/www/source/stylesheets/_components.less +74 -0
  362. data/website/www/source/stylesheets/_footer.less +101 -0
  363. data/website/www/source/stylesheets/_media-queries.less +549 -0
  364. data/website/www/source/stylesheets/_mixins.less +175 -0
  365. data/website/www/source/stylesheets/_modules.less +37 -0
  366. data/website/www/source/stylesheets/_nav.less +74 -0
  367. data/website/www/source/stylesheets/_pages.less +467 -0
  368. data/website/www/source/stylesheets/_sidebar.less +137 -0
  369. data/website/www/source/stylesheets/_type.less +36 -0
  370. data/website/www/source/stylesheets/_variables.less +39 -0
  371. data/website/www/source/stylesheets/bootstrap.css +5946 -0
  372. data/website/www/source/stylesheets/vagrantup.less +17 -0
  373. data/website/www/source/support.html.erb +25 -0
  374. data/website/www/source/support/community.html.erb +28 -0
  375. data/website/www/source/support/professional.html.erb +17 -0
  376. data/website/www/source/vmware/eula.html.md +21 -0
  377. data/website/www/source/vmware/index.html.erb +185 -0
  378. data/website/www/source/vmware/privacy-policy.html.md +71 -0
  379. data/website/www/source/vmware/terms-of-service.html.md +50 -0
  380. metadata +436 -186
@@ -29,6 +29,7 @@ module Vagrant
29
29
 
30
30
  # The result is only true if the user said "Y"
31
31
  env[:result] = choice && choice.upcase == "Y"
32
+ env["#{@force_key}_result".to_sym] = env[:result]
32
33
 
33
34
  @app.call(env)
34
35
  end
@@ -1,4 +1,5 @@
1
1
  require "log4r"
2
+ require "timeout"
2
3
 
3
4
  module Vagrant
4
5
  module Action
@@ -52,11 +53,14 @@ module Vagrant
52
53
  end
53
54
 
54
55
  @logger.debug("Waiting for target graceful halt state: #{@target_state}")
55
- count = 0
56
- while env[:machine].state.id != @target_state
57
- count += 1
58
- return if count >= env[:machine].config.vm.graceful_halt_retry_count
59
- sleep env[:machine].config.vm.graceful_halt_retry_interval
56
+ begin
57
+ Timeout.timeout(env[:machine].config.vm.graceful_halt_timeout) do
58
+ while env[:machine].state.id != @target_state
59
+ sleep 1
60
+ end
61
+ end
62
+ rescue Timeout::Error
63
+ # Don't worry about it, we catch the case later.
60
64
  end
61
65
 
62
66
  # The result of this matters on whether we reached our
@@ -1,5 +1,7 @@
1
1
  require "thread"
2
2
 
3
+ require "log4r"
4
+
3
5
  module Vagrant
4
6
  module Action
5
7
  module Builtin
@@ -13,9 +15,16 @@ module Vagrant
13
15
 
14
16
  def initialize(app, env)
15
17
  @app = app
18
+ @logger = Log4r::Logger.new("vagrant::action::builtin::handle_box_url")
16
19
  end
17
20
 
18
21
  def call(env)
22
+ if !env[:machine].config.vm.box || !env[:machine].config.vm.box_url
23
+ @logger.info("Skipping HandleBoxUrl because box or box_url not set.")
24
+ @app.call(env)
25
+ return
26
+ end
27
+
19
28
  if !env[:machine].box
20
29
  # Get a "big lock" to make sure that our more fine grained
21
30
  # lock access is thread safe.
@@ -29,18 +38,17 @@ module Vagrant
29
38
  # raise a terrible runtime error.
30
39
  box_name = env[:machine].config.vm.box
31
40
  box_url = env[:machine].config.vm.box_url
41
+ box_download_insecure = env[:machine].config.vm.box_download_insecure
32
42
 
33
43
  lock.synchronize do
34
44
  # First see if we actually have the box now.
35
45
  has_box = false
36
46
 
37
- formats = env[:machine].provider_options[:box_format] ||
47
+ box_formats = env[:machine].provider_options[:box_format] ||
38
48
  env[:machine].provider_name
39
- [formats].flatten.each do |format|
40
- if env[:box_collection].find(box_name, format)
41
- has_box = true
42
- break
43
- end
49
+ if env[:box_collection].find(box_name, box_formats)
50
+ has_box = true
51
+ break
44
52
  end
45
53
 
46
54
  if !has_box
@@ -53,8 +61,9 @@ module Vagrant
53
61
 
54
62
  begin
55
63
  env[:action_runner].run(Vagrant::Action.action_box_add, {
64
+ :box_download_insecure => box_download_insecure,
56
65
  :box_name => box_name,
57
- :box_provider => env[:machine].provider_name,
66
+ :box_provider => box_formats,
58
67
  :box_url => box_url
59
68
  })
60
69
  rescue Errors::BoxAlreadyExists
@@ -70,7 +70,7 @@ module Vagrant
70
70
 
71
71
  # If the port is open (listening for TCP connections)
72
72
  if extra_in_use.include?(host_port) || is_port_open?("127.0.0.1", host_port)
73
- if !repair
73
+ if !repair || !options[:auto_correct]
74
74
  raise Errors::ForwardPortCollision,
75
75
  :guest_port => guest_port.to_s,
76
76
  :host_port => host_port.to_s
@@ -0,0 +1,43 @@
1
+ module Vagrant
2
+ module Action
3
+ module Builtin
4
+ module MixinProvisioners
5
+ # This returns all the instances of the configured provisioners.
6
+ # This is safe to call multiple times since it will cache the results.
7
+ #
8
+ # @return [Array<Provisioner>]
9
+ def provisioner_instances
10
+ return @_provisioner_instances if @_provisioner_instances
11
+
12
+ # Make the mapping that'll keep track of provisioner => type
13
+ @_provisioner_types = {}
14
+
15
+ # Get all the configured provisioners
16
+ @_provisioner_instances = @env[:machine].config.vm.provisioners.map do |provisioner|
17
+ # Instantiate the provisioner
18
+ klass = Vagrant.plugin("2").manager.provisioners[provisioner.name]
19
+ result = klass.new(@env[:machine], provisioner.config)
20
+
21
+ # Store in the type map so that --provision-with works properly
22
+ @_provisioner_types[result] = provisioner.name
23
+
24
+ # Return the result
25
+ result
26
+ end
27
+
28
+ return @_provisioner_instances
29
+ end
30
+
31
+ # This will return a mapping of a provisioner instance to its
32
+ # type.
33
+ def provisioner_type_map
34
+ # Call this in order to initial the map if it hasn't been already
35
+ provisioner_instances
36
+
37
+ # Return the type map
38
+ @_provisioner_types
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -1,9 +1,11 @@
1
- require 'digest/md5'
2
1
  require 'fileutils'
3
2
  require 'pathname'
3
+ require 'zlib'
4
4
 
5
5
  require "log4r"
6
6
 
7
+ require 'vagrant/util/platform'
8
+
7
9
  module Vagrant
8
10
  module Action
9
11
  module Builtin
@@ -37,7 +39,8 @@ module Vagrant
37
39
 
38
40
  # Expand the host path, create it if we have to and
39
41
  # store away the folder.
40
- hostpath = Pathname.new(opts[:hostpath]).expand_path(env[:root_path])
42
+ hostpath = Pathname.new(opts[:hostpath]).
43
+ expand_path(env[:root_path])
41
44
 
42
45
  if !hostpath.directory? && opts[:create]
43
46
  # Host path doesn't exist, so let's create it.
@@ -51,6 +54,12 @@ module Vagrant
51
54
  end
52
55
  end
53
56
 
57
+ # Determine the real path by expanding symlinks and getting
58
+ # proper casing. We have to do this after creating it
59
+ # if it doesn't exist.
60
+ hostpath = hostpath.realpath
61
+ hostpath = Util::Platform.fs_real_path(hostpath)
62
+
54
63
  # Set the hostpath back on the options and save it
55
64
  opts[:hostpath] = hostpath.to_s
56
65
  folders[id] = opts
@@ -60,13 +69,16 @@ module Vagrant
60
69
  raise Errors::NFSNoHostIP if !env[:nfs_host_ip]
61
70
  raise Errors::NFSNoGuestIP if !env[:nfs_machine_ip]
62
71
 
72
+ machine_ip = env[:nfs_machine_ip]
73
+ machine_ip = [machine_ip] if !machine_ip.is_a?(Array)
74
+
63
75
  # Prepare the folder, this means setting up various options
64
76
  # and such on the folder itself.
65
77
  folders.each { |id, opts| prepare_folder(opts) }
66
78
 
67
79
  # Export the folders
68
80
  env[:ui].info I18n.t("vagrant.actions.vm.nfs.exporting")
69
- env[:host].nfs_export(env[:machine].id, env[:nfs_machine_ip], folders)
81
+ env[:host].nfs_export(env[:machine].id, machine_ip, folders)
70
82
 
71
83
  # Mount
72
84
  env[:ui].info I18n.t("vagrant.actions.vm.nfs.mounting")
@@ -90,11 +102,9 @@ module Vagrant
90
102
  opts[:map_gid] = prepare_permission(:gid, opts)
91
103
  opts[:nfs_version] ||= 3
92
104
 
93
- # The poor man's UUID. An MD5 hash here is sufficient since
94
- # we need a 32 character "uuid" to represent the filesystem
95
- # of an export. Hashing the host path is safe because two of
96
- # the same host path will hash to the same fsid.
97
- opts[:uuid] = Digest::MD5.hexdigest(opts[:hostpath])
105
+ # We use a CRC32 to generate a 32-bit checksum so that the
106
+ # fsid is compatible with both old and new kernels.
107
+ opts[:uuid] = Zlib.crc32(opts[:hostpath]).to_s
98
108
  end
99
109
 
100
110
  # Prepares the UID/GID settings for a single folder.
@@ -1,5 +1,7 @@
1
1
  require "log4r"
2
2
 
3
+ require_relative "mixin_provisioners"
4
+
3
5
  module Vagrant
4
6
  module Action
5
7
  module Builtin
@@ -10,34 +12,41 @@ module Vagrant
10
12
  # can do some setup, and then run again (on the return path) against
11
13
  # a running machine.
12
14
  class Provision
15
+ include MixinProvisioners
16
+
13
17
  def initialize(app, env)
14
- @app = app
15
- @logger = Log4r::Logger.new("vagrant::action::builtin::provision")
18
+ @app = app
19
+ @logger = Log4r::Logger.new("vagrant::action::builtin::provision")
16
20
  end
17
21
 
18
22
  def call(env)
23
+ @env = env
24
+
19
25
  # Check if we're even provisioning things.
20
26
  enabled = true
21
- enabled = env[:provision_enabled] if env.has_key?(:provision_enabled)
22
-
23
- # This keeps track of a mapping between provisioner and type
24
- type_map = {}
25
27
 
26
- # Get all the configured provisioners
27
- provisioners = env[:machine].config.vm.provisioners.map do |provisioner|
28
- # Instantiate the provisioner
29
- klass = Vagrant.plugin("2").manager.provisioners[provisioner.name]
30
- result = klass.new(env[:machine], provisioner.config)
31
-
32
- # Store in the type map so that --provision-with works properly
33
- type_map[result] = provisioner.name
34
-
35
- # Return the result
36
- result
28
+ # Check if we already provisioned, and if so, disable the rest
29
+ ignore_sentinel = true
30
+ ignore_sentinel = env[:provision_ignore_sentinel] if env.has_key?(:provision_ignore_sentinel)
31
+ if !ignore_sentinel
32
+ @logger.info("Checking provisioner sentinel if we should run...")
33
+ sentinel = env[:machine].data_dir.join("action_provision")
34
+ if sentinel.file?
35
+ @logger.info("Sentinel found! Not provisioning.")
36
+ enabled = false
37
+ else
38
+ @logger.info("Sentinel not found.")
39
+ sentinel.open("w") do |f|
40
+ f.write(Time.now.to_i.to_s)
41
+ end
42
+ end
37
43
  end
38
44
 
45
+ # If we explicitly specified, take that value.
46
+ enabled = env[:provision_enabled] if env.has_key?(:provision_enabled)
47
+
39
48
  # Ask the provisioners to modify the configuration if needed
40
- provisioners.each do |p|
49
+ provisioner_instances.each do |p|
41
50
  p.configure(env[:machine].config)
42
51
  end
43
52
 
@@ -46,11 +55,11 @@ module Vagrant
46
55
 
47
56
  # Actually provision if we enabled it
48
57
  if enabled
49
- provisioners.each do |p|
58
+ provisioner_instances.each do |p|
50
59
  next if env[:provision_types] && \
51
- !env[:provision_types].include?(type_map[p])
60
+ !env[:provision_types].include?(provisioner_type_map[p])
52
61
 
53
- run_provisioner(env, type_map[p].to_s, p)
62
+ run_provisioner(env, provisioner_type_map[p].to_s, p)
54
63
  end
55
64
  end
56
65
  end
@@ -0,0 +1,35 @@
1
+ require "log4r"
2
+
3
+ require_relative "mixin_provisioners"
4
+
5
+ module Vagrant
6
+ module Action
7
+ module Builtin
8
+ # This action will run the cleanup methods on provisioners and should
9
+ # be used as part of any Destroy action.
10
+ class ProvisionerCleanup
11
+ include MixinProvisioners
12
+
13
+ def initialize(app, env)
14
+ @app = app
15
+ @logger = Log4r::Logger.new("vagrant::action::builtin::provision_cleanup")
16
+ end
17
+
18
+ def call(env)
19
+ @env = env
20
+
21
+ # Ask the provisioners to modify the configuration if needed
22
+ provisioner_instances.each do |p|
23
+ env[:ui].info(I18n.t(
24
+ "vagrant.provisioner_cleanup",
25
+ name: provisioner_type_map[p].to_s))
26
+ p.cleanup
27
+ end
28
+
29
+ # Continue, we need the VM to be booted.
30
+ @app.call(env)
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,84 @@
1
+ module Vagrant
2
+ module Action
3
+ module Builtin
4
+ # This waits for the communicator to be ready for a set amount of
5
+ # time.
6
+ class WaitForCommunicator
7
+ def initialize(app, env, states=nil)
8
+ @app = app
9
+ @states = states
10
+ end
11
+
12
+ def call(env)
13
+ # Wait for ready in a thread so that we can continually check
14
+ # for interrupts.
15
+ ready_thr = Thread.new do
16
+ Thread.current[:result] = env[:machine].communicate.wait_for_ready(
17
+ env[:machine].config.vm.boot_timeout)
18
+ end
19
+
20
+ # Start a thread that verifies the VM stays in a good state.
21
+ states_thr = Thread.new do
22
+ Thread.current[:result] = true
23
+
24
+ # If we aren't caring about states, just basically put this
25
+ # thread to sleep because it'll get killed later.
26
+ if !@states
27
+ while true
28
+ sleep 300
29
+ end
30
+
31
+ next
32
+ end
33
+
34
+ # Otherwise, periodically verify the VM isn't in a bad state.
35
+ while true
36
+ state = env[:machine].provider.state.id
37
+
38
+ # Used to report invalid states
39
+ Thread.current[:last_known_state] = state
40
+
41
+ # Check if we have the proper state so we can break out
42
+ if !@states.include?(state)
43
+ Thread.current[:result] = false
44
+ break
45
+ end
46
+
47
+ # Sleep a bit so we don't hit 100% CPU constantly.
48
+ sleep 1
49
+ end
50
+ end
51
+
52
+ # Wait for a result or an interrupt
53
+ env[:ui].info I18n.t("vagrant.boot_waiting")
54
+ while ready_thr.alive? && states_thr.alive?
55
+ return if env[:interrupted]
56
+ end
57
+
58
+ # If it went into a bad state, then raise an error
59
+ if !states_thr[:result]
60
+ raise Errors::VMBootBadState,
61
+ valid: @states.join(", "),
62
+ invalid: states_thr[:last_known_state]
63
+ end
64
+
65
+ # If it didn't boot, raise an error
66
+ if !ready_thr[:result]
67
+ raise Errors::VMBootTimeout
68
+ end
69
+
70
+ env[:ui].info I18n.t("vagrant.boot_completed")
71
+
72
+ # Make sure our threads are all killed
73
+ ready_thr.kill
74
+ states_thr.kill
75
+
76
+ @app.call(env)
77
+ ensure
78
+ ready_thr.kill
79
+ states_thr.kill
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
@@ -30,9 +30,10 @@ module Vagrant
30
30
  # of "recoverable" middlewares in case something goes wrong!
31
31
  raise Errors::VagrantInterrupt if env[:interrupted]
32
32
  action = @actions.shift
33
- @logger.info("Calling action: #{action}")
33
+ @logger.info("Calling IN action: #{action}")
34
34
  @stack.unshift(action).first.call(env)
35
35
  raise Errors::VagrantInterrupt if env[:interrupted]
36
+ @logger.info("Calling OUT action: #{action}")
36
37
  rescue SystemExit
37
38
  # This means that an "exit" or "abort" was called. In these cases,
38
39
  # we just exit immediately.
@@ -70,31 +70,35 @@ module Vagrant
70
70
  # the box represents will be added.
71
71
  # @param [Boolean] force If true, any existing box with the same name
72
72
  # and provider will be replaced.
73
- def add(path, name, provider=nil, force=false)
73
+ def add(path, name, formats=nil, force=false)
74
+ formats = [formats] if formats && !formats.is_a?(Array)
75
+ provider = nil
76
+
74
77
  with_collection_lock do
75
78
  # A helper to check if a box exists. We store this in a variable
76
79
  # since we call it multiple times.
77
- check_box_exists = lambda do |box_provider|
78
- box = find(name, box_provider)
80
+ check_box_exists = lambda do |box_formats|
81
+ box = find(name, box_formats)
79
82
  next if !box
80
83
 
81
84
  if !force
82
- @logger.error("Box already exists, can't add: #{name} #{box_provider}")
83
- raise Errors::BoxAlreadyExists, :name => name, :provider => box_provider
85
+ @logger.error("Box already exists, can't add: #{name} #{box_formats.join(", ")}")
86
+ raise Errors::BoxAlreadyExists, :name => name, :formats => box_formats.join(", ")
84
87
  end
85
88
 
86
89
  # We're forcing, so just delete the old box
87
- @logger.info("Box already exists, but forcing so removing: #{name} #{box_provider}")
90
+ @logger.info(
91
+ "Box already exists, but forcing so removing: #{name} #{box_formats.join(", ")}")
88
92
  box.destroy!
89
93
  end
90
94
 
91
- log_provider = provider ? provider : "any provider"
95
+ log_provider = formats ? formats.join(", ") : "any provider"
92
96
  @logger.debug("Adding box: #{name} (#{log_provider}) from #{path}")
93
97
 
94
98
  # Verify the box doesn't exist early if we're given a provider. This
95
99
  # can potentially speed things up considerably since we don't need
96
100
  # to unpack any files.
97
- check_box_exists.call(provider) if provider
101
+ check_box_exists.call(formats) if formats
98
102
 
99
103
  # Verify that a V1 box doesn't exist. If it does, then we signal
100
104
  # to the user that we need an upgrade.
@@ -121,26 +125,35 @@ module Vagrant
121
125
  with_temp_dir(temp_dir) do |final_temp_dir|
122
126
  # Get an instance of the box we just added before it is finalized
123
127
  # in the system so we can inspect and use its metadata.
124
- box = Box.new(name, provider, final_temp_dir)
128
+ box = Box.new(name, nil, final_temp_dir)
125
129
 
126
130
  # Get the provider, since we'll need that to at the least add it
127
131
  # to the system or check that it matches what is given to us.
128
132
  box_provider = box.metadata["provider"]
129
133
 
130
- if provider
131
- # Verify that the given provider matches what the box has.
132
- if box_provider.to_sym != provider
133
- @logger.error("Added box provider doesnt match expected: #{box_provider}")
134
- raise Errors::BoxProviderDoesntMatch, :expected => provider, :actual => box_provider
134
+ if formats
135
+ found = false
136
+ formats.each do |format|
137
+ # Verify that the given provider matches what the box has.
138
+ if box_provider.to_sym == format.to_sym
139
+ found = true
140
+ break
141
+ end
135
142
  end
136
- else
137
- # We weren't given a provider, so store this one.
138
- provider = box_provider.to_sym
139
143
 
144
+ if !found
145
+ @logger.error("Added box provider doesnt match expected: #{log_provider}")
146
+ raise Errors::BoxProviderDoesntMatch,
147
+ :expected => log_provider, :actual => box_provider
148
+ end
149
+ else
140
150
  # Verify the box doesn't already exist
141
- check_box_exists.call(provider)
151
+ check_box_exists.call([box_provider])
142
152
  end
143
153
 
154
+ # We weren't given a provider, so store this one.
155
+ provider = box_provider.to_sym
156
+
144
157
  # Create the directory for this box, not including the provider
145
158
  box_dir = @directory.join(name)
146
159
  box_dir.mkpath
@@ -220,39 +233,43 @@ module Vagrant
220
233
  # Find a box in the collection with the given name and provider.
221
234
  #
222
235
  # @param [String] name Name of the box (logical name).
223
- # @Param [String] provider Provider that the box implements.
236
+ # @param [String] provider Provider that the box implements.
224
237
  # @return [Box] The box found, or `nil` if not found.
225
- def find(name, provider)
238
+ def find(name, providers)
239
+ providers = [providers].flatten
240
+
226
241
  with_collection_lock do
227
- # First look directly for the box we're asking for.
228
- box_directory = @directory.join(name, provider.to_s, "metadata.json")
229
- @logger.info("Searching for box: #{name} (#{provider}) in #{box_directory}")
230
- if box_directory.file?
231
- @logger.info("Box found: #{name} (#{provider})")
232
- return Box.new(name, provider, box_directory.dirname)
233
- end
242
+ providers.each do |provider|
243
+ # First look directly for the box we're asking for.
244
+ box_directory = @directory.join(name, provider.to_s, "metadata.json")
245
+ @logger.info("Searching for box: #{name} (#{provider}) in #{box_directory}")
246
+ if box_directory.file?
247
+ @logger.info("Box found: #{name} (#{provider})")
248
+ return Box.new(name, provider, box_directory.dirname)
249
+ end
234
250
 
235
- # If we're looking for a VirtualBox box, then we check if there is
236
- # a V1 box.
237
- if provider.to_sym == :virtualbox
238
- # Check if a V1 version of this box exists, and if so, raise an
239
- # exception notifying the caller that the box exists but needs
240
- # to be upgraded. We don't do the upgrade here because it can be
241
- # a fairly intensive activity and don't want to immediately degrade
242
- # user performance on a find.
243
- #
244
- # To determine if it is a V1 box we just do a simple heuristic
245
- # based approach.
246
- @logger.info("Searching for V1 box: #{name}")
247
- if v1_box?(@directory.join(name))
248
- @logger.warn("V1 box found: #{name}")
249
- raise Errors::BoxUpgradeRequired, :name => name
251
+ # If we're looking for a VirtualBox box, then we check if there is
252
+ # a V1 box.
253
+ if provider.to_sym == :virtualbox
254
+ # Check if a V1 version of this box exists, and if so, raise an
255
+ # exception notifying the caller that the box exists but needs
256
+ # to be upgraded. We don't do the upgrade here because it can be
257
+ # a fairly intensive activity and don't want to immediately degrade
258
+ # user performance on a find.
259
+ #
260
+ # To determine if it is a V1 box we just do a simple heuristic
261
+ # based approach.
262
+ @logger.info("Searching for V1 box: #{name}")
263
+ if v1_box?(@directory.join(name))
264
+ @logger.warn("V1 box found: #{name}")
265
+ raise Errors::BoxUpgradeRequired, :name => name
266
+ end
250
267
  end
251
268
  end
252
269
  end
253
270
 
254
271
  # Didn't find it, return nil
255
- @logger.info("Box not found: #{name} (#{provider})")
272
+ @logger.info("Box not found: #{name} (#{providers.join(", ")})")
256
273
  nil
257
274
  end
258
275
 
@@ -261,6 +278,7 @@ module Vagrant
261
278
  # If the given box is found but is not a V1 box then `true` is returned
262
279
  # because this just works fine.
263
280
  #
281
+ # @param [String] name Name of the box (logical name).
264
282
  # @return [Boolean] `true` otherwise an exception is raised.
265
283
  def upgrade(name)
266
284
  with_collection_lock do
@@ -268,7 +286,7 @@ module Vagrant
268
286
  box_dir = @directory.join(name)
269
287
 
270
288
  # If the box doesn't exist at all, raise an exception
271
- raise Errors::BoxNotFound, :name => name if !box_dir.directory?
289
+ raise Errors::BoxNotFound, :name => name, :provider => "virtualbox" if !box_dir.directory?
272
290
 
273
291
  if v1_box?(box_dir)
274
292
  @logger.debug("V1 box #{name} found. Upgrading!")