vagrant-skytap 0.1.11 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (342) hide show
  1. checksums.yaml +4 -4
  2. data/.byebug_history +242 -19
  3. data/CHANGELOG.md +9 -0
  4. data/README.md +30 -8
  5. data/Vagrantfile.rej +83 -0
  6. data/_patches-20160112/0 +388 -0
  7. data/_patches-20160112/1 +82 -0
  8. data/_patches-20160112/2 +239 -0
  9. data/_patches-20160112/COMPLETED-ABOVE-THIS-LINE +4 -0
  10. data/_patches-20160112/COMPLETED-BELOW-THIS-LINE +4 -0
  11. data/_patches-20160112/CR-ABOVE-THIS-LINE +4 -0
  12. data/_patches-20160112/CR-BELOW-THIS-LINE +4 -0
  13. data/_patches-20160112/WIP-ABOVE-THIS-LINE +4 -0
  14. data/_patches-20160112/WIP-BELOW-THIS-LINE +4 -0
  15. data/_patches-20160112/acceptance-test-runner +29 -0
  16. data/_patches-20160112/ansible-1 +92 -0
  17. data/_patches-20160112/cache-api-client-in-up +40 -0
  18. data/_patches-20160112/dead-code-in-actions +44 -0
  19. data/_patches-20160112/debug-changes +42 -0
  20. data/_patches-20160112/demo-rails-app +1276 -0
  21. data/_patches-20160112/eng-10166-halt-spec +40 -0
  22. data/_patches-20160112/eng-10256 +527 -0
  23. data/_patches-20160112/eng-10256-2 +162 -0
  24. data/_patches-20160112/eng-10256-ubuntu-testing +88 -0
  25. data/_patches-20160112/eng-10269-test-stuff +87 -0
  26. data/_patches-20160112/eng-10269-wtf +119 -0
  27. data/_patches-20160112/eng-10369 +143 -0
  28. data/_patches-20160112/eng-10369-tmp +60 -0
  29. data/_patches-20160112/eng-10919 +56 -0
  30. data/_patches-20160112/eng-11177-fix-actions-requires +44 -0
  31. data/_patches-20160112/eng-11442 +4 -0
  32. data/_patches-20160112/eng-11616 +403 -0
  33. data/_patches-20160112/eng-11616-2 +67 -0
  34. data/_patches-20160112/eng-11616-actual +184 -0
  35. data/_patches-20160112/eng-11625a +4 -0
  36. data/_patches-20160112/eng-11711 +85 -0
  37. data/_patches-20160112/eng-12232-command-spec +236 -0
  38. data/_patches-20160112/eng-12235 +83 -0
  39. data/_patches-20160112/eng-12235-override-refactor +140 -0
  40. data/_patches-20160112/eng-12240 +103 -0
  41. data/_patches-20160112/eng-12249 +40 -0
  42. data/_patches-20160112/eng-12301 +50 -0
  43. data/_patches-20160112/eng-12843 +95 -0
  44. data/_patches-20160112/env-source +112 -0
  45. data/_patches-20160112/frickin-vagrant-spec +163 -0
  46. data/_patches-20160112/gem-pre-version +14 -0
  47. data/_patches-20160112/gems-old +9 -0
  48. data/_patches-20160112/googles-specs +713 -0
  49. data/_patches-20160112/local-configs-ignore +61 -0
  50. data/_patches-20160112/misc +79 -0
  51. data/_patches-20160112/network-unreachable +31 -0
  52. data/_patches-20160112/new-boxfile +288 -0
  53. data/_patches-20160112/parallelization-maybe +198 -0
  54. data/_patches-20160112/read-state +23 -0
  55. data/_patches-20160112/refactor-to-use-public_address-cap +25 -0
  56. data/_patches-20160112/series +60 -0
  57. data/_patches-20160112/status +12 -0
  58. data/_patches-20160112/test-move-env-data +231 -0
  59. data/_patches-20160112/test-vagrantfile-vm1 +167 -0
  60. data/_patches-20160112/the_version_in_0.1.13.pre1 +598 -0
  61. data/_patches-20160112/vagrant-spec-mock-api +137 -0
  62. data/_patches-20160112/vagrant-vmware-plugin +233 -0
  63. data/_patches-20160112/vagrantfile +403 -0
  64. data/_patches-20160112/vagrantfile-for-acceptance-tests +29 -0
  65. data/_patches-20160112/vagrantfile-for-nick +95 -0
  66. data/_patches-20160112/vagrantfiles-to-forget-what-they-are-for +134 -0
  67. data/_patches-20160112/vm-vanished +42 -0
  68. data/_patches-20160112a/01 +148 -0
  69. data/_patches-20160112a/2 +239 -0
  70. data/_patches-20160112a/COMPLETED-ABOVE-THIS-LINE +4 -0
  71. data/_patches-20160112a/COMPLETED-BELOW-THIS-LINE +4 -0
  72. data/_patches-20160112a/CR-ABOVE-THIS-LINE +4 -0
  73. data/_patches-20160112a/CR-BELOW-THIS-LINE +4 -0
  74. data/_patches-20160112a/WIP-ABOVE-THIS-LINE +4 -0
  75. data/_patches-20160112a/WIP-BELOW-THIS-LINE +4 -0
  76. data/_patches-20160112a/acceptance-test-runner +29 -0
  77. data/_patches-20160112a/ansible-1 +92 -0
  78. data/_patches-20160112a/cache-api-client-in-up +40 -0
  79. data/_patches-20160112a/dead-code-in-actions +44 -0
  80. data/_patches-20160112a/debug-changes +42 -0
  81. data/_patches-20160112a/demo-rails-app +1276 -0
  82. data/_patches-20160112a/eng-10166-halt-spec +40 -0
  83. data/_patches-20160112a/eng-10256-ubuntu-testing +88 -0
  84. data/_patches-20160112a/eng-10269-test-stuff +87 -0
  85. data/_patches-20160112a/eng-10269-wtf +119 -0
  86. data/_patches-20160112a/eng-10369 +143 -0
  87. data/_patches-20160112a/eng-10369-tmp +60 -0
  88. data/_patches-20160112a/eng-10919 +56 -0
  89. data/_patches-20160112a/eng-11177-fix-actions-requires +44 -0
  90. data/_patches-20160112a/eng-11442 +4 -0
  91. data/_patches-20160112a/eng-11616 +403 -0
  92. data/_patches-20160112a/eng-11616-2 +67 -0
  93. data/_patches-20160112a/eng-11616-actual +184 -0
  94. data/_patches-20160112a/eng-11625a +4 -0
  95. data/_patches-20160112a/eng-11711 +85 -0
  96. data/_patches-20160112a/eng-12232-command-spec +236 -0
  97. data/_patches-20160112a/eng-12235 +83 -0
  98. data/_patches-20160112a/eng-12235-override-refactor +140 -0
  99. data/_patches-20160112a/eng-12240 +103 -0
  100. data/_patches-20160112a/eng-12249 +40 -0
  101. data/_patches-20160112a/eng-12301 +50 -0
  102. data/_patches-20160112a/eng-12843 +95 -0
  103. data/_patches-20160112a/env-source +112 -0
  104. data/_patches-20160112a/frickin-vagrant-spec +163 -0
  105. data/_patches-20160112a/gem-pre-version +14 -0
  106. data/_patches-20160112a/gems-old +9 -0
  107. data/_patches-20160112a/googles-specs +713 -0
  108. data/_patches-20160112a/local-configs-ignore +61 -0
  109. data/_patches-20160112a/misc +79 -0
  110. data/_patches-20160112a/network-unreachable +31 -0
  111. data/_patches-20160112a/new-boxfile +288 -0
  112. data/_patches-20160112a/parallelization-maybe +198 -0
  113. data/_patches-20160112a/read-state +23 -0
  114. data/_patches-20160112a/refactor-to-use-public_address-cap +25 -0
  115. data/_patches-20160112a/series +58 -0
  116. data/_patches-20160112a/status +14 -0
  117. data/_patches-20160112a/test-move-env-data +231 -0
  118. data/_patches-20160112a/test-vagrantfile-vm1 +167 -0
  119. data/_patches-20160112a/the_version_in_0.1.13.pre1 +612 -0
  120. data/_patches-20160112a/then-copy-the-newer-files +632 -0
  121. data/_patches-20160112a/vagrant-spec-mock-api +137 -0
  122. data/_patches-20160112a/vagrant-vmware-plugin +233 -0
  123. data/_patches-20160112a/vagrantfile +403 -0
  124. data/_patches-20160112a/vagrantfile-for-acceptance-tests +29 -0
  125. data/_patches-20160112a/vagrantfile-for-nick +95 -0
  126. data/_patches-20160112a/vagrantfiles-to-forget-what-they-are-for +134 -0
  127. data/_patches-20160112a/vm-vanished +42 -0
  128. data/_patches-20160113/COMPLETED-ABOVE-THIS-LINE +4 -0
  129. data/_patches-20160113/COMPLETED-BELOW-THIS-LINE +4 -0
  130. data/_patches-20160113/CR-ABOVE-THIS-LINE +4 -0
  131. data/_patches-20160113/CR-BELOW-THIS-LINE +4 -0
  132. data/_patches-20160113/WIP-ABOVE-THIS-LINE +4 -0
  133. data/_patches-20160113/WIP-BELOW-THIS-LINE +4 -0
  134. data/_patches-20160113/acceptance-test-runner +29 -0
  135. data/_patches-20160113/ansible-1 +92 -0
  136. data/_patches-20160113/cache-api-client-in-up +40 -0
  137. data/_patches-20160113/dead-code-in-actions +44 -0
  138. data/_patches-20160113/debug-changes +55 -0
  139. data/_patches-20160113/demo-rails-app +1276 -0
  140. data/_patches-20160113/eng-10166-halt-spec +40 -0
  141. data/_patches-20160113/eng-10256 +543 -0
  142. data/_patches-20160113/eng-10256-ubuntu-testing +88 -0
  143. data/_patches-20160113/eng-10269-test-stuff +87 -0
  144. data/_patches-20160113/eng-10269-wtf +119 -0
  145. data/_patches-20160113/eng-10369 +143 -0
  146. data/_patches-20160113/eng-10369-tmp +60 -0
  147. data/_patches-20160113/eng-10919 +56 -0
  148. data/_patches-20160113/eng-11177-fix-actions-requires +44 -0
  149. data/_patches-20160113/eng-11442 +4 -0
  150. data/_patches-20160113/eng-11616 +403 -0
  151. data/_patches-20160113/eng-11616-2 +67 -0
  152. data/_patches-20160113/eng-11616-actual +184 -0
  153. data/_patches-20160113/eng-11625a +4 -0
  154. data/_patches-20160113/eng-11711 +85 -0
  155. data/_patches-20160113/eng-12232-command-spec +236 -0
  156. data/_patches-20160113/eng-12235 +83 -0
  157. data/_patches-20160113/eng-12235-override-refactor +140 -0
  158. data/_patches-20160113/eng-12240 +103 -0
  159. data/_patches-20160113/eng-12249 +40 -0
  160. data/_patches-20160113/eng-12301 +50 -0
  161. data/_patches-20160113/eng-12720 +47 -0
  162. data/_patches-20160113/eng-12843 +95 -0
  163. data/_patches-20160113/env-source +112 -0
  164. data/_patches-20160113/frickin-vagrant-spec +163 -0
  165. data/_patches-20160113/gem-pre-version +14 -0
  166. data/_patches-20160113/gems-old +9 -0
  167. data/_patches-20160113/googles-specs +713 -0
  168. data/_patches-20160113/local-configs-ignore +61 -0
  169. data/_patches-20160113/misc +79 -0
  170. data/_patches-20160113/network-unreachable +31 -0
  171. data/_patches-20160113/new-boxfile +288 -0
  172. data/_patches-20160113/parallelization-maybe +198 -0
  173. data/_patches-20160113/read-state +23 -0
  174. data/_patches-20160113/refactor-to-use-public_address-cap +25 -0
  175. data/_patches-20160113/series +56 -0
  176. data/_patches-20160113/status +14 -0
  177. data/_patches-20160113/test-move-env-data +231 -0
  178. data/_patches-20160113/test-vagrantfile-vm1 +167 -0
  179. data/_patches-20160113/vagrant-spec-mock-api +137 -0
  180. data/_patches-20160113/vagrant-vmware-plugin +233 -0
  181. data/_patches-20160113/vagrantfile +403 -0
  182. data/_patches-20160113/vagrantfile-for-acceptance-tests +29 -0
  183. data/_patches-20160113/vagrantfile-for-nick +95 -0
  184. data/_patches-20160113/vagrantfiles-to-forget-what-they-are-for +134 -0
  185. data/_patches-20160113/vm-vanished +42 -0
  186. data/_patches-20160118/COMPLETED-ABOVE-THIS-LINE +4 -0
  187. data/_patches-20160118/COMPLETED-BELOW-THIS-LINE +4 -0
  188. data/_patches-20160118/CR-ABOVE-THIS-LINE +4 -0
  189. data/_patches-20160118/CR-BELOW-THIS-LINE +4 -0
  190. data/_patches-20160118/WIP-ABOVE-THIS-LINE +4 -0
  191. data/_patches-20160118/WIP-BELOW-THIS-LINE +4 -0
  192. data/_patches-20160118/acceptance-test-runner +29 -0
  193. data/_patches-20160118/ansible-1 +92 -0
  194. data/_patches-20160118/cache-api-client-in-up +40 -0
  195. data/_patches-20160118/dead-code-in-actions +44 -0
  196. data/_patches-20160118/debug-changes +55 -0
  197. data/_patches-20160118/demo-rails-app +1276 -0
  198. data/_patches-20160118/eng-10166-halt-spec +40 -0
  199. data/_patches-20160118/eng-10256 +554 -0
  200. data/_patches-20160118/eng-10256-cr +314 -0
  201. data/_patches-20160118/eng-10256-ubuntu-testing +88 -0
  202. data/_patches-20160118/eng-10269-test-stuff +87 -0
  203. data/_patches-20160118/eng-10269-wtf +119 -0
  204. data/_patches-20160118/eng-10369 +143 -0
  205. data/_patches-20160118/eng-10369-tmp +60 -0
  206. data/_patches-20160118/eng-10919 +56 -0
  207. data/_patches-20160118/eng-11177-fix-actions-requires +44 -0
  208. data/_patches-20160118/eng-11442 +4 -0
  209. data/_patches-20160118/eng-11616 +403 -0
  210. data/_patches-20160118/eng-11616-2 +67 -0
  211. data/_patches-20160118/eng-11616-actual +184 -0
  212. data/_patches-20160118/eng-11625a +4 -0
  213. data/_patches-20160118/eng-11711 +85 -0
  214. data/_patches-20160118/eng-12232-command-spec +236 -0
  215. data/_patches-20160118/eng-12235 +83 -0
  216. data/_patches-20160118/eng-12235-override-refactor +140 -0
  217. data/_patches-20160118/eng-12240 +103 -0
  218. data/_patches-20160118/eng-12249 +40 -0
  219. data/_patches-20160118/eng-12301 +50 -0
  220. data/_patches-20160118/eng-12720 +74 -0
  221. data/_patches-20160118/eng-12843 +95 -0
  222. data/_patches-20160118/eng-13040 +291 -0
  223. data/_patches-20160118/env-source +112 -0
  224. data/_patches-20160118/frickin-vagrant-spec +163 -0
  225. data/_patches-20160118/gem-pre-version +14 -0
  226. data/_patches-20160118/gems-old +9 -0
  227. data/_patches-20160118/googles-specs +713 -0
  228. data/_patches-20160118/local-configs-ignore +61 -0
  229. data/_patches-20160118/misc +79 -0
  230. data/_patches-20160118/network-unreachable +31 -0
  231. data/_patches-20160118/new-boxfile +288 -0
  232. data/_patches-20160118/parallelization-maybe +198 -0
  233. data/_patches-20160118/port-forwarding-processes +87 -0
  234. data/_patches-20160118/read-state +23 -0
  235. data/_patches-20160118/refactor-to-use-public_address-cap +25 -0
  236. data/_patches-20160118/series +59 -0
  237. data/_patches-20160118/status +13 -0
  238. data/_patches-20160118/test-move-env-data +231 -0
  239. data/_patches-20160118/test-vagrantfile-vm1 +167 -0
  240. data/_patches-20160118/vagrant-spec-mock-api +137 -0
  241. data/_patches-20160118/vagrant-vmware-plugin +233 -0
  242. data/_patches-20160118/vagrantfile +403 -0
  243. data/_patches-20160118/vagrantfile-for-acceptance-tests +29 -0
  244. data/_patches-20160118/vagrantfile-for-nick +95 -0
  245. data/_patches-20160118/vagrantfiles-to-forget-what-they-are-for +134 -0
  246. data/_patches-20160118/vm-vanished +42 -0
  247. data/_patches-20160118a/COMPLETED-ABOVE-THIS-LINE +4 -0
  248. data/_patches-20160118a/COMPLETED-BELOW-THIS-LINE +4 -0
  249. data/_patches-20160118a/CR-ABOVE-THIS-LINE +4 -0
  250. data/_patches-20160118a/CR-BELOW-THIS-LINE +4 -0
  251. data/_patches-20160118a/WIP-ABOVE-THIS-LINE +4 -0
  252. data/_patches-20160118a/WIP-BELOW-THIS-LINE +4 -0
  253. data/_patches-20160118a/acceptance-test-runner +29 -0
  254. data/_patches-20160118a/ansible-1 +92 -0
  255. data/_patches-20160118a/bar +189 -0
  256. data/_patches-20160118a/cache-api-client-in-up +40 -0
  257. data/_patches-20160118a/dead-code-in-actions +44 -0
  258. data/_patches-20160118a/debug-changes +55 -0
  259. data/_patches-20160118a/demo-rails-app +1276 -0
  260. data/_patches-20160118a/eng-10166-halt-spec +40 -0
  261. data/_patches-20160118a/eng-10256 +554 -0
  262. data/_patches-20160118a/eng-10256-cr +314 -0
  263. data/_patches-20160118a/eng-10256-ubuntu-testing +88 -0
  264. data/_patches-20160118a/eng-10269-test-stuff +87 -0
  265. data/_patches-20160118a/eng-10269-wtf +119 -0
  266. data/_patches-20160118a/eng-10369 +143 -0
  267. data/_patches-20160118a/eng-10369-tmp +60 -0
  268. data/_patches-20160118a/eng-10919 +56 -0
  269. data/_patches-20160118a/eng-11177-fix-actions-requires +44 -0
  270. data/_patches-20160118a/eng-11442 +4 -0
  271. data/_patches-20160118a/eng-11616 +403 -0
  272. data/_patches-20160118a/eng-11616-2 +67 -0
  273. data/_patches-20160118a/eng-11616-actual +184 -0
  274. data/_patches-20160118a/eng-11625a +4 -0
  275. data/_patches-20160118a/eng-11711 +85 -0
  276. data/_patches-20160118a/eng-12232-command-spec +236 -0
  277. data/_patches-20160118a/eng-12235 +83 -0
  278. data/_patches-20160118a/eng-12235-override-refactor +140 -0
  279. data/_patches-20160118a/eng-12240 +103 -0
  280. data/_patches-20160118a/eng-12249 +40 -0
  281. data/_patches-20160118a/eng-12301 +50 -0
  282. data/_patches-20160118a/eng-12720 +74 -0
  283. data/_patches-20160118a/eng-12843 +95 -0
  284. data/_patches-20160118a/eng-13040 +291 -0
  285. data/_patches-20160118a/env-source +112 -0
  286. data/_patches-20160118a/foo +169 -0
  287. data/_patches-20160118a/frickin-vagrant-spec +163 -0
  288. data/_patches-20160118a/gem-pre-version +14 -0
  289. data/_patches-20160118a/gems-old +9 -0
  290. data/_patches-20160118a/googles-specs +713 -0
  291. data/_patches-20160118a/guestport-madness +59 -0
  292. data/_patches-20160118a/local-configs-ignore +61 -0
  293. data/_patches-20160118a/misc +79 -0
  294. data/_patches-20160118a/network-unreachable +31 -0
  295. data/_patches-20160118a/new-boxfile +288 -0
  296. data/_patches-20160118a/parallelization-maybe +198 -0
  297. data/_patches-20160118a/port-forwarding-processes +87 -0
  298. data/_patches-20160118a/read-state +23 -0
  299. data/_patches-20160118a/refactor-to-use-public_address-cap +25 -0
  300. data/_patches-20160118a/series +62 -0
  301. data/_patches-20160118a/status +14 -0
  302. data/_patches-20160118a/test-move-env-data +231 -0
  303. data/_patches-20160118a/test-vagrantfile-vm1 +167 -0
  304. data/_patches-20160118a/vagrant-spec-mock-api +137 -0
  305. data/_patches-20160118a/vagrant-vmware-plugin +233 -0
  306. data/_patches-20160118a/vagrantfile +403 -0
  307. data/_patches-20160118a/vagrantfile-for-acceptance-tests +29 -0
  308. data/_patches-20160118a/vagrantfile-for-nick +95 -0
  309. data/_patches-20160118a/vagrantfiles-to-forget-what-they-are-for +134 -0
  310. data/_patches-20160118a/vm-vanished +42 -0
  311. data/lib/vagrant-skytap/action/clear_forwarded_ports.rb +19 -0
  312. data/lib/vagrant-skytap/action/forward_ports.rb +42 -0
  313. data/lib/vagrant-skytap/action/prepare_forwarded_port_collision_params.rb +37 -0
  314. data/lib/vagrant-skytap/action.rb +18 -0
  315. data/lib/vagrant-skytap/api/environment.rb +19 -4
  316. data/lib/vagrant-skytap/api/vm.rb +10 -6
  317. data/lib/vagrant-skytap/command/up.rb +7 -1
  318. data/lib/vagrant-skytap/errors.rb +4 -0
  319. data/lib/vagrant-skytap/hosts/bsd/cap/ssh_tunnel.rb +15 -0
  320. data/lib/vagrant-skytap/hosts/common/cap/ssh_tunnel.rb +183 -0
  321. data/lib/vagrant-skytap/hosts/linux/cap/ssh_tunnel.rb +15 -0
  322. data/lib/vagrant-skytap/hosts/windows/cap/ssh_tunnel.rb +27 -0
  323. data/lib/vagrant-skytap/model/forwarded_port.rb +78 -0
  324. data/lib/vagrant-skytap/plugin.rb +15 -0
  325. data/lib/vagrant-skytap/util/compile_forwarded_ports.rb +35 -0
  326. data/lib/vagrant-skytap/version.rb +1 -1
  327. data/locales/en.yml +3 -0
  328. data/spec/unit/environment_spec.rb +14 -2
  329. data/spec/unit/forwarded_port_spec.rb +45 -0
  330. data/spec/unit/hosts/common/cap/ssh_tunnel_spec.rb +180 -0
  331. data/spec/unit/prepare_collision_params_spec.rb +57 -0
  332. data/spec/unit/support/forwarded_ports/machines/vm1/skytap/id +1 -0
  333. data/spec/unit/support/forwarded_ports/machines/vm1/skytap/private_key +4 -0
  334. data/spec/unit/support/forwarded_ports/machines/vm1/skytap/tcp9000_tcp_9000_80.pid +1 -0
  335. data/spec/unit/support/forwarded_ports/machines/vm1/skytap/tcp9001_tcp_9001_81.pid +1 -0
  336. data/spec/unit/support/forwarded_ports/machines/vm1/virtualbox/id +1 -0
  337. data/spec/unit/support/forwarded_ports/machines/vm2/skytap/id +1 -0
  338. data/spec/unit/support/forwarded_ports/machines/vm2/skytap/tcp8080_tcp_8080_80.pid +1 -0
  339. data/spec/unit/support/forwarded_ports/machines/vm3/virtualbox/id +1 -0
  340. data/spec/unit/support/forwarded_ports/machines/vm4/skytap/id +1 -0
  341. data/spec/unit/support/forwarded_ports/machines/vm4/skytap/tcp8888_tcp_8888_80.pid +1 -0
  342. metadata +330 -2
@@ -0,0 +1,403 @@
1
+ # HG changeset patch
2
+ # Parent c24fb4f0f929782eb6188401fe2bc1066e4dc9b6
3
+ # Parent c24fb4f0f929782eb6188401fe2bc1066e4dc9b6
4
+ ENG-11616 refactoring "up"
5
+
6
+ diff -r c24fb4f0f929 lib/vagrant-skytap/action.rb
7
+ --- a/lib/vagrant-skytap/action.rb Mon Nov 16 15:28:30 2015 -0800
8
+ +++ b/lib/vagrant-skytap/action.rb Tue Nov 17 12:09:41 2015 -0800
9
+ @@ -9,9 +9,7 @@
10
+ # This action is called to halt the remote machine.
11
+ def self.action_halt
12
+ Vagrant::Action::Builder.new.tap do |b|
13
+ - b.use ConfigValidate
14
+ - b.use InitializeAPIClient
15
+ - b.use FetchEnvironment
16
+ + b.use action_initialize
17
+ b.use Call, ExistenceCheck do |env1, b1|
18
+ case result = env1[:result]
19
+ when :missing_environment, :missing_vm, :no_vms
20
+ @@ -26,9 +24,7 @@
21
+ # This action is called to suspend the remote machine.
22
+ def self.action_suspend
23
+ Vagrant::Action::Builder.new.tap do |b|
24
+ - b.use ConfigValidate
25
+ - b.use InitializeAPIClient
26
+ - b.use FetchEnvironment
27
+ + b.use action_initialize
28
+ b.use Call, ExistenceCheck do |env1, b1|
29
+ case result = env1[:result]
30
+ when :missing_environment, :missing_vm, :no_vms
31
+ @@ -43,9 +39,7 @@
32
+ # This action is called to terminate the remote machine.
33
+ def self.action_destroy
34
+ Vagrant::Action::Builder.new.tap do |b|
35
+ - b.use ConfigValidate
36
+ - b.use InitializeAPIClient
37
+ - b.use FetchEnvironment
38
+ + b.use action_initialize
39
+ b.use Call, ExistenceCheck do |env, b1|
40
+ case existence_state = env[:result]
41
+ when :missing_environment, :no_vms
42
+ @@ -79,9 +73,7 @@
43
+ # This action is called when `vagrant provision` is called.
44
+ def self.action_provision
45
+ Vagrant::Action::Builder.new.tap do |b|
46
+ - b.use ConfigValidate
47
+ - b.use InitializeAPIClient
48
+ - b.use FetchEnvironment
49
+ + b.use action_initialize
50
+ b.use Call, ExistenceCheck do |env, b1|
51
+ case result = env[:result]
52
+ when :missing_environment, :missing_vm, :no_vms
53
+ @@ -115,9 +107,7 @@
54
+ # key.
55
+ def self.action_read_ssh_info
56
+ Vagrant::Action::Builder.new.tap do |b|
57
+ - b.use ConfigValidate
58
+ - b.use InitializeAPIClient
59
+ - b.use FetchEnvironment
60
+ + b.use action_initialize
61
+ b.use ReadSSHInfo
62
+ end
63
+ end
64
+ @@ -127,9 +117,7 @@
65
+ # key.
66
+ def self.action_read_state
67
+ Vagrant::Action::Builder.new.tap do |b|
68
+ - b.use ConfigValidate
69
+ - b.use InitializeAPIClient
70
+ - b.use FetchEnvironment
71
+ + b.use action_initialize
72
+ #TODO:NLA Can this whole action be removed?
73
+ b.use ReadState
74
+ end
75
+ @@ -138,9 +126,7 @@
76
+ # This action is called to SSH into the machine.
77
+ def self.action_ssh
78
+ Vagrant::Action::Builder.new.tap do |b|
79
+ - b.use ConfigValidate
80
+ - b.use InitializeAPIClient
81
+ - b.use FetchEnvironment
82
+ + b.use action_initialize
83
+ b.use Call, ExistenceCheck do |env1, b1|
84
+ case result = env1[:result]
85
+ when :missing_environment, :missing_vm, :no_vms
86
+ @@ -154,9 +140,7 @@
87
+
88
+ def self.action_ssh_run
89
+ Vagrant::Action::Builder.new.tap do |b|
90
+ - b.use ConfigValidate
91
+ - b.use InitializeAPIClient
92
+ - b.use FetchEnvironment
93
+ + b.use action_initialize
94
+ b.use Call, ExistenceCheck do |env1, b1|
95
+ case result = env1[:result]
96
+ when :missing_environment, :missing_vm, :no_vms
97
+ @@ -184,26 +168,37 @@
98
+ end
99
+ end
100
+
101
+ - # This action is called to bring the box up from nothing.
102
+ - def self.action_up
103
+ + def self.action_create_vm
104
+ Vagrant::Action::Builder.new.tap do |b|
105
+ - b.use HandleBox
106
+ - b.use ConfigValidate
107
+ - b.use InitializeAPIClient
108
+ - b.use FetchEnvironment
109
+ b.use Call, ExistenceCheck do |env, b1|
110
+ case result = env[:result]
111
+ when :missing_environment
112
+ b1.use CreateEnvironment
113
+ - b1.use MessageEnvironmentUrl
114
+ when :no_vms, :missing_vm
115
+ b1.use AddVmToEnvironment
116
+ else
117
+ next
118
+ end
119
+ +
120
+ + # FetchSourceVm
121
+ + # FetchTargetEnvironment
122
+ + # CheckSuitability
123
+ + # if environment exists, checks region mismatch
124
+ +
125
+ b1.use StoreExtraData
126
+ - b1.use SetUpVm
127
+ + b1.use SetRouting
128
+ + b1.use SetCredentials
129
+ end
130
+ + end
131
+ + end
132
+ +
133
+ + # This action is called to bring the box up from nothing.
134
+ + def self.action_up
135
+ + Vagrant::Action::Builder.new.tap do |b|
136
+ + b.use HandleBox
137
+ + b.use action_initialize
138
+ + b.use action_create_vm
139
+ +
140
+ b.use Call, IsRunning do |env, b1|
141
+ if env[:result]
142
+ b1.use MessageAlreadyRunning
143
+ @@ -226,9 +221,7 @@
144
+
145
+ def self.action_reload
146
+ Vagrant::Action::Builder.new.tap do |b|
147
+ - b.use ConfigValidate
148
+ - b.use InitializeAPIClient
149
+ - b.use FetchEnvironment
150
+ + b.use action_initialize
151
+ b.use Call, ExistenceCheck do |env, b2|
152
+ case env[:result]
153
+ when :missing_environment, :missing_vm, :no_vms
154
+ @@ -241,6 +234,17 @@
155
+ end
156
+ end
157
+
158
+ + def self.action_initialize
159
+ + Vagrant::Action::Builder.new.tap do |b|
160
+ + b.use ConfigValidate
161
+ + b.use InitializeAPIClient
162
+ + b.use FetchEnvironment
163
+ + b.use ReadState
164
+ + # Can we make this Callable and do ExistenceCheck on the
165
+ + # block? It's a logical unit almost everywhere.
166
+ + end
167
+ + end
168
+ +
169
+ # The autoload farm
170
+ action_root = Pathname.new(File.expand_path("../action", __FILE__))
171
+ autoload :StoreExtraData, action_root.join("store_extra_data")
172
+ @@ -265,8 +269,9 @@
173
+ autoload :ReadState, action_root.join("read_state")
174
+ autoload :RunEnvironment, action_root.join("run_environment")
175
+ autoload :RunVm, action_root.join("run_vm")
176
+ + autoload :SetCredentials, action_root.join("set_credentials")
177
+ autoload :SetHostname, action_root.join("set_hostname")
178
+ - autoload :SetUpVm, action_root.join("set_up_vm")
179
+ + autoload :SetRouting, action_root.join("set_routing")
180
+ autoload :StopVm, action_root.join("stop_vm")
181
+ autoload :SuspendVm, action_root.join("suspend_vm")
182
+ autoload :TimedProvision, action_root.join("timed_provision") # some plugins now expect this action to exist
183
+ diff -r c24fb4f0f929 lib/vagrant-skytap/action/create_environment.rb
184
+ --- a/lib/vagrant-skytap/action/create_environment.rb Mon Nov 16 15:28:30 2015 -0800
185
+ +++ b/lib/vagrant-skytap/action/create_environment.rb Tue Nov 17 12:09:41 2015 -0800
186
+ @@ -30,6 +30,7 @@
187
+ env[:environment] = environment
188
+ environment.properties.write('url' => environment.url)
189
+ env[:machine].id = environment.vms.first.id
190
+ + env[:ui].info(I18n.t("vagrant_skytap.environment_url", url: environment.url))
191
+ environment.wait_until_ready
192
+
193
+ @app.call(env)
194
+ diff -r c24fb4f0f929 lib/vagrant-skytap/action/message_environment_url.rb
195
+ --- a/lib/vagrant-skytap/action/message_environment_url.rb Mon Nov 16 15:28:30 2015 -0800
196
+ +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
197
+ @@ -1,16 +0,0 @@
198
+ -module VagrantPlugins
199
+ - module Skytap
200
+ - module Action
201
+ - class MessageEnvironmentUrl
202
+ - def initialize(app, env)
203
+ - @app = app
204
+ - end
205
+ -
206
+ - def call(env)
207
+ - env[:ui].info(I18n.t("vagrant_skytap.environment_url", url: env[:environment].url))
208
+ - @app.call(env)
209
+ - end
210
+ - end
211
+ - end
212
+ - end
213
+ -end
214
+ diff -r c24fb4f0f929 lib/vagrant-skytap/action/read_state.rb
215
+ --- a/lib/vagrant-skytap/action/read_state.rb Mon Nov 16 15:28:30 2015 -0800
216
+ +++ b/lib/vagrant-skytap/action/read_state.rb Tue Nov 17 12:09:41 2015 -0800
217
+ @@ -22,14 +22,10 @@
218
+ @app.call(env)
219
+ end
220
+
221
+ + # Assumes FetchEnvironment was called to populate env[:environment].
222
+ def read_state(machine)
223
+ - if VmProperties.read(machine.data_dir)
224
+ - if environment = env[:environment]
225
+ - environment.reload
226
+ - elsif props = API::Environment.properties(env)
227
+ - @logger.info("env[:environment] was not set!")
228
+ - end
229
+ -
230
+ + if environment = env[:environment]
231
+ + environment.reload
232
+ if vm = environment.try(:current_vm)
233
+ return vm.runstate.to_sym
234
+ end
235
+ diff -r c24fb4f0f929 lib/vagrant-skytap/action/set_credentials.rb
236
+ --- /dev/null Thu Jan 01 00:00:00 1970 +0000
237
+ +++ b/lib/vagrant-skytap/action/set_credentials.rb Tue Nov 17 12:09:41 2015 -0800
238
+ @@ -0,0 +1,20 @@
239
+ +require 'log4r'
240
+ +require 'vagrant-skytap/setup_helper'
241
+ +
242
+ +module VagrantPlugins
243
+ + module Skytap
244
+ + module Action
245
+ + class SetCredentials
246
+ + def initialize(app, env)
247
+ + @app = app
248
+ + @logger = Log4r::Logger.new("vagrant_skytap::action::set_credentials")
249
+ + end
250
+ +
251
+ + def call(env)
252
+ + SetupHelper.new(env).set_credentials
253
+ + @app.call(env)
254
+ + end
255
+ + end
256
+ + end
257
+ + end
258
+ +end
259
+ diff -r c24fb4f0f929 lib/vagrant-skytap/action/set_routing.rb
260
+ --- /dev/null Thu Jan 01 00:00:00 1970 +0000
261
+ +++ b/lib/vagrant-skytap/action/set_routing.rb Tue Nov 17 12:09:41 2015 -0800
262
+ @@ -0,0 +1,20 @@
263
+ +require 'log4r'
264
+ +require 'vagrant-skytap/setup_helper'
265
+ +
266
+ +module VagrantPlugins
267
+ + module Skytap
268
+ + module Action
269
+ + class SetRouting
270
+ + def initialize(app, env)
271
+ + @app = app
272
+ + @logger = Log4r::Logger.new("vagrant_skytap::action::set_routing")
273
+ + end
274
+ +
275
+ + def call(env)
276
+ + SetupHelper.new(env).set_routing
277
+ + @app.call(env)
278
+ + end
279
+ + end
280
+ + end
281
+ + end
282
+ +end
283
+ diff -r c24fb4f0f929 lib/vagrant-skytap/action/set_up_vm.rb
284
+ --- a/lib/vagrant-skytap/action/set_up_vm.rb Mon Nov 16 15:28:30 2015 -0800
285
+ +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
286
+ @@ -1,21 +0,0 @@
287
+ -require 'log4r'
288
+ -require 'json'
289
+ -require 'vagrant-skytap/setup_helper'
290
+ -
291
+ -module VagrantPlugins
292
+ - module Skytap
293
+ - module Action
294
+ - class SetUpVm
295
+ - def initialize(app, env)
296
+ - @app = app
297
+ - @logger = Log4r::Logger.new("vagrant_skytap::action::set_up_vm")
298
+ - end
299
+ -
300
+ - def call(env)
301
+ - SetupHelper.run!(env, env[:environment])
302
+ - @app.call(env)
303
+ - end
304
+ - end
305
+ - end
306
+ - end
307
+ -end
308
+ diff -r c24fb4f0f929 lib/vagrant-skytap/config.rb
309
+ --- a/lib/vagrant-skytap/config.rb Mon Nov 16 15:28:30 2015 -0800
310
+ +++ b/lib/vagrant-skytap/config.rb Tue Nov 17 12:09:41 2015 -0800
311
+ @@ -80,7 +80,9 @@
312
+ @api_token = ENV['VAGRANT_SKYTAP_API_TOKEN'] if @api_token == UNSET_VALUE
313
+
314
+ # Base URL for API calls.
315
+ - @base_url = "https://cloud.skytap.com/" if @base_url == UNSET_VALUE
316
+ + if @base_url == UNSET_VALUE
317
+ + @base_url = ENV['VAGRANT_SKYTAP_BASE_URL'].presence || "https://cloud.skytap.com/"
318
+ + end
319
+
320
+ # Source VM url must be set.
321
+ @vm_url = nil if @vm_url == UNSET_VALUE
322
+ diff -r c24fb4f0f929 lib/vagrant-skytap/plugin.rb
323
+ --- a/lib/vagrant-skytap/plugin.rb Mon Nov 16 15:28:30 2015 -0800
324
+ +++ b/lib/vagrant-skytap/plugin.rb Tue Nov 17 12:09:41 2015 -0800
325
+ @@ -24,6 +24,7 @@
326
+ Config
327
+ end
328
+
329
+ + #provider(:skytap, parallel: true) do
330
+ provider(:skytap, parallel: false) do
331
+ # Setup logging and i18n
332
+ setup_logging
333
+ @@ -34,6 +35,11 @@
334
+ Provider
335
+ end
336
+
337
+ + command("up", primary: true) do
338
+ + require_relative "command/up"
339
+ + Command::Up
340
+ + end
341
+ +
342
+ # This initializes the internationalization strings.
343
+ def self.setup_i18n
344
+ I18n.load_path << File.expand_path("locales/en.yml", Skytap.source_root)
345
+ diff -r c24fb4f0f929 lib/vagrant-skytap/setup_helper.rb
346
+ --- a/lib/vagrant-skytap/setup_helper.rb Mon Nov 16 15:28:30 2015 -0800
347
+ +++ b/lib/vagrant-skytap/setup_helper.rb Tue Nov 17 12:09:41 2015 -0800
348
+ @@ -10,14 +10,10 @@
349
+ attr_reader :env, :environment, :machine, :provider_config
350
+ attr_reader :username, :password, :host, :port
351
+
352
+ - def self.run!(env, environment)
353
+ - new(env, environment).run!
354
+ - end
355
+ -
356
+ - def initialize(env, environment)
357
+ + def initialize(env)
358
+ @env = env
359
+ @logger = Log4r::Logger.new("vagrant_skytap::setup_helper")
360
+ - @environment = environment
361
+ + @environment = env[:environment]
362
+ @machine = env[:machine]
363
+ @provider_config = env[:machine].provider_config
364
+ @username = @machine.config.ssh.username
365
+ @@ -30,12 +26,20 @@
366
+ environment.current_vm
367
+ end
368
+
369
+ - def run!
370
+ + def set_routing
371
+ ask_routing
372
+ - ask_credentials
373
+ - write_properties
374
+ + VmProperties.write(env[:machine].data_dir,
375
+ + 'host' => host,
376
+ + 'port' => port)
377
+ +
378
+ end
379
+
380
+ + def set_credentials
381
+ + ask_credentials
382
+ + VmProperties.write(env[:machine].data_dir,
383
+ + 'username' => username,
384
+ + 'password' => password)
385
+ + end
386
+
387
+ private
388
+
389
+ @@ -189,14 +193,6 @@
390
+
391
+ env[:ui].ask(prompt, {prefix: false}.merge(options))
392
+ end
393
+ -
394
+ - def write_properties
395
+ - VmProperties.write(env[:machine].data_dir,
396
+ - 'username' => username,
397
+ - 'password' => password,
398
+ - 'host' => host,
399
+ - 'port' => port)
400
+ - end
401
+ end
402
+ end
403
+ end
@@ -0,0 +1,67 @@
1
+ # HG changeset patch
2
+ # Parent 1e2e97f6f44b0e6b126aca3ed3b0d5110ee694e9
3
+ [mq]: eng-11616-2
4
+
5
+ diff -r 1e2e97f6f44b lib/vagrant-skytap/command/up.rb
6
+ --- a/lib/vagrant-skytap/command/up.rb Mon Nov 16 18:02:44 2015 -0800
7
+ +++ b/lib/vagrant-skytap/command/up.rb Tue Nov 17 12:08:41 2015 -0800
8
+ @@ -53,31 +53,43 @@
9
+
10
+ # Build up the batch job of what we'll do
11
+ machines = []
12
+ - @env.batch(options[:parallel]) do |batch|
13
+ - names = argv
14
+ - if names.empty?
15
+ - autostart = false
16
+ - @env.vagrantfile.machine_names_and_options.each do |n, o|
17
+ - autostart = true if o.key?(:autostart)
18
+ - o[:autostart] = true if !o.key?(:autostart)
19
+ - names << n.to_s if o[:autostart]
20
+ + names = argv
21
+ + if names.empty?
22
+ + autostart = false
23
+ + @env.vagrantfile.machine_names_and_options.each do |n, o|
24
+ + autostart = true if o.key?(:autostart)
25
+ + o[:autostart] = true if !o.key?(:autostart)
26
+ + names << n.to_s if o[:autostart]
27
+ + end
28
+ +
29
+ + # If we have an autostart key but no names, it means that
30
+ + # all machines are autostart: false and we don't start anything.
31
+ + names = nil if autostart && names.empty?
32
+ + end
33
+ +
34
+ + if names
35
+ + if options[:parallel]
36
+ + @env.batch do |batch|
37
+ + with_target_vms(names, provider: options[:provider]) do |machine|
38
+ + # batch.action(machine, :pre_up, options)
39
+ + end
40
+ end
41
+
42
+ - # If we have an autostart key but no names, it means that
43
+ - # all machines are autostart: false and we don't start anything.
44
+ - names = nil if autostart && names.empty?
45
+ - end
46
+ + # up
47
+
48
+ - if names
49
+ + @env.batch do |batch|
50
+ + with_target_vms(names, provider: options[:provider]) do |machine|
51
+ + # batch.action(machine, :post_up, options)
52
+ + end
53
+ + end
54
+ + else
55
+ with_target_vms(names, provider: options[:provider]) do |machine|
56
+ @env.ui.info(I18n.t(
57
+ "vagrant.commands.up.upping",
58
+ name: machine.name,
59
+ provider: machine.provider_name))
60
+ -
61
+ machines << machine
62
+ -
63
+ - batch.action(machine, :up, options)
64
+ + machine.action(:up)
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,184 @@
1
+ # HG changeset patch
2
+ # Parent bc32846888f966e4da20f51175d02f6aea678dd4
3
+ ENG-11616 actually refactoring up
4
+
5
+ diff -r bc32846888f9 lib/vagrant-skytap/action.rb
6
+ --- a/lib/vagrant-skytap/action.rb Mon Nov 16 15:47:02 2015 -0800
7
+ +++ b/lib/vagrant-skytap/action.rb Mon Nov 16 18:02:32 2015 -0800
8
+ @@ -192,33 +192,56 @@
9
+ end
10
+ end
11
+
12
+ - # This action is called to bring the box up from nothing.
13
+ + # This action is called to actually bring the box up.
14
+ def self.action_up
15
+ Vagrant::Action::Builder.new.tap do |b|
16
+ - b.use HandleBox
17
+ - b.use action_initialize
18
+ - b.use action_create_vm
19
+ -
20
+ + b.use action_pre_up
21
+ b.use Call, IsRunning do |env, b1|
22
+ if env[:result]
23
+ b1.use MessageAlreadyRunning
24
+ next
25
+ end
26
+ + b1.use action_actual_up
27
+ + b1.use action_post_up
28
+ + end
29
+ + end
30
+ + end
31
+
32
+ - b1.use Call, IsStopped do |env2, b2|
33
+ - if env2[:result]
34
+ - b2.use UpdateHardware
35
+ - b2.use SetHostname
36
+ - b2.use action_prepare_boot
37
+ - end
38
+ -
39
+ - b2.use RunVm
40
+ - b2.use WaitForCommunicator
41
+ + # This action is called to prepare to bring the box up from nothing.
42
+ + def self.action_pre_up
43
+ + Vagrant::Action::Builder.new.tap do |b|
44
+ + b.use HandleBox
45
+ + b.use action_initialize
46
+ + b.use action_create_vm
47
+ + b.use Call, IsStopped do |env2, b2|
48
+ + if env2[:result]
49
+ + b2.use UpdateHardware
50
+ + b2.use SetHostname
51
+ + b2.use action_prepare_boot
52
+ end
53
+ end
54
+ end
55
+ end
56
+
57
+ + # This action is called to actually bring the box up.
58
+ + def self.action_actual_up
59
+ + Vagrant::Action::Builder.new.tap do |b|
60
+ + b.use Call, IsRunning do |env, b1|
61
+ + if env[:result]
62
+ + b1.use MessageAlreadyRunning
63
+ + next
64
+ + end
65
+ + b2.use RunVm
66
+ + end
67
+ + end
68
+ + end
69
+ +
70
+ + def self.action_post_up
71
+ + Vagrant::Action::Builder.new.tap do |b|
72
+ + b.use WaitForCommunicator
73
+ + end
74
+ + end
75
+ +
76
+ def self.action_reload
77
+ Vagrant::Action::Builder.new.tap do |b|
78
+ b.use action_initialize
79
+ diff -r bc32846888f9 lib/vagrant-skytap/action/run_environment.rb
80
+ --- a/lib/vagrant-skytap/action/run_environment.rb Mon Nov 16 15:47:02 2015 -0800
81
+ +++ b/lib/vagrant-skytap/action/run_environment.rb Mon Nov 16 18:02:32 2015 -0800
82
+ @@ -17,7 +17,7 @@
83
+
84
+ def call(env)
85
+ env[:ui].info(I18n.t("vagrant_skytap.launching_instance"))
86
+ - environment.run!
87
+ + environment.run_multiple!
88
+
89
+ @app.call(env)
90
+ end
91
+ diff -r bc32846888f9 lib/vagrant-skytap/api/environment.rb
92
+ --- a/lib/vagrant-skytap/api/environment.rb Mon Nov 16 15:47:02 2015 -0800
93
+ +++ b/lib/vagrant-skytap/api/environment.rb Mon Nov 16 18:02:32 2015 -0800
94
+ @@ -48,6 +48,10 @@
95
+ @provider_config = env[:machine].provider_config
96
+ end
97
+
98
+ + def run_multiple!(vm_ids = [])
99
+ + run!
100
+ + end
101
+ +
102
+ def vms
103
+ @vms ||= (get_api_attribute('vms') || []).collect do |vm_attrs|
104
+ Vm.new(vm_attrs, self, env)
105
+ diff -r bc32846888f9 lib/vagrant-skytap/command/up.rb
106
+ --- a/lib/vagrant-skytap/command/up.rb Mon Nov 16 15:47:02 2015 -0800
107
+ +++ b/lib/vagrant-skytap/command/up.rb Mon Nov 16 18:02:32 2015 -0800
108
+ @@ -1,5 +1,6 @@
109
+ require 'optparse'
110
+ require_relative 'start_mixins'
111
+ +require 'byebug'
112
+
113
+ module VagrantPlugins
114
+ module Skytap
115
+ @@ -53,22 +54,24 @@
116
+
117
+ # Build up the batch job of what we'll do
118
+ machines = []
119
+ - @env.batch(options[:parallel]) do |batch|
120
+ - names = argv
121
+ - if names.empty?
122
+ - autostart = false
123
+ - @env.vagrantfile.machine_names_and_options.each do |n, o|
124
+ - autostart = true if o.key?(:autostart)
125
+ - o[:autostart] = true if !o.key?(:autostart)
126
+ - names << n.to_s if o[:autostart]
127
+ - end
128
+ -
129
+ - # If we have an autostart key but no names, it means that
130
+ - # all machines are autostart: false and we don't start anything.
131
+ - names = nil if autostart && names.empty?
132
+ + names = argv
133
+ + if names.empty?
134
+ + autostart = false
135
+ + @env.vagrantfile.machine_names_and_options.each do |n, o|
136
+ + autostart = true if o.key?(:autostart)
137
+ + o[:autostart] = true if !o.key?(:autostart)
138
+ + names << n.to_s if o[:autostart]
139
+ end
140
+
141
+ - if names
142
+ + # If we have an autostart key but no names, it means that
143
+ + # all machines are autostart: false and we don't start anything.
144
+ + names = nil if autostart && names.empty?
145
+ + end
146
+ +
147
+ +
148
+ +
149
+ + if names
150
+ + @env.batch(options[:parallel]) do |batch|
151
+ with_target_vms(names, provider: options[:provider]) do |machine|
152
+ @env.ui.info(I18n.t(
153
+ "vagrant.commands.up.upping",
154
+ @@ -77,11 +80,29 @@
155
+
156
+ machines << machine
157
+
158
+ - batch.action(machine, :up, options)
159
+ + batch.action(machine, :pre_up, options)
160
+ + if !options[:parallel]
161
+ + batch.action(machine, :up, options)
162
+ + #batch.action(machine, :post_up, options) # note: this gives success message even if the machine was already running
163
+ + end
164
+ end
165
+ end
166
+ end
167
+
168
+ + # Don't use normal Vagrant parallelization to run VMs
169
+ + if options[:parallel] && machines
170
+ + # do thing, then
171
+ +
172
+ + # WaitForCommunicator
173
+ + @env.batch do |batch|
174
+ + with_target_vms(names, provider: options[:provider]) do |machine|
175
+ + batch.action(machine, :post_up, options)
176
+ + end
177
+ + end
178
+ + end
179
+ +
180
+ +
181
+ +
182
+ if machines.empty?
183
+ @env.ui.info(I18n.t("vagrant.up_no_machines"))
184
+ return 0
@@ -0,0 +1,4 @@
1
+ # HG changeset patch
2
+ # Parent 0f7b255ffa6a13cd9435bebbfe2bee9f618f46a6
3
+ ENG-11625 find clean way to just invoke the builtin action directly
4
+