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,632 @@
1
+ # HG changeset patch
2
+ # Parent 444a060a037d79990b65d796632a91bbed6f6918
3
+ # Parent 444a060a037d79990b65d796632a91bbed6f6918
4
+ ENG-10256 port forwarding
5
+
6
+ diff -r 444a060a037d lib/vagrant-skytap/action.rb
7
+ --- a/lib/vagrant-skytap/action.rb Tue Jan 12 22:30:01 2016 -0800
8
+ +++ b/lib/vagrant-skytap/action.rb Tue Jan 12 22:44:41 2016 -0800
9
+ @@ -290,9 +290,9 @@
10
+ b.use ClearForwardedPorts
11
+ b.use ReadSSHInfo
12
+ b.use Message, "forwarding ports"
13
+ - #b.use EnvSet, port_collision_repair: true # does it just work?
14
+ - #b.use PrepareForwardedPortCollisionParams
15
+ - #b.use HandleForwardedPortCollisions
16
+ + b.use EnvSet, port_collision_repair: true # does it just work?
17
+ + b.use PrepareForwardedPortCollisionParams
18
+ + b.use HandleForwardedPortCollisions
19
+ b.use ForwardPorts
20
+ end
21
+ end
22
+ diff -r 444a060a037d lib/vagrant-skytap/action/clear_forwarded_ports.rb
23
+ --- a/lib/vagrant-skytap/action/clear_forwarded_ports.rb Tue Jan 12 22:30:01 2016 -0800
24
+ +++ b/lib/vagrant-skytap/action/clear_forwarded_ports.rb Tue Jan 12 22:44:41 2016 -0800
25
+ @@ -12,27 +12,11 @@
26
+ end
27
+
28
+ def call(env)
29
+ - if pidfiles = read_pidfiles.presence
30
+ - env[:ui].info I18n.t("vagrant.actions.vm.clear_forward_ports.deleting")
31
+ - kill_tunnels(pidfiles)
32
+ - end
33
+ + env[:ui].info I18n.t("vagrant.actions.vm.clear_forward_ports.deleting")
34
+ + pidfiles = @env[:host].capability(:kill_forwarded_ports, @env)
35
+
36
+ @app.call(env)
37
+ end
38
+ -
39
+ - def read_pidfiles
40
+ - pidfiles = []
41
+ - Vagrant::Util::SafeChdir.safe_chdir(@env[:machine].data_dir) do
42
+ - pidfiles = Dir.glob("*.pid")
43
+ - end
44
+ - pidfiles
45
+ - end
46
+ -
47
+ - def kill_tunnels(pidfiles)
48
+ - pidfiles.each do |pidfile|
49
+ - @env[:host].capability(:kill_ssh_tunnel, pidfile, @env)
50
+ - end
51
+ - end
52
+ end
53
+ end
54
+ end
55
+ diff -r 444a060a037d lib/vagrant-skytap/action/prepare_forwarded_port_collision_params.rb
56
+ --- a/lib/vagrant-skytap/action/prepare_forwarded_port_collision_params.rb Tue Jan 12 22:30:01 2016 -0800
57
+ +++ b/lib/vagrant-skytap/action/prepare_forwarded_port_collision_params.rb Tue Jan 12 22:44:41 2016 -0800
58
+ @@ -9,12 +9,12 @@
59
+ def call(env)
60
+ # Get the forwarded ports used by other virtual machines and
61
+ # consider those in use as well.
62
+ - env[:port_collision_extra_in_use] = read_used_ports
63
+ + env[:port_collision_extra_in_use] = @env[:host].capability(:read_used_ports, @env)
64
+
65
+ # Build the remap for any existing collision detections
66
+ remap = {}
67
+ env[:port_collision_remap] = remap
68
+ - read_forwarded_ports.each do |_nic, name, hostport, _guestport|
69
+ + env[:host].capability(:read_forwarded_ports, env).each do |_nic, name, hostport, _guestport|
70
+ env[:machine].config.vm.networks.each do |type, options|
71
+ next if type != :forwarded_port
72
+
73
+ @@ -29,16 +29,6 @@
74
+
75
+ @app.call(env)
76
+ end
77
+ -
78
+ - def read_used_ports
79
+ - #env[:machine].provider.driver.read_used_ports
80
+ - []
81
+ - end
82
+ -
83
+ - def read_forwarded_ports
84
+ - #env[:machine].provider.driver.read_forwarded_ports
85
+ - []
86
+ - end
87
+ end
88
+ end
89
+ end
90
+ diff -r 444a060a037d lib/vagrant-skytap/hosts/bsd/cap/ssh_tunnel.rb
91
+ --- a/lib/vagrant-skytap/hosts/bsd/cap/ssh_tunnel.rb Tue Jan 12 22:30:01 2016 -0800
92
+ +++ b/lib/vagrant-skytap/hosts/bsd/cap/ssh_tunnel.rb Tue Jan 12 22:44:41 2016 -0800
93
+ @@ -1,109 +1,12 @@
94
+ -require "pathname"
95
+ -require "tmpdir"
96
+ -require 'childprocess'
97
+ -require "vagrant/util/subprocess"
98
+ -#require 'byebug'
99
+ -#require 'ap'
100
+ -require 'log4r'
101
+ -require "vagrant/util/safe_chdir"
102
+ +require "vagrant-skytap/hosts/common/cap/ssh_tunnel"
103
+
104
+ module VagrantPlugins
105
+ module Skytap
106
+ module HostBSD
107
+ module Cap
108
+ - class SSHTunnel
109
+ - def self.start_ssh_tunnel(env, fp, env_hash)
110
+ - logger = Log4r::Logger.new("vagrant::hosts::bsd")
111
+ - port = {
112
+ - adapter: fp.adapter,
113
+ - guestip: fp.guest_ip,
114
+ - guestport: fp.guest_port,
115
+ - hostip: fp.host_ip,
116
+ - hostport: fp.host_port,
117
+ - name: fp.id,
118
+ - protocol: fp.protocol
119
+ - }
120
+ -
121
+ - pidfile = pidfile_name(port, env_hash)
122
+ - pid = read_pid(pidfile)
123
+ - if pid && autossh_pid?(pid)
124
+ - logger.info("An autossh process already exists with pid #{pid}.")
125
+ - else
126
+ - args = autossh_args(port, pidfile, env_hash)
127
+ - Vagrant::Util::Subprocess.execute("autossh", *args)
128
+ - end
129
+ - end
130
+ -
131
+ - def self.kill_ssh_tunnel(env, pidfile, env_hash)
132
+ - logger = Log4r::Logger.new("vagrant::hosts::bsd")
133
+ - pidfile = File.join(env_hash[:machine].data_dir, pidfile)
134
+ - pid = read_pid(pidfile)
135
+ - if pid && autossh_pid?(pid)
136
+ - Vagrant::Util::Subprocess.execute("kill", pid.to_s)
137
+ - else
138
+ - logger.info("Cleaning up stale autossh pidfile #{pidfile}.")
139
+ - Vagrant::Util::Subprocess.execute("rm", pidfile)
140
+ - end
141
+ - end
142
+ -
143
+ - private
144
+ -
145
+ - def self.pidfile_name(port, env_hash)
146
+ - tunnel_name = [port[:hostip], port[:name]].compact.join('_')
147
+ - File.join(env_hash[:machine].data_dir, "#{tunnel_name}.pid")
148
+ - end
149
+ -
150
+ - def self.read_pid(pidfile)
151
+ - File.read(pidfile).presence.try(:to_i) if File.exist?(pidfile)
152
+ - end
153
+ -
154
+ - # Checks that the pid is actually an autossh process (and not
155
+ - # something else using a recycled pid).
156
+ - def self.autossh_pid?(pid)
157
+ - # get_comm_for_pid(pid) == 'autossh'
158
+ - true
159
+ - end
160
+ -
161
+ - # Get the command, minus any arguments, for the given
162
+ - # pid. I don't expect this to be compatible cross-platform yet...
163
+ - # This could be complicated cross-platform, and Sys::ProcTable
164
+ - # could likewise be complicated cross-platform ...
165
+ - def self.get_comm_for_pid(pid)
166
+ - result = Vagrant::Util::Subprocess.execute("ps", "-p", pid.to_s, "-o", "comm")
167
+ - result.stdout.split("\n").last
168
+ - end
169
+ -
170
+ - def self.autossh_args(port, pidfile, env_hash)
171
+ - ssh_info = env_hash[:machine_ssh_info]
172
+ - ssh_options = {
173
+ - "ServerAliveInterval" => 10,
174
+ - "ServerAliveCountMax" => 3,
175
+ - "StrictHostKeyChecking" => "no",
176
+ - }
177
+ - environment_variables = {
178
+ - env: {
179
+ - "AUTOSSH_PIDFILE" => pidfile,
180
+ - "AUTOSSH_PORT" => 0, # turns off monitoring
181
+ - "AUTOSSH_LOGFILE" => "/tmp/autossh.log",
182
+ - }
183
+ - }
184
+ - forward_string = [
185
+ - port[:hostport],
186
+ - "localhost",
187
+ - port[:guestport]
188
+ - ].join(':')
189
+ -
190
+ - autossh_args = []
191
+ - autossh_args << "-q"
192
+ - autossh_args << "-N"
193
+ - autossh_args << "-f"
194
+ - autossh_args << "-i" << env_hash[:machine].data_dir.join("private_key").to_s
195
+ - autossh_args << "-L" << forward_string
196
+ - ssh_options.each do |k, v|
197
+ - autossh_args << "-o" << "#{k}=#{v}"
198
+ - end
199
+ - autossh_args << "#{ssh_info[:username]}@#{ssh_info[:host]}"
200
+ - autossh_args << environment_variables
201
+ + class SSHTunnel < VagrantPlugins::Skytap::HostCommon::Cap::SSHTunnel
202
+ + def self.create_logger
203
+ + Log4r::Logger.new("vagrant::hosts::bsd")
204
+ end
205
+ end
206
+ end
207
+ diff -r 444a060a037d lib/vagrant-skytap/hosts/common/cap/ssh_tunnel.rb
208
+ --- /dev/null Thu Jan 01 00:00:00 1970 +0000
209
+ +++ b/lib/vagrant-skytap/hosts/common/cap/ssh_tunnel.rb Tue Jan 12 22:44:41 2016 -0800
210
+ @@ -0,0 +1,119 @@
211
+ +require "pathname"
212
+ +require "tmpdir"
213
+ +require 'childprocess'
214
+ +require "vagrant/util/subprocess"
215
+ +require 'byebug'
216
+ +require 'awesome_print'
217
+ +require 'log4r'
218
+ +require "vagrant/util/safe_chdir"
219
+ +
220
+ +module VagrantPlugins
221
+ + module Skytap
222
+ + module HostCommon
223
+ + module Cap
224
+ + class SSHTunnel
225
+ + def self.create_logger
226
+ + Log4r::Logger.new("vagrant::hosts::common")
227
+ + end
228
+ +
229
+ + # called per port by ForwardPorts
230
+ + def self.start_ssh_tunnel(env, fp, env_hash)
231
+ + logger = create_logger
232
+ + machine = env_hash[:machine]
233
+ + pid = read_pid(File.join(machine.data_dir, pidfile_name(fp)))
234
+ + if pid && autossh_pid?(pid)
235
+ + logger.info("An autossh process already exists with pid #{pid}.")
236
+ + else
237
+ + args = autossh_args(fp, pidfile, env_hash)
238
+ + Vagrant::Util::Subprocess.execute("autossh", *args)
239
+ + end
240
+ + end
241
+ +
242
+ + # called for machine by ClearForwardedPorts
243
+ + def self.kill_forwarded_ports(env, env_hash)
244
+ + get_pidfiles_for_machine(env_hash[:machine]).each do |pidfile|
245
+ + kill_ssh_tunnel(env, pidfile, env_hash)
246
+ + end
247
+ + end
248
+ +
249
+ + # exposed but not called currently from any action
250
+ + def self.kill_ssh_tunnel(env, pidfile, env_hash)
251
+ + logger = create_logger
252
+ + machine = env_hash[:machine]
253
+ + pid = read_pid(File.join(machine.data_dir, pidfile))
254
+ + if pid && autossh_pid?(pid)
255
+ + Vagrant::Util::Subprocess.execute("kill", pid.to_s)
256
+ + else
257
+ + logger.info("Cleaning up stale autossh pidfile #{pidfile}.")
258
+ + Vagrant::Util::Subprocess.execute("rm", pidfile)
259
+ + end
260
+ + end
261
+ +
262
+ + ####################################
263
+ +
264
+ + def self.pidfile_name(fp)
265
+ + "#{fp[:host_ip]}.pid"
266
+ + end
267
+ +
268
+ + def self.read_pid(pidfile_path)
269
+ + File.read(pidfile_path).presence.try(:to_i) if File.exist?(pidfile_path)
270
+ + end
271
+ +
272
+ + def self.get_pidfiles_for_machine(machine)
273
+ + pidfiles = []
274
+ + Vagrant::Util::SafeChdir.safe_chdir(machine.data_dir) do
275
+ + pidfiles = Dir.glob("*.pid")
276
+ + end
277
+ + pidfiles
278
+ + end
279
+ +
280
+ + ####################################
281
+ +
282
+ + # Checks that the pid is actually an autossh process (and not
283
+ + # something else using a recycled pid).
284
+ + def self.autossh_pid?(pid)
285
+ + # get_comm_for_pid(pid) == 'autossh'
286
+ + true
287
+ + end
288
+ +
289
+ + # Get the command, minus any arguments, for the given
290
+ + # pid. This probably needs to be overridden per host cap
291
+ + def self.get_comm_for_pid(pid)
292
+ + result = Vagrant::Util::Subprocess.execute("ps", "-p", pid.to_s, "-o", "comm")
293
+ + result.stdout.split("\n").last
294
+ + end
295
+ +
296
+ + ####################################
297
+ +
298
+ + def self.autossh_args(fp, pidfile, env_hash)
299
+ + machine = env_hash[:machine]
300
+ + ssh_info = env_hash[:machine_ssh_info]
301
+ + ssh_options = {
302
+ + "ServerAliveInterval" => 10,
303
+ + "ServerAliveCountMax" => 3,
304
+ + "StrictHostKeyChecking" => "no",
305
+ + }
306
+ + environment_variables = {
307
+ + env: {
308
+ + "AUTOSSH_PIDFILE" => pidfile,
309
+ + "AUTOSSH_PORT" => 0, # turn off monitoring
310
+ + }
311
+ + }
312
+ +
313
+ + autossh_args = []
314
+ + autossh_args << "-q"
315
+ + autossh_args << "-N"
316
+ + autossh_args << "-f"
317
+ + autossh_args << "-i" << machine.data_dir.join("private_key").to_s
318
+ + autossh_args << "-L" << "#{fp[:host_port]}:localhost:#{fp[:guest_port]}"
319
+ + ssh_options.each do |k, v|
320
+ + autossh_args << "-o" << "#{k}=#{v}"
321
+ + end
322
+ + autossh_args << "#{ssh_info[:username]}@#{ssh_info[:host]}"
323
+ + autossh_args << environment_variables
324
+ + end
325
+ + end
326
+ + end
327
+ + end
328
+ + end
329
+ +end
330
+ diff -r 444a060a037d lib/vagrant-skytap/hosts/linux/cap/ssh_tunnel.rb
331
+ --- a/lib/vagrant-skytap/hosts/linux/cap/ssh_tunnel.rb Tue Jan 12 22:30:01 2016 -0800
332
+ +++ b/lib/vagrant-skytap/hosts/linux/cap/ssh_tunnel.rb Tue Jan 12 22:44:41 2016 -0800
333
+ @@ -1,109 +1,12 @@
334
+ -require "pathname"
335
+ -require "tmpdir"
336
+ -require 'childprocess'
337
+ -require "vagrant/util/subprocess"
338
+ -#require 'byebug'
339
+ -#require 'ap'
340
+ -require 'log4r'
341
+ -require "vagrant/util/safe_chdir"
342
+ +require "vagrant-skytap/hosts/common/cap/ssh_tunnel"
343
+
344
+ module VagrantPlugins
345
+ module Skytap
346
+ module HostLinux
347
+ module Cap
348
+ - class SSHTunnel
349
+ - def self.start_ssh_tunnel(env, fp, env_hash)
350
+ - logger = Log4r::Logger.new("vagrant::hosts::bsd")
351
+ - port = {
352
+ - adapter: fp.adapter,
353
+ - guestip: fp.guest_ip,
354
+ - guestport: fp.guest_port,
355
+ - hostip: fp.host_ip,
356
+ - hostport: fp.host_port,
357
+ - name: fp.id,
358
+ - protocol: fp.protocol
359
+ - }
360
+ -
361
+ - pidfile = pidfile_name(port, env_hash)
362
+ - pid = read_pid(pidfile)
363
+ - if pid && autossh_pid?(pid)
364
+ - logger.info("An autossh process already exists with pid #{pid}.")
365
+ - else
366
+ - args = autossh_args(port, pidfile, env_hash)
367
+ - Vagrant::Util::Subprocess.execute("autossh", *args)
368
+ - end
369
+ - end
370
+ -
371
+ - def self.kill_ssh_tunnel(env, pidfile, env_hash)
372
+ - logger = Log4r::Logger.new("vagrant::hosts::bsd")
373
+ - pidfile = File.join(env_hash[:machine].data_dir, pidfile)
374
+ - pid = read_pid(pidfile)
375
+ - if pid && autossh_pid?(pid)
376
+ - Vagrant::Util::Subprocess.execute("kill", pid.to_s)
377
+ - else
378
+ - logger.info("Cleaning up stale autossh pidfile #{pidfile}.")
379
+ - Vagrant::Util::Subprocess.execute("rm", pidfile)
380
+ - end
381
+ - end
382
+ -
383
+ - private
384
+ -
385
+ - def self.pidfile_name(port, env_hash)
386
+ - tunnel_name = [port[:hostip], port[:name]].compact.join('_')
387
+ - File.join(env_hash[:machine].data_dir, "#{tunnel_name}.pid")
388
+ - end
389
+ -
390
+ - def self.read_pid(pidfile)
391
+ - File.read(pidfile).presence.try(:to_i) if File.exist?(pidfile)
392
+ - end
393
+ -
394
+ - # Checks that the pid is actually an autossh process (and not
395
+ - # something else using a recycled pid).
396
+ - def self.autossh_pid?(pid)
397
+ - # get_comm_for_pid(pid) == 'autossh'
398
+ - true
399
+ - end
400
+ -
401
+ - # Get the command, minus any arguments, for the given
402
+ - # pid. I don't expect this to be compatible cross-platform yet...
403
+ - # This could be complicated cross-platform, and Sys::ProcTable
404
+ - # could likewise be complicated cross-platform ...
405
+ - def self.get_comm_for_pid(pid)
406
+ - result = Vagrant::Util::Subprocess.execute("ps", "-p", pid.to_s, "-o", "comm")
407
+ - result.stdout.split("\n").last
408
+ - end
409
+ -
410
+ - def self.autossh_args(port, pidfile, env_hash)
411
+ - ssh_info = env_hash[:machine_ssh_info]
412
+ - ssh_options = {
413
+ - "ServerAliveInterval" => 10,
414
+ - "ServerAliveCountMax" => 3,
415
+ - "StrictHostKeyChecking" => "no",
416
+ - }
417
+ - environment_variables = {
418
+ - env: {
419
+ - "AUTOSSH_PIDFILE" => pidfile,
420
+ - "AUTOSSH_PORT" => 0, # turns off monitoring
421
+ - #"AUTOSSH_LOGFILE" => "./autossh.log",
422
+ - }
423
+ - }
424
+ - forward_string = [
425
+ - port[:hostport],
426
+ - "localhost",
427
+ - port[:guestport]
428
+ - ].join(':')
429
+ -
430
+ - autossh_args = []
431
+ - autossh_args << "-q"
432
+ - autossh_args << "-N"
433
+ - autossh_args << "-f"
434
+ - autossh_args << "-i" << env_hash[:machine].data_dir.join("private_key").to_s
435
+ - autossh_args << "-L" << forward_string
436
+ - ssh_options.each do |k, v|
437
+ - autossh_args << "-o" << "#{k}=#{v}"
438
+ - end
439
+ - autossh_args << "#{ssh_info[:username]}@#{ssh_info[:host]}"
440
+ - autossh_args << environment_variables
441
+ + class SSHTunnel < VagrantPlugins::Skytap::HostCommon::Cap::SSHTunnel
442
+ + def self.create_logger
443
+ + Log4r::Logger.new("vagrant::hosts::linux")
444
+ end
445
+ end
446
+ end
447
+ diff -r 444a060a037d lib/vagrant-skytap/hosts/windows/cap/ssh_tunnel.rb
448
+ --- /dev/null Thu Jan 01 00:00:00 1970 +0000
449
+ +++ b/lib/vagrant-skytap/hosts/windows/cap/ssh_tunnel.rb Tue Jan 12 22:44:41 2016 -0800
450
+ @@ -0,0 +1,23 @@
451
+ +require "vagrant-skytap/hosts/common/cap/ssh_tunnel"
452
+ +
453
+ +module VagrantPlugins
454
+ + module Skytap
455
+ + module HostWindows
456
+ + module Cap
457
+ + class SSHTunnel < VagrantPlugins::Skytap::HostCommon::Cap::SSHTunnel
458
+ + def self.create_logger
459
+ + Log4r::Logger.new("vagrant::hosts::windows")
460
+ + end
461
+ +
462
+ + def self.start_ssh_tunnel(env, fp, env_hash)
463
+ + env[:ui].info I18n.t("Port forwarding is currently not supported on Windows. Skipping...")
464
+ + end
465
+ +
466
+ + def self.kill_ssh_tunnel(env, pidfile, env_hash)
467
+ + env[:ui].info I18n.t("Port forwarding is currently not supported on Windows. Skipping...")
468
+ + end
469
+ + end
470
+ + end
471
+ + end
472
+ + end
473
+ +end
474
+ diff -r 444a060a037d lib/vagrant-skytap/plugin.rb
475
+ --- a/lib/vagrant-skytap/plugin.rb Tue Jan 12 22:30:01 2016 -0800
476
+ +++ b/lib/vagrant-skytap/plugin.rb Tue Jan 12 22:44:41 2016 -0800
477
+ @@ -59,6 +59,21 @@
478
+ HostBSD::Cap::SSHTunnel
479
+ end
480
+
481
+ + host_capability("bsd", "kill_forwarded_ports") do
482
+ + require_relative "hosts/bsd/cap/ssh_tunnel"
483
+ + HostBSD::Cap::SSHTunnel
484
+ + end
485
+ +
486
+ + host_capability("bsd", "read_used_ports") do
487
+ + require_relative "hosts/bsd/cap/ssh_tunnel"
488
+ + HostBSD::Cap::SSHTunnel
489
+ + end
490
+ +
491
+ + host_capability("bsd", "read_forwarded_ports") do
492
+ + require_relative "hosts/bsd/cap/ssh_tunnel"
493
+ + HostBSD::Cap::SSHTunnel
494
+ + end
495
+ +
496
+ host_capability("linux", "start_ssh_tunnel") do
497
+ require_relative "hosts/linux/cap/ssh_tunnel"
498
+ HostLinux::Cap::SSHTunnel
499
+ @@ -69,6 +84,121 @@
500
+ HostLinux::Cap::SSHTunnel
501
+ end
502
+
503
+ + host_capability("linux", "kill_forwarded_ports") do
504
+ + require_relative "hosts/windows/cap/ssh_tunnel"
505
+ + HostWindows::Cap::SSHTunnel
506
+ + end
507
+ +
508
+ + host_capability("linux", "read_used_ports") do
509
+ + require_relative "hosts/linux/cap/ssh_tunnel"
510
+ + HostLinux::Cap::SSHTunnel
511
+ + end
512
+ +
513
+ + host_capability("linux", "read_forwarded_ports") do
514
+ + require_relative "hosts/linux/cap/ssh_tunnel"
515
+ + HostLinux::Cap::SSHTunnel
516
+ + end
517
+ +
518
+ + host_capability("windows", "start_ssh_tunnel") do
519
+ + require_relative "hosts/windows/cap/ssh_tunnel"
520
+ + HostWindows::Cap::SSHTunnel
521
+ + end
522
+ +
523
+ + host_capability("windows", "kill_ssh_tunnel") do
524
+ + require_relative "hosts/windows/cap/ssh_tunnel"
525
+ + HostWindows::Cap::SSHTunnel
526
+ + end
527
+ +
528
+ + host_capability("windows", "kill_forwarded_ports") do
529
+ + require_relative "hosts/windows/cap/ssh_tunnel"
530
+ + HostWindows::Cap::SSHTunnel
531
+ + end
532
+ +
533
+ +# host_capability("windows", "read_used_ports") do
534
+ +# require_relative "hosts/windows/cap/ssh_tunnel"
535
+ +# HostWindows::Cap::SSHTunnel
536
+ +# end
537
+ +#
538
+ +# host_capability("windows", "read_forwarded_ports") do
539
+ +# require_relative "hosts/windows/cap/ssh_tunnel"
540
+ +# HostWindows::Cap::SSHTunnel
541
+ +# end
542
+ +
543
+ + host_capability("bsd", "start_ssh_tunnel") do
544
+ + require_relative "hosts/bsd/cap/ssh_tunnel"
545
+ + HostBSD::Cap::SSHTunnel
546
+ + end
547
+ +
548
+ + host_capability("bsd", "kill_ssh_tunnel") do
549
+ + require_relative "hosts/bsd/cap/ssh_tunnel"
550
+ + HostBSD::Cap::SSHTunnel
551
+ + end
552
+ +
553
+ + host_capability("bsd", "kill_forwarded_ports") do
554
+ + require_relative "hosts/bsd/cap/ssh_tunnel"
555
+ + HostBSD::Cap::SSHTunnel
556
+ + end
557
+ +
558
+ +# host_capability("bsd", "read_used_ports") do
559
+ +# require_relative "hosts/bsd/cap/ssh_tunnel"
560
+ +# HostBSD::Cap::SSHTunnel
561
+ +# end
562
+ +#
563
+ +# host_capability("bsd", "read_forwarded_ports") do
564
+ +# require_relative "hosts/bsd/cap/ssh_tunnel"
565
+ +# HostBSD::Cap::SSHTunnel
566
+ +# end
567
+ +
568
+ + host_capability("linux", "start_ssh_tunnel") do
569
+ + require_relative "hosts/linux/cap/ssh_tunnel"
570
+ + HostLinux::Cap::SSHTunnel
571
+ + end
572
+ +
573
+ + host_capability("linux", "kill_ssh_tunnel") do
574
+ + require_relative "hosts/linux/cap/ssh_tunnel"
575
+ + HostLinux::Cap::SSHTunnel
576
+ + end
577
+ +
578
+ + host_capability("linux", "kill_forwarded_ports") do
579
+ + require_relative "hosts/windows/cap/ssh_tunnel"
580
+ + HostWindows::Cap::SSHTunnel
581
+ + end
582
+ +
583
+ +# host_capability("linux", "read_used_ports") do
584
+ +# require_relative "hosts/linux/cap/ssh_tunnel"
585
+ +# HostLinux::Cap::SSHTunnel
586
+ +# end
587
+ +#
588
+ +# host_capability("linux", "read_forwarded_ports") do
589
+ +# require_relative "hosts/linux/cap/ssh_tunnel"
590
+ +# HostLinux::Cap::SSHTunnel
591
+ +# end
592
+ +
593
+ + host_capability("windows", "start_ssh_tunnel") do
594
+ + require_relative "hosts/windows/cap/ssh_tunnel"
595
+ + HostWindows::Cap::SSHTunnel
596
+ + end
597
+ +
598
+ + host_capability("windows", "kill_ssh_tunnel") do
599
+ + require_relative "hosts/windows/cap/ssh_tunnel"
600
+ + HostWindows::Cap::SSHTunnel
601
+ + end
602
+ +
603
+ + host_capability("windows", "kill_forwarded_ports") do
604
+ + require_relative "hosts/windows/cap/ssh_tunnel"
605
+ + HostWindows::Cap::SSHTunnel
606
+ + end
607
+ +
608
+ + host_capability("windows", "read_used_ports") do
609
+ + require_relative "hosts/windows/cap/ssh_tunnel"
610
+ + HostWindows::Cap::SSHTunnel
611
+ + end
612
+ +
613
+ + host_capability("windows", "read_forwarded_ports") do
614
+ + require_relative "hosts/windows/cap/ssh_tunnel"
615
+ + HostWindows::Cap::SSHTunnel
616
+ + end
617
+ +
618
+ # This initializes the internationalization strings.
619
+ def self.setup_i18n
620
+ I18n.load_path << File.expand_path("locales/en.yml", Skytap.source_root)
621
+ diff -r 444a060a037d lib/vagrant-skytap/util/compile_forwarded_ports.rb
622
+ --- a/lib/vagrant-skytap/util/compile_forwarded_ports.rb Tue Jan 12 22:30:01 2016 -0800
623
+ +++ b/lib/vagrant-skytap/util/compile_forwarded_ports.rb Tue Jan 12 22:44:41 2016 -0800
624
+ @@ -12,8 +12,6 @@
625
+ mappings = {}
626
+
627
+ config.vm.networks.each do |type, options|
628
+ -# puts type, options
629
+ -# debugger
630
+ if type == :forwarded_port
631
+ guest_port = options[:guest]
632
+ host_port = options[:host]