vagrant-skytap 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (327) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/lib/vagrant-skytap/action/add_vm_to_environment.rb +4 -4
  4. data/lib/vagrant-skytap/action/compose_environment.rb +131 -0
  5. data/lib/vagrant-skytap/action/create_environment.rb +3 -1
  6. data/lib/vagrant-skytap/action/initialize_api_client.rb +6 -5
  7. data/lib/vagrant-skytap/action/set_up_vm.rb +3 -1
  8. data/lib/vagrant-skytap/action/store_extra_data.rb +4 -2
  9. data/lib/vagrant-skytap/action.rb +4 -17
  10. data/lib/vagrant-skytap/api/environment.rb +53 -25
  11. data/lib/vagrant-skytap/api/vm.rb +9 -3
  12. data/lib/vagrant-skytap/command/up.rb +46 -30
  13. data/lib/vagrant-skytap/errors.rb +4 -0
  14. data/lib/vagrant-skytap/version.rb +1 -1
  15. data/locales/en.yml +5 -1
  16. data/spec/unit/actions/compose_environment_spec.rb +101 -0
  17. data/spec/unit/environment_spec.rb +26 -45
  18. data/spec/unit/support/shared/skytap_context.rb +5 -0
  19. data/vagrant-skytap.gemspec +3 -3
  20. metadata +9 -311
  21. data/.byebug_history +0 -256
  22. data/.project +0 -11
  23. data/_patches-20160112/0 +0 -388
  24. data/_patches-20160112/1 +0 -82
  25. data/_patches-20160112/2 +0 -239
  26. data/_patches-20160112/COMPLETED-ABOVE-THIS-LINE +0 -4
  27. data/_patches-20160112/COMPLETED-BELOW-THIS-LINE +0 -4
  28. data/_patches-20160112/CR-ABOVE-THIS-LINE +0 -4
  29. data/_patches-20160112/CR-BELOW-THIS-LINE +0 -4
  30. data/_patches-20160112/WIP-ABOVE-THIS-LINE +0 -4
  31. data/_patches-20160112/WIP-BELOW-THIS-LINE +0 -4
  32. data/_patches-20160112/acceptance-test-runner +0 -29
  33. data/_patches-20160112/ansible-1 +0 -92
  34. data/_patches-20160112/cache-api-client-in-up +0 -40
  35. data/_patches-20160112/dead-code-in-actions +0 -44
  36. data/_patches-20160112/debug-changes +0 -42
  37. data/_patches-20160112/demo-rails-app +0 -1276
  38. data/_patches-20160112/eng-10166-halt-spec +0 -40
  39. data/_patches-20160112/eng-10256 +0 -527
  40. data/_patches-20160112/eng-10256-2 +0 -162
  41. data/_patches-20160112/eng-10256-ubuntu-testing +0 -88
  42. data/_patches-20160112/eng-10269-test-stuff +0 -87
  43. data/_patches-20160112/eng-10269-wtf +0 -119
  44. data/_patches-20160112/eng-10369 +0 -143
  45. data/_patches-20160112/eng-10369-tmp +0 -60
  46. data/_patches-20160112/eng-10919 +0 -56
  47. data/_patches-20160112/eng-11177-fix-actions-requires +0 -44
  48. data/_patches-20160112/eng-11442 +0 -4
  49. data/_patches-20160112/eng-11616 +0 -403
  50. data/_patches-20160112/eng-11616-2 +0 -67
  51. data/_patches-20160112/eng-11616-actual +0 -184
  52. data/_patches-20160112/eng-11625a +0 -4
  53. data/_patches-20160112/eng-11711 +0 -85
  54. data/_patches-20160112/eng-12232-command-spec +0 -236
  55. data/_patches-20160112/eng-12235 +0 -83
  56. data/_patches-20160112/eng-12235-override-refactor +0 -140
  57. data/_patches-20160112/eng-12240 +0 -103
  58. data/_patches-20160112/eng-12249 +0 -40
  59. data/_patches-20160112/eng-12301 +0 -50
  60. data/_patches-20160112/eng-12843 +0 -95
  61. data/_patches-20160112/env-source +0 -112
  62. data/_patches-20160112/frickin-vagrant-spec +0 -163
  63. data/_patches-20160112/gem-pre-version +0 -14
  64. data/_patches-20160112/gems-old +0 -9
  65. data/_patches-20160112/googles-specs +0 -713
  66. data/_patches-20160112/local-configs-ignore +0 -61
  67. data/_patches-20160112/misc +0 -79
  68. data/_patches-20160112/network-unreachable +0 -31
  69. data/_patches-20160112/new-boxfile +0 -288
  70. data/_patches-20160112/parallelization-maybe +0 -198
  71. data/_patches-20160112/read-state +0 -23
  72. data/_patches-20160112/refactor-to-use-public_address-cap +0 -25
  73. data/_patches-20160112/series +0 -60
  74. data/_patches-20160112/status +0 -12
  75. data/_patches-20160112/test-move-env-data +0 -231
  76. data/_patches-20160112/test-vagrantfile-vm1 +0 -167
  77. data/_patches-20160112/the_version_in_0.1.13.pre1 +0 -598
  78. data/_patches-20160112/vagrant-spec-mock-api +0 -137
  79. data/_patches-20160112/vagrant-vmware-plugin +0 -233
  80. data/_patches-20160112/vagrantfile +0 -403
  81. data/_patches-20160112/vagrantfile-for-acceptance-tests +0 -29
  82. data/_patches-20160112/vagrantfile-for-nick +0 -95
  83. data/_patches-20160112/vagrantfiles-to-forget-what-they-are-for +0 -134
  84. data/_patches-20160112/vm-vanished +0 -42
  85. data/_patches-20160112a/01 +0 -148
  86. data/_patches-20160112a/2 +0 -239
  87. data/_patches-20160112a/COMPLETED-ABOVE-THIS-LINE +0 -4
  88. data/_patches-20160112a/COMPLETED-BELOW-THIS-LINE +0 -4
  89. data/_patches-20160112a/CR-ABOVE-THIS-LINE +0 -4
  90. data/_patches-20160112a/CR-BELOW-THIS-LINE +0 -4
  91. data/_patches-20160112a/WIP-ABOVE-THIS-LINE +0 -4
  92. data/_patches-20160112a/WIP-BELOW-THIS-LINE +0 -4
  93. data/_patches-20160112a/acceptance-test-runner +0 -29
  94. data/_patches-20160112a/ansible-1 +0 -92
  95. data/_patches-20160112a/cache-api-client-in-up +0 -40
  96. data/_patches-20160112a/dead-code-in-actions +0 -44
  97. data/_patches-20160112a/debug-changes +0 -42
  98. data/_patches-20160112a/demo-rails-app +0 -1276
  99. data/_patches-20160112a/eng-10166-halt-spec +0 -40
  100. data/_patches-20160112a/eng-10256-ubuntu-testing +0 -88
  101. data/_patches-20160112a/eng-10269-test-stuff +0 -87
  102. data/_patches-20160112a/eng-10269-wtf +0 -119
  103. data/_patches-20160112a/eng-10369 +0 -143
  104. data/_patches-20160112a/eng-10369-tmp +0 -60
  105. data/_patches-20160112a/eng-10919 +0 -56
  106. data/_patches-20160112a/eng-11177-fix-actions-requires +0 -44
  107. data/_patches-20160112a/eng-11442 +0 -4
  108. data/_patches-20160112a/eng-11616 +0 -403
  109. data/_patches-20160112a/eng-11616-2 +0 -67
  110. data/_patches-20160112a/eng-11616-actual +0 -184
  111. data/_patches-20160112a/eng-11625a +0 -4
  112. data/_patches-20160112a/eng-11711 +0 -85
  113. data/_patches-20160112a/eng-12232-command-spec +0 -236
  114. data/_patches-20160112a/eng-12235 +0 -83
  115. data/_patches-20160112a/eng-12235-override-refactor +0 -140
  116. data/_patches-20160112a/eng-12240 +0 -103
  117. data/_patches-20160112a/eng-12249 +0 -40
  118. data/_patches-20160112a/eng-12301 +0 -50
  119. data/_patches-20160112a/eng-12843 +0 -95
  120. data/_patches-20160112a/env-source +0 -112
  121. data/_patches-20160112a/frickin-vagrant-spec +0 -163
  122. data/_patches-20160112a/gem-pre-version +0 -14
  123. data/_patches-20160112a/gems-old +0 -9
  124. data/_patches-20160112a/googles-specs +0 -713
  125. data/_patches-20160112a/local-configs-ignore +0 -61
  126. data/_patches-20160112a/misc +0 -79
  127. data/_patches-20160112a/network-unreachable +0 -31
  128. data/_patches-20160112a/new-boxfile +0 -288
  129. data/_patches-20160112a/parallelization-maybe +0 -198
  130. data/_patches-20160112a/read-state +0 -23
  131. data/_patches-20160112a/refactor-to-use-public_address-cap +0 -25
  132. data/_patches-20160112a/series +0 -58
  133. data/_patches-20160112a/status +0 -14
  134. data/_patches-20160112a/test-move-env-data +0 -231
  135. data/_patches-20160112a/test-vagrantfile-vm1 +0 -167
  136. data/_patches-20160112a/the_version_in_0.1.13.pre1 +0 -612
  137. data/_patches-20160112a/then-copy-the-newer-files +0 -632
  138. data/_patches-20160112a/vagrant-spec-mock-api +0 -137
  139. data/_patches-20160112a/vagrant-vmware-plugin +0 -233
  140. data/_patches-20160112a/vagrantfile +0 -403
  141. data/_patches-20160112a/vagrantfile-for-acceptance-tests +0 -29
  142. data/_patches-20160112a/vagrantfile-for-nick +0 -95
  143. data/_patches-20160112a/vagrantfiles-to-forget-what-they-are-for +0 -134
  144. data/_patches-20160112a/vm-vanished +0 -42
  145. data/_patches-20160113/COMPLETED-ABOVE-THIS-LINE +0 -4
  146. data/_patches-20160113/COMPLETED-BELOW-THIS-LINE +0 -4
  147. data/_patches-20160113/CR-ABOVE-THIS-LINE +0 -4
  148. data/_patches-20160113/CR-BELOW-THIS-LINE +0 -4
  149. data/_patches-20160113/WIP-ABOVE-THIS-LINE +0 -4
  150. data/_patches-20160113/WIP-BELOW-THIS-LINE +0 -4
  151. data/_patches-20160113/acceptance-test-runner +0 -29
  152. data/_patches-20160113/ansible-1 +0 -92
  153. data/_patches-20160113/cache-api-client-in-up +0 -40
  154. data/_patches-20160113/dead-code-in-actions +0 -44
  155. data/_patches-20160113/debug-changes +0 -55
  156. data/_patches-20160113/demo-rails-app +0 -1276
  157. data/_patches-20160113/eng-10166-halt-spec +0 -40
  158. data/_patches-20160113/eng-10256 +0 -543
  159. data/_patches-20160113/eng-10256-ubuntu-testing +0 -88
  160. data/_patches-20160113/eng-10269-test-stuff +0 -87
  161. data/_patches-20160113/eng-10269-wtf +0 -119
  162. data/_patches-20160113/eng-10369 +0 -143
  163. data/_patches-20160113/eng-10369-tmp +0 -60
  164. data/_patches-20160113/eng-10919 +0 -56
  165. data/_patches-20160113/eng-11177-fix-actions-requires +0 -44
  166. data/_patches-20160113/eng-11442 +0 -4
  167. data/_patches-20160113/eng-11616 +0 -403
  168. data/_patches-20160113/eng-11616-2 +0 -67
  169. data/_patches-20160113/eng-11616-actual +0 -184
  170. data/_patches-20160113/eng-11625a +0 -4
  171. data/_patches-20160113/eng-11711 +0 -85
  172. data/_patches-20160113/eng-12232-command-spec +0 -236
  173. data/_patches-20160113/eng-12235 +0 -83
  174. data/_patches-20160113/eng-12235-override-refactor +0 -140
  175. data/_patches-20160113/eng-12240 +0 -103
  176. data/_patches-20160113/eng-12249 +0 -40
  177. data/_patches-20160113/eng-12301 +0 -50
  178. data/_patches-20160113/eng-12720 +0 -47
  179. data/_patches-20160113/eng-12843 +0 -95
  180. data/_patches-20160113/env-source +0 -112
  181. data/_patches-20160113/frickin-vagrant-spec +0 -163
  182. data/_patches-20160113/gem-pre-version +0 -14
  183. data/_patches-20160113/gems-old +0 -9
  184. data/_patches-20160113/googles-specs +0 -713
  185. data/_patches-20160113/local-configs-ignore +0 -61
  186. data/_patches-20160113/misc +0 -79
  187. data/_patches-20160113/network-unreachable +0 -31
  188. data/_patches-20160113/new-boxfile +0 -288
  189. data/_patches-20160113/parallelization-maybe +0 -198
  190. data/_patches-20160113/read-state +0 -23
  191. data/_patches-20160113/refactor-to-use-public_address-cap +0 -25
  192. data/_patches-20160113/series +0 -56
  193. data/_patches-20160113/status +0 -14
  194. data/_patches-20160113/test-move-env-data +0 -231
  195. data/_patches-20160113/test-vagrantfile-vm1 +0 -167
  196. data/_patches-20160113/vagrant-spec-mock-api +0 -137
  197. data/_patches-20160113/vagrant-vmware-plugin +0 -233
  198. data/_patches-20160113/vagrantfile +0 -403
  199. data/_patches-20160113/vagrantfile-for-acceptance-tests +0 -29
  200. data/_patches-20160113/vagrantfile-for-nick +0 -95
  201. data/_patches-20160113/vagrantfiles-to-forget-what-they-are-for +0 -134
  202. data/_patches-20160113/vm-vanished +0 -42
  203. data/_patches-20160118/COMPLETED-ABOVE-THIS-LINE +0 -4
  204. data/_patches-20160118/COMPLETED-BELOW-THIS-LINE +0 -4
  205. data/_patches-20160118/CR-ABOVE-THIS-LINE +0 -4
  206. data/_patches-20160118/CR-BELOW-THIS-LINE +0 -4
  207. data/_patches-20160118/WIP-ABOVE-THIS-LINE +0 -4
  208. data/_patches-20160118/WIP-BELOW-THIS-LINE +0 -4
  209. data/_patches-20160118/acceptance-test-runner +0 -29
  210. data/_patches-20160118/ansible-1 +0 -92
  211. data/_patches-20160118/cache-api-client-in-up +0 -40
  212. data/_patches-20160118/dead-code-in-actions +0 -44
  213. data/_patches-20160118/debug-changes +0 -55
  214. data/_patches-20160118/demo-rails-app +0 -1276
  215. data/_patches-20160118/eng-10166-halt-spec +0 -40
  216. data/_patches-20160118/eng-10256 +0 -554
  217. data/_patches-20160118/eng-10256-cr +0 -314
  218. data/_patches-20160118/eng-10256-ubuntu-testing +0 -88
  219. data/_patches-20160118/eng-10269-test-stuff +0 -87
  220. data/_patches-20160118/eng-10269-wtf +0 -119
  221. data/_patches-20160118/eng-10369 +0 -143
  222. data/_patches-20160118/eng-10369-tmp +0 -60
  223. data/_patches-20160118/eng-10919 +0 -56
  224. data/_patches-20160118/eng-11177-fix-actions-requires +0 -44
  225. data/_patches-20160118/eng-11442 +0 -4
  226. data/_patches-20160118/eng-11616 +0 -403
  227. data/_patches-20160118/eng-11616-2 +0 -67
  228. data/_patches-20160118/eng-11616-actual +0 -184
  229. data/_patches-20160118/eng-11625a +0 -4
  230. data/_patches-20160118/eng-11711 +0 -85
  231. data/_patches-20160118/eng-12232-command-spec +0 -236
  232. data/_patches-20160118/eng-12235 +0 -83
  233. data/_patches-20160118/eng-12235-override-refactor +0 -140
  234. data/_patches-20160118/eng-12240 +0 -103
  235. data/_patches-20160118/eng-12249 +0 -40
  236. data/_patches-20160118/eng-12301 +0 -50
  237. data/_patches-20160118/eng-12720 +0 -74
  238. data/_patches-20160118/eng-12843 +0 -95
  239. data/_patches-20160118/eng-13040 +0 -291
  240. data/_patches-20160118/env-source +0 -112
  241. data/_patches-20160118/frickin-vagrant-spec +0 -163
  242. data/_patches-20160118/gem-pre-version +0 -14
  243. data/_patches-20160118/gems-old +0 -9
  244. data/_patches-20160118/googles-specs +0 -713
  245. data/_patches-20160118/local-configs-ignore +0 -61
  246. data/_patches-20160118/misc +0 -79
  247. data/_patches-20160118/network-unreachable +0 -31
  248. data/_patches-20160118/new-boxfile +0 -288
  249. data/_patches-20160118/parallelization-maybe +0 -198
  250. data/_patches-20160118/port-forwarding-processes +0 -87
  251. data/_patches-20160118/read-state +0 -23
  252. data/_patches-20160118/refactor-to-use-public_address-cap +0 -25
  253. data/_patches-20160118/series +0 -59
  254. data/_patches-20160118/status +0 -13
  255. data/_patches-20160118/test-move-env-data +0 -231
  256. data/_patches-20160118/test-vagrantfile-vm1 +0 -167
  257. data/_patches-20160118/vagrant-spec-mock-api +0 -137
  258. data/_patches-20160118/vagrant-vmware-plugin +0 -233
  259. data/_patches-20160118/vagrantfile +0 -403
  260. data/_patches-20160118/vagrantfile-for-acceptance-tests +0 -29
  261. data/_patches-20160118/vagrantfile-for-nick +0 -95
  262. data/_patches-20160118/vagrantfiles-to-forget-what-they-are-for +0 -134
  263. data/_patches-20160118/vm-vanished +0 -42
  264. data/_patches-20160118a/COMPLETED-ABOVE-THIS-LINE +0 -4
  265. data/_patches-20160118a/COMPLETED-BELOW-THIS-LINE +0 -4
  266. data/_patches-20160118a/CR-ABOVE-THIS-LINE +0 -4
  267. data/_patches-20160118a/CR-BELOW-THIS-LINE +0 -4
  268. data/_patches-20160118a/WIP-ABOVE-THIS-LINE +0 -4
  269. data/_patches-20160118a/WIP-BELOW-THIS-LINE +0 -4
  270. data/_patches-20160118a/acceptance-test-runner +0 -29
  271. data/_patches-20160118a/ansible-1 +0 -92
  272. data/_patches-20160118a/bar +0 -189
  273. data/_patches-20160118a/cache-api-client-in-up +0 -40
  274. data/_patches-20160118a/dead-code-in-actions +0 -44
  275. data/_patches-20160118a/debug-changes +0 -55
  276. data/_patches-20160118a/demo-rails-app +0 -1276
  277. data/_patches-20160118a/eng-10166-halt-spec +0 -40
  278. data/_patches-20160118a/eng-10256 +0 -554
  279. data/_patches-20160118a/eng-10256-cr +0 -314
  280. data/_patches-20160118a/eng-10256-ubuntu-testing +0 -88
  281. data/_patches-20160118a/eng-10269-test-stuff +0 -87
  282. data/_patches-20160118a/eng-10269-wtf +0 -119
  283. data/_patches-20160118a/eng-10369 +0 -143
  284. data/_patches-20160118a/eng-10369-tmp +0 -60
  285. data/_patches-20160118a/eng-10919 +0 -56
  286. data/_patches-20160118a/eng-11177-fix-actions-requires +0 -44
  287. data/_patches-20160118a/eng-11442 +0 -4
  288. data/_patches-20160118a/eng-11616 +0 -403
  289. data/_patches-20160118a/eng-11616-2 +0 -67
  290. data/_patches-20160118a/eng-11616-actual +0 -184
  291. data/_patches-20160118a/eng-11625a +0 -4
  292. data/_patches-20160118a/eng-11711 +0 -85
  293. data/_patches-20160118a/eng-12232-command-spec +0 -236
  294. data/_patches-20160118a/eng-12235 +0 -83
  295. data/_patches-20160118a/eng-12235-override-refactor +0 -140
  296. data/_patches-20160118a/eng-12240 +0 -103
  297. data/_patches-20160118a/eng-12249 +0 -40
  298. data/_patches-20160118a/eng-12301 +0 -50
  299. data/_patches-20160118a/eng-12720 +0 -74
  300. data/_patches-20160118a/eng-12843 +0 -95
  301. data/_patches-20160118a/eng-13040 +0 -291
  302. data/_patches-20160118a/env-source +0 -112
  303. data/_patches-20160118a/foo +0 -169
  304. data/_patches-20160118a/frickin-vagrant-spec +0 -163
  305. data/_patches-20160118a/gem-pre-version +0 -14
  306. data/_patches-20160118a/gems-old +0 -9
  307. data/_patches-20160118a/googles-specs +0 -713
  308. data/_patches-20160118a/guestport-madness +0 -59
  309. data/_patches-20160118a/local-configs-ignore +0 -61
  310. data/_patches-20160118a/misc +0 -79
  311. data/_patches-20160118a/network-unreachable +0 -31
  312. data/_patches-20160118a/new-boxfile +0 -288
  313. data/_patches-20160118a/parallelization-maybe +0 -198
  314. data/_patches-20160118a/port-forwarding-processes +0 -87
  315. data/_patches-20160118a/read-state +0 -23
  316. data/_patches-20160118a/refactor-to-use-public_address-cap +0 -25
  317. data/_patches-20160118a/series +0 -62
  318. data/_patches-20160118a/status +0 -14
  319. data/_patches-20160118a/test-move-env-data +0 -231
  320. data/_patches-20160118a/test-vagrantfile-vm1 +0 -167
  321. data/_patches-20160118a/vagrant-spec-mock-api +0 -137
  322. data/_patches-20160118a/vagrant-vmware-plugin +0 -233
  323. data/_patches-20160118a/vagrantfile +0 -403
  324. data/_patches-20160118a/vagrantfile-for-acceptance-tests +0 -29
  325. data/_patches-20160118a/vagrantfile-for-nick +0 -95
  326. data/_patches-20160118a/vagrantfiles-to-forget-what-they-are-for +0 -134
  327. data/_patches-20160118a/vm-vanished +0 -42
data/.byebug_history DELETED
@@ -1,256 +0,0 @@
1
- c
2
- q
3
- action_result[:api_client].url
4
- action_result[:api_client].base_url
5
- action_result[:api_client]
6
- action_result.keys
7
- action_result.class
8
- action_result
9
- c
10
- $!
11
- c
12
- @env[:initial_states]
13
- vm_ids
14
- n
15
- q
16
- env[:initial_states]
17
- vm_ids
18
- n
19
- c
20
- environment.current_vm.id
21
- env[:machine].id
22
- environment.current_vm
23
- vm_ids = env[:machines].try(:collect, &:id)
24
- env[:vm_ids]
25
- env[:first_machine]
26
- env[:initial_states]
27
- env.keys
28
- env
29
- env.keys
30
- c
31
- initial_states
32
- c
33
- machine
34
- c
35
- machine
36
- c
37
- n
38
- c
39
- finish
40
- n
41
- c
42
- n
43
- machine.name
44
- c 89
45
- c
46
- names
47
- c
48
- n
49
- c
50
- display name
51
- c
52
- name
53
- c
54
- @env.default_provider
55
- finish
56
- s
57
- @env
58
- @sub_args
59
- n
60
- finish
61
- Skytap::Command::Up
62
- n
63
- c
64
- n
65
- display opts
66
- display name
67
- c
68
- name
69
- n
70
- name
71
- n
72
- @ui.machine("metadata", "provider", provider_name)
73
- n
74
- finish
75
- result
76
- n
77
- name
78
- n
79
- c
80
- env[:machines].collect(&:name)
81
- env[:machines]
82
- machines
83
- machines.keys
84
- vm.from_template?
85
- vm.configuration_url
86
- vm.configuration_id
87
- vm.id
88
- vm
89
- puts h
90
- h[:foo]
91
- puts h[:boo]
92
- puts h
93
- h[:boo] << 2
94
- puts h
95
- h
96
- h=Hash.new{|h, k| h[k] = []}
97
- new_machines.first.name
98
- machine.name
99
- vm.template_url
100
- vm.configuration_url
101
- vm.name
102
- vm = API::Vm.fetch(env, vm_url)
103
- vm_url
104
- vm.attrs
105
- vm = API::Vm.fetch(vm_url, env)
106
- vm = API::Vm.fetch(vm_url)
107
- vm = Vm.fetch(vm_url)
108
- vm_url = new_machines.first.provider_config.vm_url
109
- vm_url = machine.provider_config.vm_url
110
- env[:environment]
111
- active_machines
112
- new_machines
113
- c
114
- machines.first.provider_name
115
- machines.first.provider.name
116
- machines.first.provider.id
117
- machines.first.provider.to_s
118
- machines.first.provider
119
- machines
120
- @env.machines
121
- $!
122
- n
123
- q
124
- env[:environment].url
125
- env[:environment]
126
- active_machines
127
- new_machines
128
- c
129
- n
130
- c
131
- Hash[@env.active_machines].values.first
132
- Hash[@env.active_machines].values
133
- Hash[@env.active_machines].first
134
- Hash[@env.active_machines]
135
- @env.active_machines.to_h
136
- @env.active_machines.first.last
137
- @env.active_machines
138
- @env
139
- env
140
- machines.first.provider.name
141
- machines.first.provider
142
- c
143
- n
144
- finish
145
- n
146
- machines
147
- $!
148
- finish
149
- result
150
- n
151
- entry
152
- n
153
- result
154
- $!
155
- finish
156
- options
157
- s
158
- names
159
- n
160
- c
161
- n
162
- c
163
- n
164
- c
165
- q
166
- c
167
- skytap_environment.class
168
- c
169
- q
170
- c
171
- API::Environment.properties(nil)
172
- API::Environment.properties
173
- n
174
- c
175
- s
176
- API::Environment.properties
177
- n
178
- c
179
- props
180
- n
181
- env[:environment]
182
- c
183
- API::Environment.properties(env)
184
- c
185
- API::Environment.properties(env)
186
- n
187
- c
188
- n
189
- c
190
- env[:environment]
191
- n
192
- c
193
- {'url' => 'foo'}
194
- {'url':'foo'}
195
- API::Environment.properties(env)
196
- n
197
- ap env.keys
198
- ap env
199
- c
200
- cc
201
- c
202
- machine2
203
- n
204
- machine1
205
- c
206
- display names
207
- c
208
- display names
209
- c
210
- n
211
- s
212
- n
213
- machine
214
- c
215
- display names
216
- c
217
- machines.count
218
- c
219
- b 101
220
- display names
221
- c
222
- names
223
- c
224
- environment
225
- n
226
- c
227
- display names
228
- c
229
- puts i
230
- c
231
- b 101
232
- puts i
233
- i
234
- c 101
235
- n
236
- c
237
- display names
238
- c
239
- display names
240
- c
241
- c 96
242
- n
243
- c 86
244
- n
245
- names
246
- c
247
- names
248
- c
249
- names
250
- c
251
- names
252
- c
253
- b 96
254
- b
255
- names
256
- finish
data/.project DELETED
@@ -1,11 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <projectDescription>
3
- <name>vagrant_skytap</name>
4
- <comment></comment>
5
- <projects>
6
- </projects>
7
- <buildSpec>
8
- </buildSpec>
9
- <natures>
10
- </natures>
11
- </projectDescription>
data/_patches-20160112/0 DELETED
@@ -1,388 +0,0 @@
1
- # HG changeset patch
2
- # Parent 015f2d2d5173e7df1f47a07a16eef1a331713c7b
3
- [mq]: 0
4
-
5
- diff -r 015f2d2d5173 lib/vagrant-skytap/action/clear_forwarded_ports.rb
6
- --- a/lib/vagrant-skytap/action/clear_forwarded_ports.rb Tue Jan 12 18:20:49 2016 -0800
7
- +++ b/lib/vagrant-skytap/action/clear_forwarded_ports.rb Tue Jan 12 18:29:09 2016 -0800
8
- @@ -14,8 +14,9 @@
9
- def call(env)
10
- if pidfiles = read_pidfiles.presence
11
- env[:ui].info I18n.t("vagrant.actions.vm.clear_forward_ports.deleting")
12
- - kill_tunnels(pidfiles)
13
- + #kill_tunnels(pidfiles)
14
- end
15
- + pidfiles = @env[:host].capability(:kill_forwarded_ports, @env)
16
-
17
- @app.call(env)
18
- end
19
- diff -r 015f2d2d5173 lib/vagrant-skytap/hosts/bsd/cap/ssh_tunnel.rb
20
- --- a/lib/vagrant-skytap/hosts/bsd/cap/ssh_tunnel.rb Tue Jan 12 18:20:49 2016 -0800
21
- +++ b/lib/vagrant-skytap/hosts/bsd/cap/ssh_tunnel.rb Tue Jan 12 18:29:09 2016 -0800
22
- @@ -1,109 +1,12 @@
23
- -require "pathname"
24
- -require "tmpdir"
25
- -require 'childprocess'
26
- -require "vagrant/util/subprocess"
27
- -#require 'byebug'
28
- -#require 'ap'
29
- -require 'log4r'
30
- -require "vagrant/util/safe_chdir"
31
- +require "vagrant-skytap/hosts/common/cap/ssh_tunnel"
32
-
33
- module VagrantPlugins
34
- module Skytap
35
- module HostBSD
36
- module Cap
37
- - class SSHTunnel
38
- - def self.start_ssh_tunnel(env, fp, env_hash)
39
- - logger = Log4r::Logger.new("vagrant::hosts::bsd")
40
- - port = {
41
- - adapter: fp.adapter,
42
- - guestip: fp.guest_ip,
43
- - guestport: fp.guest_port,
44
- - hostip: fp.host_ip,
45
- - hostport: fp.host_port,
46
- - name: fp.id,
47
- - protocol: fp.protocol
48
- - }
49
- -
50
- - pidfile = pidfile_name(port, env_hash)
51
- - pid = read_pid(pidfile)
52
- - if pid && autossh_pid?(pid)
53
- - logger.info("An autossh process already exists with pid #{pid}.")
54
- - else
55
- - args = autossh_args(port, pidfile, env_hash)
56
- - Vagrant::Util::Subprocess.execute("autossh", *args)
57
- - end
58
- - end
59
- -
60
- - def self.kill_ssh_tunnel(env, pidfile, env_hash)
61
- - logger = Log4r::Logger.new("vagrant::hosts::bsd")
62
- - pidfile = File.join(env_hash[:machine].data_dir, pidfile)
63
- - pid = read_pid(pidfile)
64
- - if pid && autossh_pid?(pid)
65
- - Vagrant::Util::Subprocess.execute("kill", pid.to_s)
66
- - else
67
- - logger.info("Cleaning up stale autossh pidfile #{pidfile}.")
68
- - Vagrant::Util::Subprocess.execute("rm", pidfile)
69
- - end
70
- - end
71
- -
72
- - private
73
- -
74
- - def self.pidfile_name(port, env_hash)
75
- - tunnel_name = [port[:hostip], port[:name]].compact.join('_')
76
- - File.join(env_hash[:machine].data_dir, "#{tunnel_name}.pid")
77
- - end
78
- -
79
- - def self.read_pid(pidfile)
80
- - File.read(pidfile).presence.try(:to_i) if File.exist?(pidfile)
81
- - end
82
- -
83
- - # Checks that the pid is actually an autossh process (and not
84
- - # something else using a recycled pid).
85
- - def self.autossh_pid?(pid)
86
- - # get_comm_for_pid(pid) == 'autossh'
87
- - true
88
- - end
89
- -
90
- - # Get the command, minus any arguments, for the given
91
- - # pid. I don't expect this to be compatible cross-platform yet...
92
- - # This could be complicated cross-platform, and Sys::ProcTable
93
- - # could likewise be complicated cross-platform ...
94
- - def self.get_comm_for_pid(pid)
95
- - result = Vagrant::Util::Subprocess.execute("ps", "-p", pid.to_s, "-o", "comm")
96
- - result.stdout.split("\n").last
97
- - end
98
- -
99
- - def self.autossh_args(port, pidfile, env_hash)
100
- - ssh_info = env_hash[:machine_ssh_info]
101
- - ssh_options = {
102
- - "ServerAliveInterval" => 10,
103
- - "ServerAliveCountMax" => 3,
104
- - "StrictHostKeyChecking" => "no",
105
- - }
106
- - environment_variables = {
107
- - env: {
108
- - "AUTOSSH_PIDFILE" => pidfile,
109
- - "AUTOSSH_PORT" => 0, # turns off monitoring
110
- - #"AUTOSSH_LOGFILE" => "./autossh.log",
111
- - }
112
- - }
113
- - forward_string = [
114
- - port[:hostport],
115
- - "localhost",
116
- - port[:guestport]
117
- - ].join(':')
118
- -
119
- - autossh_args = []
120
- - autossh_args << "-q"
121
- - autossh_args << "-N"
122
- - autossh_args << "-f"
123
- - autossh_args << "-i" << env_hash[:machine].data_dir.join("private_key").to_s
124
- - autossh_args << "-L" << forward_string
125
- - ssh_options.each do |k, v|
126
- - autossh_args << "-o" << "#{k}=#{v}"
127
- - end
128
- - autossh_args << "#{ssh_info[:username]}@#{ssh_info[:host]}"
129
- - autossh_args << environment_variables
130
- + class SSHTunnel < VagrantPlugins::Skytap::Common::Cap::SSHTunnel
131
- + def self.create_logger
132
- + Log4r::Logger.new("vagrant::hosts::bsd")
133
- end
134
- end
135
- end
136
- diff -r 015f2d2d5173 lib/vagrant-skytap/hosts/common/cap/ssh_tunnel.rb
137
- --- a/lib/vagrant-skytap/hosts/common/cap/ssh_tunnel.rb Tue Jan 12 18:20:49 2016 -0800
138
- +++ b/lib/vagrant-skytap/hosts/common/cap/ssh_tunnel.rb Tue Jan 12 18:29:09 2016 -0800
139
- @@ -12,35 +12,32 @@
140
- module HostCommon
141
- module Cap
142
- class SSHTunnel
143
- - def self.create_logger
144
- - Log4r::Logger.new("vagrant::hosts::common")
145
- - end
146
- + def self.start_ssh_tunnel(env, fp, env_hash)
147
- + logger = Log4r::Logger.new("vagrant::hosts::bsd")
148
- + port = {
149
- + adapter: fp.adapter,
150
- + guestip: fp.guest_ip,
151
- + guestport: fp.guest_port,
152
- + hostip: fp.host_ip,
153
- + hostport: fp.host_port,
154
- + name: fp.id,
155
- + protocol: fp.protocol
156
- + }
157
-
158
- - # called per port by ForwardPorts
159
- - def self.start_ssh_tunnel(env, fp, env_hash)
160
- - logger = create_logger
161
- - machine = env_hash[:machine]
162
- - pid = read_pid(File.join(machine.data_dir, pidfile_name(fp)))
163
- + pidfile = pidfile_name(port, env_hash)
164
- + pid = read_pid(pidfile)
165
- if pid && autossh_pid?(pid)
166
- logger.info("An autossh process already exists with pid #{pid}.")
167
- else
168
- - args = autossh_args(fp, pidfile, env_hash)
169
- + args = autossh_args(port, pidfile, env_hash)
170
- Vagrant::Util::Subprocess.execute("autossh", *args)
171
- end
172
- end
173
-
174
- - # called for machine by ClearForwardedPorts
175
- - def self.kill_forwarded_ports(env, env_hash)
176
- - get_pidfiles_for_machine(env_hash[:machine]).each do |pidfile|
177
- - kill_ssh_tunnel(env, pidfile, env_hash)
178
- - end
179
- - end
180
- -
181
- - # exposed but not called currently from any action
182
- def self.kill_ssh_tunnel(env, pidfile, env_hash)
183
- - logger = create_logger
184
- - machine = env_hash[:machine]
185
- - pid = read_pid(File.join(machine.data_dir, pidfile))
186
- + logger = Log4r::Logger.new("vagrant::hosts::bsd")
187
- + pidfile = File.join(env_hash[:machine].data_dir, pidfile)
188
- + pid = read_pid(pidfile)
189
- if pid && autossh_pid?(pid)
190
- Vagrant::Util::Subprocess.execute("kill", pid.to_s)
191
- else
192
- @@ -49,26 +46,17 @@
193
- end
194
- end
195
-
196
- - ####################################
197
- + private
198
-
199
- - def self.pidfile_name(fp)
200
- - "#{fp[:host_ip]}.pid"
201
- + def self.pidfile_name(port, env_hash)
202
- + tunnel_name = [port[:hostip], port[:name]].compact.join('_')
203
- + File.join(env_hash[:machine].data_dir, "#{tunnel_name}.pid")
204
- end
205
-
206
- - def self.read_pid(pidfile_path)
207
- - File.read(pidfile_path).presence.try(:to_i) if File.exist?(pidfile_path)
208
- + def self.read_pid(pidfile)
209
- + File.read(pidfile).presence.try(:to_i) if File.exist?(pidfile)
210
- end
211
-
212
- - def self.get_pidfiles_for_machine(machine)
213
- - pidfiles = []
214
- - Vagrant::Util::SafeChdir.safe_chdir(machine.data_dir) do
215
- - pidfiles = Dir.glob("*.pid")
216
- - end
217
- - pidfiles
218
- - end
219
- -
220
- - ####################################
221
- -
222
- # Checks that the pid is actually an autossh process (and not
223
- # something else using a recycled pid).
224
- def self.autossh_pid?(pid)
225
- @@ -77,16 +65,15 @@
226
- end
227
-
228
- # Get the command, minus any arguments, for the given
229
- - # pid. This probably needs to be overridden per host cap
230
- + # pid. I don't expect this to be compatible cross-platform yet...
231
- + # This could be complicated cross-platform, and Sys::ProcTable
232
- + # could likewise be complicated cross-platform ...
233
- def self.get_comm_for_pid(pid)
234
- result = Vagrant::Util::Subprocess.execute("ps", "-p", pid.to_s, "-o", "comm")
235
- result.stdout.split("\n").last
236
- end
237
-
238
- - ####################################
239
- -
240
- - def self.autossh_args(fp, pidfile, env_hash)
241
- - machine = env_hash[:machine]
242
- + def self.autossh_args(port, pidfile, env_hash)
243
- ssh_info = env_hash[:machine_ssh_info]
244
- ssh_options = {
245
- "ServerAliveInterval" => 10,
246
- @@ -96,16 +83,22 @@
247
- environment_variables = {
248
- env: {
249
- "AUTOSSH_PIDFILE" => pidfile,
250
- - "AUTOSSH_PORT" => 0, # turn off monitoring
251
- + "AUTOSSH_PORT" => 0, # turns off monitoring
252
- + #"AUTOSSH_LOGFILE" => "./autossh.log",
253
- }
254
- }
255
- + forward_string = [
256
- + port[:hostport],
257
- + "localhost",
258
- + port[:guestport]
259
- + ].join(':')
260
-
261
- autossh_args = []
262
- autossh_args << "-q"
263
- autossh_args << "-N"
264
- autossh_args << "-f"
265
- - autossh_args << "-i" << machine.data_dir.join("private_key").to_s
266
- - autossh_args << "-L" << "#{fp[:host_port]}:localhost:#{fp[:guest_port]}"
267
- + autossh_args << "-i" << env_hash[:machine].data_dir.join("private_key").to_s
268
- + autossh_args << "-L" << forward_string
269
- ssh_options.each do |k, v|
270
- autossh_args << "-o" << "#{k}=#{v}"
271
- end
272
- diff -r 015f2d2d5173 lib/vagrant-skytap/hosts/linux/cap/ssh_tunnel.rb
273
- --- a/lib/vagrant-skytap/hosts/linux/cap/ssh_tunnel.rb Tue Jan 12 18:20:49 2016 -0800
274
- +++ b/lib/vagrant-skytap/hosts/linux/cap/ssh_tunnel.rb Tue Jan 12 18:29:09 2016 -0800
275
- @@ -1,109 +1,12 @@
276
- -require "pathname"
277
- -require "tmpdir"
278
- -require 'childprocess'
279
- -require "vagrant/util/subprocess"
280
- -#require 'byebug'
281
- -#require 'ap'
282
- -require 'log4r'
283
- -require "vagrant/util/safe_chdir"
284
- +require "vagrant-skytap/hosts/common/cap/ssh_tunnel"
285
-
286
- module VagrantPlugins
287
- module Skytap
288
- module HostLinux
289
- module Cap
290
- - class SSHTunnel
291
- - def self.start_ssh_tunnel(env, fp, env_hash)
292
- - logger = Log4r::Logger.new("vagrant::hosts::bsd")
293
- - port = {
294
- - adapter: fp.adapter,
295
- - guestip: fp.guest_ip,
296
- - guestport: fp.guest_port,
297
- - hostip: fp.host_ip,
298
- - hostport: fp.host_port,
299
- - name: fp.id,
300
- - protocol: fp.protocol
301
- - }
302
- -
303
- - pidfile = pidfile_name(port, env_hash)
304
- - pid = read_pid(pidfile)
305
- - if pid && autossh_pid?(pid)
306
- - logger.info("An autossh process already exists with pid #{pid}.")
307
- - else
308
- - args = autossh_args(port, pidfile, env_hash)
309
- - Vagrant::Util::Subprocess.execute("autossh", *args)
310
- - end
311
- - end
312
- -
313
- - def self.kill_ssh_tunnel(env, pidfile, env_hash)
314
- - logger = Log4r::Logger.new("vagrant::hosts::bsd")
315
- - pidfile = File.join(env_hash[:machine].data_dir, pidfile)
316
- - pid = read_pid(pidfile)
317
- - if pid && autossh_pid?(pid)
318
- - Vagrant::Util::Subprocess.execute("kill", pid.to_s)
319
- - else
320
- - logger.info("Cleaning up stale autossh pidfile #{pidfile}.")
321
- - Vagrant::Util::Subprocess.execute("rm", pidfile)
322
- - end
323
- - end
324
- -
325
- - private
326
- -
327
- - def self.pidfile_name(port, env_hash)
328
- - tunnel_name = [port[:hostip], port[:name]].compact.join('_')
329
- - File.join(env_hash[:machine].data_dir, "#{tunnel_name}.pid")
330
- - end
331
- -
332
- - def self.read_pid(pidfile)
333
- - File.read(pidfile).presence.try(:to_i) if File.exist?(pidfile)
334
- - end
335
- -
336
- - # Checks that the pid is actually an autossh process (and not
337
- - # something else using a recycled pid).
338
- - def self.autossh_pid?(pid)
339
- - # get_comm_for_pid(pid) == 'autossh'
340
- - true
341
- - end
342
- -
343
- - # Get the command, minus any arguments, for the given
344
- - # pid. I don't expect this to be compatible cross-platform yet...
345
- - # This could be complicated cross-platform, and Sys::ProcTable
346
- - # could likewise be complicated cross-platform ...
347
- - def self.get_comm_for_pid(pid)
348
- - result = Vagrant::Util::Subprocess.execute("ps", "-p", pid.to_s, "-o", "comm")
349
- - result.stdout.split("\n").last
350
- - end
351
- -
352
- - def self.autossh_args(port, pidfile, env_hash)
353
- - ssh_info = env_hash[:machine_ssh_info]
354
- - ssh_options = {
355
- - "ServerAliveInterval" => 10,
356
- - "ServerAliveCountMax" => 3,
357
- - "StrictHostKeyChecking" => "no",
358
- - }
359
- - environment_variables = {
360
- - env: {
361
- - "AUTOSSH_PIDFILE" => pidfile,
362
- - "AUTOSSH_PORT" => 0, # turns off monitoring
363
- - #"AUTOSSH_LOGFILE" => "./autossh.log",
364
- - }
365
- - }
366
- - forward_string = [
367
- - port[:hostport],
368
- - "localhost",
369
- - port[:guestport]
370
- - ].join(':')
371
- -
372
- - autossh_args = []
373
- - autossh_args << "-q"
374
- - autossh_args << "-N"
375
- - autossh_args << "-f"
376
- - autossh_args << "-i" << env_hash[:machine].data_dir.join("private_key").to_s
377
- - autossh_args << "-L" << forward_string
378
- - ssh_options.each do |k, v|
379
- - autossh_args << "-o" << "#{k}=#{v}"
380
- - end
381
- - autossh_args << "#{ssh_info[:username]}@#{ssh_info[:host]}"
382
- - autossh_args << environment_variables
383
- + class SSHTunnel < VagrantPlugins::Skytap::Common::Cap::SSHTunnel
384
- + def self.create_logger
385
- + Log4r::Logger.new("vagrant::hosts::linux")
386
- end
387
- end
388
- end