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
@@ -1,42 +0,0 @@
1
- # HG changeset patch
2
- # Parent 1b8860f8b5129c2ab846c4464378c7a582ac0a90
3
- raise error on vm reload if it's gone?
4
-
5
- diff -r 1b8860f8b512 lib/vagrant-skytap/api/vm.rb
6
- --- a/lib/vagrant-skytap/api/vm.rb Mon Nov 09 20:51:32 2015 -0800
7
- +++ b/lib/vagrant-skytap/api/vm.rb Mon Nov 09 20:52:02 2015 -0800
8
- @@ -35,6 +35,7 @@
9
- end
10
-
11
- def refresh_from_environment
12
- + raise VmVanished, name: machine.name unless vm = environment.get_vm_by_id(id)
13
- refresh(vm.attrs)
14
- end
15
-
16
- diff -r 1b8860f8b512 lib/vagrant-skytap/errors.rb
17
- --- a/lib/vagrant-skytap/errors.rb Mon Nov 09 20:51:32 2015 -0800
18
- +++ b/lib/vagrant-skytap/errors.rb Mon Nov 09 20:52:02 2015 -0800
19
- @@ -27,6 +27,10 @@
20
- error_key(:does_not_exist)
21
- end
22
-
23
- + class VmVanished < VagrantSkytapError
24
- + error_key(:vm_vanished)
25
- + end
26
- +
27
- class BadVmUrl < VagrantSkytapError
28
- error_key(:bad_vm_url)
29
- end
30
- diff -r 1b8860f8b512 locales/en.yml
31
- --- a/locales/en.yml Mon Nov 09 20:51:32 2015 -0800
32
- +++ b/locales/en.yml Mon Nov 09 20:52:02 2015 -0800
33
- @@ -76,6 +76,9 @@
34
- does_not_exist: |-
35
- %{object_name} was not found.
36
-
37
- + vm_vanished: |-
38
- + The VM '%{name}' no longer exists on Skytap.
39
- +
40
- operation_failed: |-
41
- The operation failed: %{err}
42
-
@@ -1,4 +0,0 @@
1
- # HG changeset patch
2
- # Parent 21dbd7fc56837b7c7949396f0f1058790d265a5b
3
- (basically) finished work above this line not yet sent for CR --------------------------------------
4
-
@@ -1,4 +0,0 @@
1
- # HG changeset patch
2
- # Parent e1ec4738b4fbbd2ef83c29f221c19cf3798cf8f0
3
- (basically) finished work below this line not yet sent for CR --------------------------------------
4
-
@@ -1,4 +0,0 @@
1
- # HG changeset patch
2
- # Parent 05bfba1f21950dc1331bb355bb60789499208a63
3
- Out for CR above this line ------------------------------------
4
-
@@ -1,4 +0,0 @@
1
- # HG changeset patch
2
- # Parent faddc6f9d7ed6653fe7d86ab0943f901860b2872
3
- out for CR below this line ------------------------------------------
4
-
@@ -1,4 +0,0 @@
1
- # HG changeset patch
2
- # Parent d9c2f15e01d69f7f9ed90c5a8504a635536409b7
3
- Work in progress above this line --------------------------------------------
4
-
@@ -1,4 +0,0 @@
1
- # HG changeset patch
2
- # Parent 1350d8d01c04611ef082a637cf69eb289b88559a
3
- Work in progress below this line ---------------------------------------------------------------
4
-
@@ -1,29 +0,0 @@
1
- # HG changeset patch
2
- # Parent e03c705cadffcf6ca578330597f15624260a9d46
3
- script to run acceptance tests
4
-
5
- diff --git a/acceptance.sh b/acceptance.sh
6
- new file mode 100755
7
- --- /dev/null
8
- +++ b/acceptance.sh
9
- @@ -0,0 +1,20 @@
10
- +#!/bin/bash
11
- +
12
- +VAGRANT_LOG=info \
13
- +VAGRANT_SKYTAP_USERNAME=etrue \
14
- +VAGRANT_SKYTAP_API_TOKEN=fcb2620b72efddbc8239e25db9d812f510c7e166 \
15
- + rake acceptance:run \
16
- + COMPONENTS=provider/skytap/up
17
- +
18
- +#VAGRANT_SKYTAP_USERNAME=vagrant_provider_admin \
19
- +#VAGRANT_SKYTAP_API_TOKEN=7c5718531a32eb90e92c804ce1f73da98be22cdf \
20
- +#VAGRANT_SKYTAP_BASE_URL=https://test.skytap.com/ \
21
- +
22
- +
23
- +
24
- +#vagrant-spec test --config=vagrant-spec.config.rb --components="$COMPONENTS"
25
- +
26
- +
27
- +# How do I get log output??
28
- +# This needs to run in vagrant-spec, not just rake. Boxes have
29
- +# to install.
@@ -1,92 +0,0 @@
1
- # HG changeset patch
2
- # Parent 0bb10bac847b6ff55e16bc18e9e9e98b49f58444
3
- try to get sbrady's ansible provisioning (codename: "chuck") to work
4
-
5
- diff --git a/Vagrantfile.chuck b/Vagrantfile.chuck
6
- new file mode 100644
7
- --- /dev/null
8
- +++ b/Vagrantfile.chuck
9
- @@ -0,0 +1,55 @@
10
- +# -*- mode: ruby -*-
11
- +# vi: set ft=ruby :
12
- +
13
- +VM_CPU = 4 # Cores
14
- +VM_RAM = 4096 # GB
15
- +GENERIC_UBUNTU = 'https://cloud.skytap.com/vms/6869434'
16
- +
17
- +Vagrant.configure("2") do |config|
18
- +
19
- + config.vm.provider :skytap do |skytap, override|
20
- + skytap.username = "etrue"
21
- + skytap.api_token = "fcb2620b72efddbc8239e25db9d812f510c7e166"
22
- + end
23
- +
24
- + config.vm.define :dev do |dev|
25
- + # VMWare and VirtualBox
26
- + # https://vagrantcloud.com/hashicorp/boxes/precise64
27
- + # TODO how to specify different box files for skytap provider
28
- + #dev.vm.box = "hashicorp/precise64"
29
- + #dev.vm.box_url = "hashicorp/precise64"
30
- +
31
- +
32
- + # dev.vm.network :private_network, ip: "10.10.10.5"
33
- + dev.vm.network :private_network, ip: "10.1.130.252"
34
- + dev.vm.network :forwarded_port, guest: 3001, host: 3001
35
- + dev.vm.network :forwarded_port, guest: 1080, host: 1080
36
- +
37
- + dev.vm.synced_folder "~/src", "/var/www/skytap", :nfs => true, :mount_options => ['actimeo=1']
38
- +
39
- + dev.vm.provider :vmware_fusion do |box|
40
- + box.vmx["memsize"] = VM_RAM
41
- + box.vmx["numvcpus"] = VM_CPU
42
- + end
43
- +
44
- + dev.vm.provider :virtualbox do |box|
45
- + box.customize ["modifyvm", :id, "--memory", VM_RAM]
46
- + box.customize ["modifyvm", :id, "--cpus", VM_CPU]
47
- + box.customize ["modifyvm", :id, "--ioapic", "on"]
48
- + end
49
- +
50
- + dev.vm.provider :skytap do |box|
51
- + dev.vm.box = "skytap-dummy"
52
- + box.vm_url = GENERIC_UBUNTU
53
- + box.cpus = VM_CPU
54
- + box.ram = VM_RAM
55
- + box.guestos = "ubuntu"
56
- + end
57
- +
58
- + dev.vm.provision :ansible do |ansible|
59
- + ansible.playbook = "ansible/playbooks/webservers.yml"
60
- + # with the skytap provider, let it generate the inventory (.vagrant/provisioners/..)
61
- + #ansible.inventory_path = "ansible/environments/dev"
62
- + end
63
- + end
64
- +end
65
- diff --git a/ansible b/ansible
66
- new file mode 120000
67
- --- /dev/null
68
- +++ b/ansible
69
- @@ -0,0 +1,1 @@
70
- +../chuck/ansible
71
-
72
- diff --git a/ansible.cfg b/ansible.cfg
73
- new file mode 120000
74
- --- /dev/null
75
- +++ b/ansible.cfg
76
- @@ -0,0 +1,1 @@
77
- +../chuck/ansible.cfg
78
-
79
- diff --git a/rake b/rake
80
- new file mode 120000
81
- --- /dev/null
82
- +++ b/rake
83
- @@ -0,0 +1,1 @@
84
- +../chuck/rake
85
-
86
- diff --git a/rakefile.rb b/rakefile.rb
87
- new file mode 120000
88
- --- /dev/null
89
- +++ b/rakefile.rb
90
- @@ -0,0 +1,1 @@
91
- +../chuck/rakefile.rb
92
-
@@ -1,189 +0,0 @@
1
- # HG changeset patch
2
- # Parent ae81e0c2cfef9261fa36ec3f655f1cb5a13b4ed0
3
- diff -r ae81e0c2cfef -r db3a20145d36 Vagrantfile
4
- --- a/Vagrantfile Mon Jan 18 16:16:04 2016 -0800
5
- +++ b/Vagrantfile Mon Jan 18 17:32:52 2016 -0800
6
- @@ -125,7 +125,7 @@
7
- box.vm.provision "shell", path: "provisioning/apache.sh"
8
- box.vm.provision "shell", path: "provisioning/vagrant.sh"
9
-
10
- - #box.vm.network :forwarded_port, guest: 80, host: 9000
11
- + box.vm.network :forwarded_port, guest: 80, host: 9000
12
- #box.vm.network :forwarded_port, guest: 21, host: 9001
13
- end
14
-
15
- diff -r ae81e0c2cfef -r db3a20145d36 lib/vagrant-skytap/action/forward_ports.rb
16
- --- a/lib/vagrant-skytap/action/forward_ports.rb Mon Jan 18 16:16:04 2016 -0800
17
- +++ b/lib/vagrant-skytap/action/forward_ports.rb Mon Jan 18 17:32:52 2016 -0800
18
- @@ -12,14 +12,10 @@
19
-
20
- def call(env)
21
- @env = env
22
- -
23
- env[:forwarded_ports] ||= compile_forwarded_ports(env[:machine].config)
24
-
25
- - env[:forwarded_ports].each do |fp|
26
- - if fp.privileged_host_port?
27
- - env[:ui].warn I18n.t("vagrant.actions.vm.forward_ports.privileged_ports")
28
- - break
29
- - end
30
- + if env[:forwarded_ports].any?(&:privileged_host_port?)
31
- + env[:ui].warn I18n.t("vagrant.actions.vm.forward_ports.privileged_ports")
32
- end
33
-
34
- env[:ui].output(I18n.t("vagrant.actions.vm.forward_ports.forwarding"))
35
- diff -r ae81e0c2cfef -r db3a20145d36 lib/vagrant-skytap/hosts/common/cap/ssh_tunnel.rb
36
- --- a/lib/vagrant-skytap/hosts/common/cap/ssh_tunnel.rb Mon Jan 18 16:16:04 2016 -0800
37
- +++ b/lib/vagrant-skytap/hosts/common/cap/ssh_tunnel.rb Mon Jan 18 17:32:52 2016 -0800
38
- @@ -1,6 +1,6 @@
39
- require "vagrant/util/subprocess"
40
- require "vagrant/util/safe_chdir"
41
- -require "vagrant-skytap/models/forwarded_port"
42
- +require "vagrant-skytap/model/forwarded_port"
43
- require 'log4r'
44
-
45
- module VagrantPlugins
46
- @@ -13,22 +13,21 @@
47
- raise NotImplementedError
48
- end
49
-
50
- - # Create an ssh tunnel for the given [ForwardedPort]
51
- - # on the current machine using autossh. (If autossh
52
- - # is not available on the host, an appropriate error
53
- - # message will be shown, asking the user to install
54
- - # it.)
55
- + # Create an ssh tunnel for the given [Model::ForwardedPort]
56
- + # on the given machine using autossh. If autossh is not
57
- + # available on the host, an appropriate error message will
58
- + # be shown, asking the user to install it. env_hash should
59
- + # include a :machine_ssh_info key.
60
- #
61
- # @return [Vagrant::Util::Subprocess::Result]
62
- def start_ssh_tunnel(env, fp, machine, env_hash)
63
- args = ssh_args(fp, machine, env_hash[:machine_ssh_info])
64
- args << {env: autossh_environment_variables(fp, machine)}
65
- - # TODO: ensure that we overwrite any stale pidfile
66
- Vagrant::Util::Subprocess.execute("autossh", "-f", *args)
67
- end
68
-
69
- - # Kill the ssh tunnel for the given [ForwardedPort]
70
- - # by terminating the associated autossh process
71
- + # Kill the ssh tunnel for the given [Model::ForwardedPort]
72
- + # by terminating the associated autossh process.
73
- #
74
- # @return [Vagrant::Util::Subprocess::Result]
75
- def kill_ssh_tunnel(env, fp, machine)
76
- @@ -37,47 +36,49 @@
77
- end
78
- end
79
-
80
- - # Convenience method which kills all autossh
81
- - # processes for the given machine
82
- + # Convenience method which kills all autossh processes for
83
- + # the given machine.
84
- #
85
- - # @return [Array] of [ForwardedPort] objects
86
- + # @return [Array] of [Model::ForwardedPort] objects
87
- def clear_forwarded_ports(env, machine)
88
- get_fp_for_machine(machine).each do |fp|
89
- kill_ssh_tunnel(env, fp, machine)
90
- end
91
- end
92
-
93
- - # Reads the pid from the given pidfile_path (full
94
- - # path, not relative to the machine data_dir)
95
- + # Reads the pid from the given pidfile_path (full path, not
96
- + # relative to any machine data_dir)
97
- #
98
- # @return [Integer], or nil if not found.
99
- def read_pid(pidfile_path)
100
- File.read(pidfile_path).presence.try(:to_i) if File.exist?(pidfile_path)
101
- end
102
-
103
- - # Reads all the pidfiles from the machine's data_dir
104
- - # TODO make this return [ForwardedPort] objects
105
- + # Gets forwarded ports for the given machine. Currently
106
- + # implemented by reading pidfiles from the machine's data_dir.
107
- #
108
- - # @return [Array] of [ForwardedPort] objects
109
- + # @return [Array] of [Model::ForwardedPort] objects
110
- def get_fp_for_machine(machine)
111
- pidfiles = []
112
- Vagrant::Util::SafeChdir.safe_chdir(machine.data_dir) do
113
- pidfiles = Dir.glob("*.pid")
114
- end
115
- pidfiles.collect do |pidfile|
116
- - pidfile =~ /(\w+)(\d+)\.pid/
117
- + debugger
118
- + pidfile =~ /(\w\w\w)(\d+)\.pid/
119
- protocol, hostport, guestport = $1, $2, nil
120
- - ForwardedPort.new("#{protocol}#{hostport}", hostport, guestport, protocol: protocol)
121
- + Model::ForwardedPort.new("#{protocol}#{hostport}", hostport, guestport, protocol: protocol)
122
- end
123
- end
124
-
125
- - # Gets the args to be passed to ssh for the given
126
- - # [ForwardedPort] on the given machine.
127
- + # Gets the arguments to be passed to ssh for the given
128
- + # [Model::ForwardedPort] on the given machine. (This
129
- + # method may be overridden for specific OSes by
130
- + # creating a new host capability file.)
131
- #
132
- # @return [Array] of [String]
133
- def ssh_args(fp, machine, ssh_info)
134
- - # TODO read ssh_info without having to pass it in
135
- - ssh_info = env_hash[:machine_ssh_info]
136
- + # TODO: tune these settings
137
- ssh_options = {
138
- "ServerAliveInterval" => 10,
139
- "ServerAliveCountMax" => 3,
140
- diff -r ae81e0c2cfef -r db3a20145d36 spec/unit/hosts/common/cap/ssh_tunnel_spec.rb
141
- --- a/spec/unit/hosts/common/cap/ssh_tunnel_spec.rb Mon Jan 18 16:16:04 2016 -0800
142
- +++ b/spec/unit/hosts/common/cap/ssh_tunnel_spec.rb Mon Jan 18 17:32:52 2016 -0800
143
- @@ -6,23 +6,16 @@
144
- VagrantPlugins::Skytap::Plugin.components.host_capabilities[:bsd].get(:start_ssh_tunnel)
145
- end
146
-
147
- - let(:machine) { double("machine") }
148
- - let(:forwarded_port) { VagrantPlugins::Skytap::Model::ForwardedPort.new('tcp9000', 9000, 80, {}) }
149
- - let(:ssh_info) { {username: 'user', host: '10.0.0.1'} }
150
- - let(:env_path) { Pathname.new(File.expand_path("../../../../support/forwarded_ports", __FILE__)) }
151
- + let(:machine) { double("machine") }
152
- + let(:forwarded_port1) { VagrantPlugins::Skytap::Model::ForwardedPort.new('tcp9000', 9000, 80, {}) }
153
- + let(:forwarded_port2) { VagrantPlugins::Skytap::Model::ForwardedPort.new('tcp9001', 9001, 81, {}) }
154
- + let(:ssh_info) { {username: 'user', host: '10.0.0.1'} }
155
- + let(:env_path) { Pathname.new(File.expand_path("../../../../support/forwarded_ports", __FILE__)) }
156
-
157
- before do
158
- allow(machine).to receive(:data_dir).and_return(env_path.join("machines/vm1/skytap"))
159
- end
160
-
161
- - describe "clear_forwarded_ports" do
162
- - it "calls kill_ssh_tunnel for each pidfile found" do
163
- - expect(described_class).to receive(:kill_ssh_tunnel).with(nil, "tcp9000.pid", {machine: machine})
164
- - expect(described_class).to receive(:kill_ssh_tunnel).with(nil, "tcp9001.pid", {machine: machine})
165
- - described_class.clear_forwarded_ports(nil, {machine: machine})
166
- - end
167
- - end
168
- -
169
- describe "read_pid" do
170
- it "reads the pid" do
171
- pid = described_class.read_pid(env_path.join("machines/vm1/skytap/tcp9000.pid"))
172
- @@ -37,7 +30,7 @@
173
-
174
- describe "ssh_args" do
175
- it "returns expected args" do
176
- - args = described_class.ssh_args(forwarded_port, {machine: machine, machine_ssh_info: ssh_info})
177
- + args = described_class.ssh_args(forwarded_port1, machine, ssh_info)
178
- expect(args).to eq(["-q", "-N",
179
- "-i", env_path.join("machines/vm1/skytap/private_key").to_s,
180
- "-L", "9000:localhost:80",
181
- @@ -51,7 +44,7 @@
182
-
183
- describe "autossh_environment_variables" do
184
- it "defaults monitoring port to 0" do
185
- - vars = described_class.autossh_environment_variables('tcp9000.pid', {machine: machine})
186
- + vars = described_class.autossh_environment_variables(forwarded_port1, machine)
187
- expect(vars).to eq({
188
- "AUTOSSH_PIDFILE" => env_path.join("machines/vm1/skytap/tcp9000.pid").to_s,
189
- "AUTOSSH_PORT" => 0,
@@ -1,40 +0,0 @@
1
- # HG changeset patch
2
- # Parent 1397b5a1cf5158f68afa12477b1de4101b8da248
3
- [mq]: cache-api-client-in-up
4
-
5
- diff -r 1397b5a1cf51 lib/vagrant-skytap/action/initialize_api_client.rb
6
- --- a/lib/vagrant-skytap/action/initialize_api_client.rb Mon Dec 07 19:47:09 2015 -0800
7
- +++ b/lib/vagrant-skytap/action/initialize_api_client.rb Wed Dec 09 16:03:46 2015 -0800
8
- @@ -13,11 +13,15 @@
9
- end
10
-
11
- def call(env)
12
- - @logger.info("Connecting to Skytap...")
13
- + unless env[:api_client]
14
- + @logger.info("Connecting to Skytap...")
15
-
16
- - client = API::Client.new(env[:machine].provider_config)
17
- - if client.get('/configurations').code == '200'
18
- - env[:api_client] = client
19
- + client = API::Client.new(env[:machine].provider_config)
20
- + if client.get('/configurations').code == '200'
21
- + env[:api_client] = client
22
- + end
23
- + else
24
- + @logger.info("Using cached API client")
25
- end
26
-
27
- @app.call(env)
28
- diff -r 1397b5a1cf51 lib/vagrant-skytap/command/up.rb
29
- --- a/lib/vagrant-skytap/command/up.rb Mon Dec 07 19:47:09 2015 -0800
30
- +++ b/lib/vagrant-skytap/command/up.rb Wed Dec 09 16:03:46 2015 -0800
31
- @@ -76,7 +76,8 @@
32
- provider: machine.provider_name))
33
-
34
- machines << machine
35
- - machine.action(:create, options)
36
- + result = machine.action(:create, options)
37
- + options[:api_client] ||= result[:api_client]
38
- machine.action(:update_hardware, options)
39
- end
40
-
@@ -1,44 +0,0 @@
1
- # HG changeset patch
2
- # Parent 376d225699f6e5edced626762b20690f8a86e566
3
- remove dead code in actions.rb
4
-
5
- diff -r 376d225699f6 -r 57b84d076d7f lib/vagrant-skytap/action.rb
6
- --- a/lib/vagrant-skytap/action.rb Tue Oct 20 13:31:40 2015 -0700
7
- +++ b/lib/vagrant-skytap/action.rb Tue Oct 20 13:31:55 2015 -0700
8
- @@ -86,17 +86,11 @@
9
- b.use FetchEnvironment
10
- b.use Call, EnvironmentExists do |env, b2|
11
- if env[:result]
12
- - b2.use Call, RunEnvironment do |env2, b3|
13
- - if env2[:result]
14
- - b3.use PrepareNFSSettings
15
- - b3.use PrepareNFSValidIds
16
- - b3.use Provision
17
- - b3.use SyncedFolders
18
- - else
19
- - #TODO:NLA IMPLEMENT ME
20
- - # b2.use RunFailed
21
- - end
22
- - end
23
- + b2.use RunEnvironment
24
- + b2.use PrepareNFSSettings
25
- + b2.use PrepareNFSValidIds
26
- + b2.use Provision
27
- + b2.use SyncedFolders
28
- else
29
- b2.use DeleteEnvironment
30
- b2.use MessageNotCreated
31
- @@ -217,12 +211,7 @@
32
- end
33
- end
34
- b.use action_prepare_boot
35
- - b.use Call, RunVm do |env, b1|
36
- - unless env[:result]
37
- - #TODO:NLA IMPLEMENT ME
38
- - # b2.use RunFailed
39
- - end
40
- - end
41
- + b.use RunVm
42
- end
43
- end
44
-
@@ -1,55 +0,0 @@
1
- # HG changeset patch
2
- # Parent 7e9e3ef348d477de33cc44c1eb0ab7ea3cac1f63
3
- # Parent b2aa1fa1e5603d434a08013f830ca256a0944559
4
- debug changes
5
-
6
- diff -r b2aa1fa1e560 lib/vagrant-skytap.rb
7
- --- a/lib/vagrant-skytap.rb Fri Jan 08 11:51:56 2016 -0800
8
- +++ b/lib/vagrant-skytap.rb Wed Jan 13 12:22:02 2016 -0800
9
- @@ -7,6 +7,9 @@
10
- require "vagrant-skytap/core_ext/try"
11
- require "vagrant-skytap/plugin"
12
-
13
- +require 'byebug'
14
- +require 'awesome_print'
15
- +
16
- module VagrantPlugins
17
- module Skytap
18
- lib_path = Pathname.new(File.expand_path("../vagrant-skytap", __FILE__))
19
- diff -r b2aa1fa1e560 spec/unit/base.rb
20
- --- a/spec/unit/base.rb Fri Jan 08 11:51:56 2016 -0800
21
- +++ b/spec/unit/base.rb Wed Jan 13 12:22:02 2016 -0800
22
- @@ -5,6 +5,7 @@
23
- require "checkpoint"
24
- require "rspec/autorun"
25
- require "webmock/rspec"
26
- +require "byebug"
27
-
28
- # Require Vagrant itself so we can reference the proper
29
- # classes to test.
30
- diff -r b2aa1fa1e560 vagrant-skytap.gemspec
31
- --- a/vagrant-skytap.gemspec Fri Jan 08 11:51:56 2016 -0800
32
- +++ b/vagrant-skytap.gemspec Wed Jan 13 12:22:02 2016 -0800
33
- @@ -17,6 +17,11 @@
34
-
35
- s.add_runtime_dependency "json_pure"
36
-
37
- + # MAKE SURE YOU POP THIS PATCH BEFORE DISTRIBUTING OR PUSHING THE GEM!
38
- + s.add_runtime_dependency "byebug"
39
- + s.add_runtime_dependency "pry", "~> 0.10"
40
- + s.add_runtime_dependency "awesome_print"
41
- +
42
- s.add_development_dependency "rake"
43
- s.add_development_dependency "rspec-core", "~> 2.14.0"
44
- s.add_development_dependency "rspec-expectations", "~> 2.14.0"
45
- @@ -24,6 +29,10 @@
46
- s.add_development_dependency "vagrant-spec", "~> 1.4.0"
47
- s.add_development_dependency "webmock", "~> 1.20"
48
-
49
- + s.add_development_dependency "byebug"#, "~> 5.0.0"
50
- + s.add_development_dependency "pry", "~> 0.10"
51
- + s.add_development_dependency "awesome_print"
52
- +
53
- # The following block of code determines the files that should be included
54
- # in the gem. It does this by reading all the files in the directory where
55
- # this gemspec is, and parsing out the ignored files from the gitignore.