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,50 +0,0 @@
1
- # HG changeset patch
2
- # Parent 7bf28b483ba4495c173d9316aee2d8482d9705ab
3
- ENG-12301 release machine lock
4
-
5
- diff -r 7bf28b483ba4 lib/vagrant-skytap/action/mixin_machine_index.rb
6
- --- a/lib/vagrant-skytap/action/mixin_machine_index.rb Thu Dec 03 19:36:57 2015 -0800
7
- +++ b/lib/vagrant-skytap/action/mixin_machine_index.rb Mon Dec 07 14:42:07 2015 -0800
8
- @@ -14,6 +14,7 @@
9
- # NOTE: #get locks the machine. Make sure to #release(entry)
10
- # when finished.
11
- def machine_index_entry
12
- + @logger.debug("Locking machine #{index_uuid}") if @logger
13
- entry = machine_index.get(env[:machine].index_uuid)
14
- end
15
- end
16
- diff -r 7bf28b483ba4 lib/vagrant-skytap/action/store_extra_data.rb
17
- --- a/lib/vagrant-skytap/action/store_extra_data.rb Thu Dec 03 19:36:57 2015 -0800
18
- +++ b/lib/vagrant-skytap/action/store_extra_data.rb Mon Dec 07 14:42:07 2015 -0800
19
- @@ -17,6 +17,7 @@
20
-
21
- def call(env)
22
- entry = machine_index_entry
23
- + puts "Machine locked. Pausing 5 seconds so you can kill me"
24
- entry.extra_data.merge!(provider_extra_data)
25
- entry = machine_index.set(entry)
26
- machine_index.release(entry)
27
- diff -r 7bf28b483ba4 lib/vagrant-skytap/provider.rb
28
- --- a/lib/vagrant-skytap/provider.rb Thu Dec 03 19:36:57 2015 -0800
29
- +++ b/lib/vagrant-skytap/provider.rb Mon Dec 07 14:42:07 2015 -0800
30
- @@ -6,6 +6,7 @@
31
- class Provider < Vagrant.plugin("2", :provider)
32
- def initialize(machine)
33
- @machine = machine
34
- + @logger = Log4r::Logger.new("vagrant_skytap::plugin::provider")
35
- end
36
-
37
- def action(name)
38
- @@ -26,10 +27,11 @@
39
- end
40
-
41
- def state
42
- + @logger.debug("Entered Provider#state")
43
- # Run a custom action we define called "read_state" which does
44
- # what it says. It puts the state in the `:machine_state_id`
45
- # key in the environment.
46
- - env = @machine.action("read_state")
47
- + env = @machine.action("read_state", lock: false) # can't be this easy
48
-
49
- state_id = env[:machine_state_id]
50
-
@@ -1,95 +0,0 @@
1
- # HG changeset patch
2
- # Parent d12ff92a5f45243523ff63f49b559dd3793fe41e
3
- ENG-12843 make Up command work without hacking a copy of the command
4
-
5
- diff -r d12ff92a5f45 -r 52e7dd5125d7 lib/vagrant-skytap/action.rb
6
- --- a/lib/vagrant-skytap/action.rb Mon Dec 28 10:54:14 2015 -0800
7
- +++ b/lib/vagrant-skytap/action.rb Tue Jan 05 13:21:52 2016 -0800
8
- @@ -190,6 +190,16 @@
9
- # and initial states for all machines to be run, potentially
10
- # with a single REST call.
11
-
12
- + def self.action_up
13
- + Vagrant::Action::Builder.new.tap do |b|
14
- + b.use HandleBox
15
- + #b.use action_fetch_environment
16
- + b.use ConfigValidate
17
- +# b.use InitializeAPIClient
18
- +# b.use FetchEnvironment
19
- + end
20
- + end
21
- +
22
- def self.action_create
23
- Vagrant::Action::Builder.new.tap do |b|
24
- b.use HandleBox
25
- @@ -320,6 +330,7 @@
26
- autoload :MessageEnvironmentUrl, action_root.join("message_environment_url")
27
- autoload :MessageResuming, action_root.join("message_resuming")
28
- autoload :MessageWillNotDestroy, action_root.join("message_will_not_destroy")
29
- + autoload :PostActionUp, action_root.join("post_action_up")
30
- autoload :PrepareForwardedPortCollisionParams, action_root.join("prepare_forwarded_port_collision_params")
31
- autoload :PrepareNFSSettings, action_root.join("prepare_nfs_settings")
32
- autoload :PrepareNFSValidIds, action_root.join("prepare_nfs_valid_ids")
33
- diff -r d12ff92a5f45 -r 52e7dd5125d7 lib/vagrant-skytap/action/post_action_up.rb
34
- --- /dev/null Thu Jan 01 00:00:00 1970 +0000
35
- +++ b/lib/vagrant-skytap/action/post_action_up.rb Tue Jan 05 13:21:52 2016 -0800
36
- @@ -0,0 +1,26 @@
37
- +require 'byebug'
38
- +require_relative "mixin_machine_index"
39
- +
40
- +module VagrantPlugins
41
- + module Skytap
42
- + module Action
43
- + # This can be used with "Call" built-in to check if the action
44
- + # is being performed as part of a parallel operation.
45
- + class PostActionUp
46
- + include MixinMachineIndex
47
- + def initialize(app, env)
48
- + @app = app
49
- + @logger = Log4r::Logger.new("vagrant_skytap::action::post_action_up")
50
- + end
51
- +
52
- + def call(env)
53
- + @logger.info env[:action_name]
54
- + @logger.info env[:machine].try(:name)
55
- + debugger
56
- +
57
- + @app.call(env)
58
- + end
59
- + end
60
- + end
61
- + end
62
- +end
63
- diff -r d12ff92a5f45 -r 52e7dd5125d7 lib/vagrant-skytap/plugin.rb
64
- --- a/lib/vagrant-skytap/plugin.rb Mon Dec 28 10:54:14 2015 -0800
65
- +++ b/lib/vagrant-skytap/plugin.rb Tue Jan 05 13:21:52 2016 -0800
66
- @@ -3,7 +3,7 @@
67
- rescue LoadError
68
- raise "The Vagrant Skytap plugin must be run within Vagrant."
69
- end
70
- -
71
- +require 'byebug'
72
- # This is a sanity check to make sure no one is attempting to install
73
- # this into an early Vagrant version.
74
- if Vagrant::VERSION < "1.2.0"
75
- @@ -34,9 +34,17 @@
76
- Provider
77
- end
78
-
79
- - command("up", primary: true) do
80
- - require_relative "command/up"
81
- - Skytap::Command::Up
82
- +# command("up", primary: true) do
83
- +# require_relative "command/up"
84
- +# Skytap::Command::Up
85
- +# end
86
- +
87
- + action_hook(:post_up_behavior1, :environment_unload) do |hook|
88
- + hook.prepend(VagrantPlugins::Skytap::Action::PostActionUp)
89
- + end
90
- +
91
- + action_hook(:post_up_behavior4, :machine_action_up) do |hook|
92
- + hook.append(VagrantPlugins::Skytap::Action::PostActionUp)
93
- end
94
-
95
- command("publish-url", primary: true) do
@@ -1,112 +0,0 @@
1
- # HG changeset patch
2
- # Parent 2d0352ab9e88823add32c339d95d9782c00fba51
3
- ENG-11604 support using environment vms (this is impossible without an API change)
4
-
5
- diff -r 2d0352ab9e88 Vagrantfile
6
- --- a/Vagrantfile Wed Nov 04 16:26:46 2015 -0800
7
- +++ b/Vagrantfile Wed Nov 04 16:28:24 2015 -0800
8
- @@ -39,7 +39,7 @@
9
- config.vm.define "vm1" do |ubuntu|
10
- ubuntu.vm.hostname = "vm1"
11
- ubuntu.vm.provider :skytap do |box|
12
- - box.vm_url = UBUNTU1#GENERIC_UBUNTU
13
- + box.vm_url = UBUNTU_STOPPED_ENVIRONMENT_SOURCE_VM_A#GENERIC_UBUNTU
14
- #box.cpus = 1
15
- #box.cpuspersocket = 1
16
- #box.ram = 1024
17
- @@ -64,7 +64,7 @@
18
- config.vm.define "vm3" do |ubuntu|
19
- ubuntu.vm.hostname = "vm3"
20
- ubuntu.vm.provider :skytap do |box|
21
- - box.vm_url = UBUNTU2#GENERIC_UBUNTU
22
- + box.vm_url = UBUNTU_STOPPED_ENVIRONMENT_SOURCE_VM_B#GENERIC_UBUNTU
23
- end
24
- ubuntu.vm.communicator = :ssh
25
- ubuntu.ssh.username = "skytap"
26
- diff -r 2d0352ab9e88 lib/vagrant-skytap/api/environment.rb
27
- --- a/lib/vagrant-skytap/api/environment.rb Wed Nov 04 16:26:46 2015 -0800
28
- +++ b/lib/vagrant-skytap/api/environment.rb Wed Nov 04 16:28:24 2015 -0800
29
- @@ -18,8 +18,27 @@
30
- vm = Vm.fetch(env, vm_url)
31
- check_vm_before_adding(env, vm)
32
-
33
- - resp = env[:api_client].post(RESOURCE_ROOT, JSON.dump(template_id: vm.template_id, vm_ids: [vm.id]))
34
- - fetch(env, resp['Location'])
35
- + params = {
36
- + vm_ids: [vm.id]
37
- + }.tap do |params|
38
- + if vm.from_template?
39
- + params[:template_id] = vm.template_id
40
- + else
41
- + params[:configuration_id] = vm.environment_id
42
- + end
43
- + end
44
- +
45
- + puts params
46
- + debugger
47
- +
48
- + resp = env[:api_client].post(RESOURCE_ROOT, JSON.dump(params))#_for_add(vm)))
49
- + if resp['Location']
50
- + puts "Redirected to #{resp['Location']}"
51
- + fetch(env, resp['Location'])
52
- + else
53
- + puts "call returned #{resp.body}"
54
- + new(JSON.load(resp.body), env)
55
- + end
56
- end
57
-
58
- def fetch(env, url)
59
- @@ -31,6 +50,16 @@
60
- EnvironmentProperties.read(env[:machine].env.local_data_path)
61
- end
62
-
63
- + def params_for_add(vm)
64
- + {
65
- + vm_ids: [vm.id]
66
- + }.tap do |params|
67
- + unless params[:merge_configuration] = vm.environment_id
68
- + params[:template_id] = vm.template_id
69
- + end
70
- + end
71
- + end
72
- +
73
- def check_vm_before_adding(env, vm)
74
- raise Errors::NotTemplateVm, url: vm.url unless vm.from_template?
75
- raise Errors::SourceVmNotStopped, name: env[:machine].name, url: vm.url unless vm.stopped?
76
- @@ -90,7 +119,20 @@
77
- check_vm_before_adding(env, vm)
78
- vm_ids = vms.collect(&:id)
79
-
80
- - update_with_retry(template_id: vm.template_id, vm_ids: [vm.id])
81
- + params = {
82
- + vm_ids: [vm.id]
83
- + }.tap do |params|
84
- + if vm.from_template?
85
- + params[:template_id] = vm.template_id
86
- + else
87
- + params[:merge_configuration] = vm.environment_id
88
- + end
89
- + end
90
- +
91
- +
92
- + puts params
93
- + debugger
94
- + update_with_retry(params)#self.class.params_for_add(vm))
95
- new_vm_ids = vms.collect(&:id) - vm_ids
96
- get_vm_by_id(new_vm_ids.last)
97
- end
98
- diff -r 2d0352ab9e88 lib/vagrant-skytap/api/vm.rb
99
- --- a/lib/vagrant-skytap/api/vm.rb Wed Nov 04 16:26:46 2015 -0800
100
- +++ b/lib/vagrant-skytap/api/vm.rb Wed Nov 04 16:28:24 2015 -0800
101
- @@ -60,6 +60,11 @@
102
- !!get_api_attribute('template_url')
103
- end
104
-
105
- + def environment_id
106
- + get_api_attribute('configuration_url') =~ /configurations\/(\d+)/
107
- + $1
108
- + end
109
- +
110
- def template_id
111
- get_api_attribute('template_url') =~ /templates\/(\d+)/
112
- $1
@@ -1,163 +0,0 @@
1
- # HG changeset patch
2
- # Parent 02c7d9d9d39e1ec55dfd0636c2b043b1837782d2
3
- imported patch frickin-vagrant-spec
4
-
5
- diff --git a/boxes/acceptance/README.md b/boxes/acceptance/README.md
6
- new file mode 100644
7
- --- /dev/null
8
- +++ b/boxes/acceptance/README.md
9
- @@ -0,0 +1,13 @@
10
- +# Vagrant Skytap Example Box
11
- +
12
- +Vagrant providers each require a custom provider-specific box format.
13
- +This folder shows the example contents of a box for the `skytap` provider.
14
- +To turn this into a box:
15
- +
16
- +```
17
- +$ tar cvzf skytap.box ./metadata.json ./Vagrantfile
18
- +```
19
- +
20
- +This box works by using Vagrant's built-in Vagrantfile merging to setup
21
- +defaults for Skytap. These defaults can easily be overwritten by higher-level
22
- +Vagrantfiles (such as project root Vagrantfiles).
23
- diff --git a/boxes/acceptance/Vagrantfile b/boxes/acceptance/Vagrantfile
24
- new file mode 100644
25
- --- /dev/null
26
- +++ b/boxes/acceptance/Vagrantfile
27
- @@ -0,0 +1,8 @@
28
- +# -*- mode: ruby -*-
29
- +# vi: set ft=ruby :
30
- +
31
- +Vagrant.configure(2) do |config|
32
- + config.vm.provider :skytap do |skytap|
33
- + skytap.vm_url = "https://cloud.skytap.com/vms/3157858"
34
- + end
35
- +end
36
- diff --git a/boxes/acceptance/empty.box b/boxes/acceptance/empty.box
37
- new file mode 100644
38
- index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..64bf34aa4fd03ff9c06c88f1dd7c6a992a0005c8
39
- GIT binary patch
40
- literal 166
41
- zc$|~(=3pq7bPQu)etX`L>yUv!>%(=`T@#qEc=ihJ@m-*~BEx$Ym(snv83$Vv%3WLj
42
- z-`>MH^XTlXQm&Kcc0XSklsr%3RC=@~^!y#G?_MjHe^1#PxU6jJm1A8Js>hx!4A|r`
43
- zoB#2InlqtJUCA?Up3cs-{%jw+=-yBDyrri~<aeLm#~Jv3id^6IC)Kg{PRCDYW<Ult
44
- PUm51x&704l!N33jadS%=
45
-
46
- diff --git a/boxes/acceptance/metadata.json b/boxes/acceptance/metadata.json
47
- new file mode 100644
48
- --- /dev/null
49
- +++ b/boxes/acceptance/metadata.json
50
- @@ -0,0 +1,3 @@
51
- +{
52
- + "provider": "skytap"
53
- +}
54
- diff --git a/spec/acceptance/provider/up_spec.rb b/spec/acceptance/provider/up_spec.rb
55
- --- a/spec/acceptance/provider/up_spec.rb
56
- +++ b/spec/acceptance/provider/up_spec.rb
57
- @@ -16,25 +16,46 @@
58
- assert_execute('vagrant', 'destroy', '--force')
59
- end
60
-
61
- - it 'should bring up the machine and halt it' do
62
- - status("Test: machine can be brought up, parallel by default")
63
- - up_result = execute("vagrant", "up")
64
- + it 'should bring up the machine' do
65
- + status("Test: machine can be brought up")
66
- + up_result = execute("vagrant", "up", "vm1")
67
- expect(up_result).to exit_with(0)
68
-
69
- status("Test: machine is running after up")
70
- - echo_result = execute("vagrant", "ssh", "-c", "echo foo")
71
- + echo_result = execute("vagrant", "ssh", "vm1", "-c", "echo foo")
72
- expect(echo_result).to exit_with(0)
73
- expect(echo_result.stdout).to match(/foo\n$/)
74
- end
75
- -
76
- - it 'should bring up the machine and halt it' do
77
- - status("Test: machine can be brought up no parallel")
78
- - up_result = execute("vagrant", "up", "--no-parallel")
79
- - expect(up_result).to exit_with(0)
80
- -
81
- - status("Test: machine is running after up")
82
- - echo_result = execute("vagrant", "ssh", "-c", "echo foo")
83
- - expect(echo_result).to exit_with(0)
84
- - expect(echo_result.stdout).to match(/foo\n$/)
85
- - end
86
- +#
87
- +# it 'should bring up 2 machines in parallel' do
88
- +# status("Test: 2 machines can be brought up, parallel by default")
89
- +# up_result = execute("vagrant", "up")
90
- +# expect(up_result).to exit_with(0)
91
- +#
92
- +# status("Test: machine vm1 is running after up")
93
- +# echo_result = execute("vagrant", "ssh", "vm1", "-c", "echo foo")
94
- +# expect(echo_result).to exit_with(0)
95
- +# expect(echo_result.stdout).to match(/foo\n$/)
96
- +#
97
- +# status("Test: machine vm2 is running after up")
98
- +# echo_result = execute("vagrant", "ssh", "vm2", "-c", "echo foo")
99
- +# expect(echo_result).to exit_with(0)
100
- +# expect(echo_result.stdout).to match(/foo\n$/)
101
- +# end
102
- +#
103
- +# it 'should bring up 2 machines in no-parallel mode' do
104
- +# status("Test: 2 machines can be brought up, no-parallel")
105
- +# up_result = execute("vagrant", "up", "--no-parallel")
106
- +# expect(up_result).to exit_with(0)
107
- +#
108
- +# status("Test: machine vm1 is running after up")
109
- +# echo_result = execute("vagrant", "ssh", "vm1", "-c", "echo foo")
110
- +# expect(echo_result).to exit_with(0)
111
- +# expect(echo_result.stdout).to match(/foo\n$/)
112
- +#
113
- +# status("Test: machine vm2 is running after up")
114
- +# echo_result = execute("vagrant", "ssh", "vm2", "-c", "echo foo")
115
- +# expect(echo_result).to exit_with(0)
116
- +# expect(echo_result.stdout).to match(/foo\n$/)
117
- +# end
118
- end
119
- diff --git a/spec/acceptance/skeletons/generic/Vagrantfile b/spec/acceptance/skeletons/generic/Vagrantfile
120
- --- a/spec/acceptance/skeletons/generic/Vagrantfile
121
- +++ b/spec/acceptance/skeletons/generic/Vagrantfile
122
- @@ -1,3 +1,7 @@
123
- +BASE_BOX_URL = "https://cloud.skytap.com/vms/6869434"
124
- +BASE_BOX_USERNAME = "skytap"
125
- +BASE_BOX_PASSWORD = "ChangeMe!"
126
- +
127
- Vagrant.configure("2") do |config|
128
- config.vm.box = "skytap/empty"
129
-
130
- @@ -6,13 +10,16 @@
131
- skytap.username = "etrue"
132
- skytap.api_token = "fcb2620b72efddbc8239e25db9d812f510c7e166"
133
- skytap.vpn_url = "https://cloud.skytap.com/vpns/vpn-711360"
134
- + skytap.vm_url = BASE_BOX_URL
135
- end
136
-
137
- - config.vm.define "vm1" do |ubuntu|
138
- - ubuntu.vm.provider :skytap do |box|
139
- - box.vm_url = "https://cloud.skytap.com/vms/6869434" # golden!
140
- - end
141
- - ubuntu.ssh.username = "skytap"
142
- - ubuntu.ssh.password = "ChangeMe!"
143
- + config.vm.define "vm1" do |vm|
144
- + vm.ssh.username = BASE_BOX_USERNAME
145
- + vm.ssh.password = BASE_BOX_PASSWORD
146
- + end
147
- +
148
- + config.vm.define "vm" do |vm|
149
- + vm.ssh.username = "skytap"
150
- + vm.ssh.password = "ChangeMe!"
151
- end
152
- end
153
- diff --git a/vagrant-spec.config.rb b/vagrant-spec.config.rb
154
- --- a/vagrant-spec.config.rb
155
- +++ b/vagrant-spec.config.rb
156
- @@ -5,6 +5,6 @@
157
- c.skeleton_paths << File.expand_path("../spec/acceptance/skeletons", __FILE__)
158
-
159
- c.provider "skytap",
160
- - box: File.expand_path("../skytap-dummy.box", __FILE__),
161
- + box: File.expand_path("../boxes/empty.box", __FILE__),
162
- contexts: ["provider-context/skytap"]
163
- end
@@ -1,14 +0,0 @@
1
- # HG changeset patch
2
- # Parent f88c782b6f8e9de2c1f55ca0df98756ba64b928a
3
- current pre-version
4
-
5
- diff -r f88c782b6f8e lib/vagrant-skytap/version.rb
6
- --- a/lib/vagrant-skytap/version.rb Mon Dec 28 10:53:44 2015 -0800
7
- +++ b/lib/vagrant-skytap/version.rb Mon Dec 28 10:54:12 2015 -0800
8
- @@ -1,5 +1,5 @@
9
- module VagrantPlugins
10
- module Skytap
11
- - VERSION = "0.1.12"
12
- + VERSION = "0.1.13.pre1"
13
- end
14
- end
@@ -1,9 +0,0 @@
1
- # HG changeset patch
2
- # Parent 14d9041ca24e43e3ae413a68bc6de659fa9b79ba
3
- imported patch gems-old
4
-
5
- diff -r 14d9041ca24e gems/README
6
- --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7
- +++ b/gems/README Mon Nov 09 14:00:30 2015 -0800
8
- @@ -0,0 +1,1 @@
9
- +There are some old gems missing. Hope that's okay