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,143 +0,0 @@
1
- # HG changeset patch
2
- # Parent d55067c6de25d1b7ff712f9a8a934dc122e82e14
3
- # Parent d55067c6de25d1b7ff712f9a8a934dc122e82e14
4
- ENG-10369 Detect errors in 200 response.
5
-
6
- diff -r d55067c6de25 Vagrantfile
7
- --- a/Vagrantfile Mon Nov 09 18:52:55 2015 -0800
8
- +++ b/Vagrantfile Tue Nov 10 15:32:33 2015 -0800
9
- @@ -3,20 +3,20 @@
10
- config.vm.synced_folder ".", "/vagrant", disabled: true
11
-
12
- config.vm.provider :skytap do |skytap, override|
13
- - skytap.username = "etrue"
14
- - skytap.api_token = "fcb2620b72efddbc8239e25db9d812f510c7e166"
15
- - skytap.base_url = "https://cloud.skytap.com/"
16
- - #skytap.username = "vagrant_provider_admin"
17
- - #skytap.api_token = "7c5718531a32eb90e92c804ce1f73da98be22cdf"
18
- - #skytap.base_url = "https://test.skytap.com/"
19
- +# skytap.username = "etrue"
20
- +# skytap.api_token = "fcb2620b72efddbc8239e25db9d812f510c7e166"
21
- +# skytap.base_url = "https://cloud.skytap.com/"
22
- + skytap.username = "vagrant_provider_admin"
23
- + skytap.api_token = "7c5718531a32eb90e92c804ce1f73da98be22cdf"
24
- + skytap.base_url = "https://test.skytap.com/"
25
- #skytap.username = "jsmith"
26
- #skytap.api_token = "754be5220955f35840498340606b4dfa89f7eb61"
27
- #skytap.base_url = "https://cloud.skytap.dev/"
28
- end
29
-
30
- - GENERIC_UBUNTU = 'https://cloud.skytap.com/vms/6869434'
31
- +# GENERIC_UBUNTU = 'https://cloud.skytap.com/vms/6869434'
32
- # for test user
33
- - #GENERIC_UBUNTU = 'https://cloud.skytap.com/vms/4840008'
34
- + GENERIC_UBUNTU = 'https://test.skytap.com/vms/4840008'
35
- # local user
36
- #GENERIC_UBUNTU = 'https://cloud.skytap.dev/vms/374'
37
-
38
- @@ -33,6 +33,8 @@
39
- UBUNTU_STOPPED_ENVIRONMENT_SOURCE_VM_A = "https://cloud.skytap.com/vms/7457184"
40
- UBUNTU_STOPPED_ENVIRONMENT_SOURCE_VM_B = "https://cloud.skytap.com/vms/7468766"
41
-
42
- + VAGRANT_CUSTOMER_VPN = "https://cloud.skytap.com/vpns/vpn-3195669"
43
- +
44
- # separate template
45
- # another ubuntu = 'https://cloud.skytap.com/vms/7242466'
46
- WINDOWS_WINRM_CONFIGURED = 'https://cloud.skytap.com/vms/7242468'
47
- @@ -40,12 +42,13 @@
48
- config.vm.define "vm1" do |ubuntu|
49
- ubuntu.vm.hostname = "vm1"
50
- ubuntu.vm.provider :skytap do |box|
51
- - box.vm_url = UBUNTU1#GENERIC_UBUNTU
52
- + box.vm_url = GENERIC_UBUNTU
53
- #box.cpus = 1
54
- #box.cpuspersocket = 1
55
- #box.ram = 1024
56
- #box.guestos = "ubuntu"
57
- #box.vpn_url = "cloud.skytap.com/vpns/vpn-711360"
58
- + box.vpn_url = VAGRANT_CUSTOMER_VPN
59
- end
60
- ubuntu.vm.synced_folder "vm1", "/synced", type: :nfs
61
- ubuntu.vm.communicator = :ssh
62
- diff -r d55067c6de25 lib/vagrant-skytap/api/busyable.rb
63
- --- a/lib/vagrant-skytap/api/busyable.rb Mon Nov 09 18:52:55 2015 -0800
64
- +++ b/lib/vagrant-skytap/api/busyable.rb Tue Nov 10 15:32:33 2015 -0800
65
- @@ -10,6 +10,7 @@
66
- def update_with_retry(attrs, path=nil)
67
- retry_while_resource_busy do
68
- resp = api_client.put(path || url, JSON.dump(attrs))
69
- + raise Errors::OperationFailed, err: err if err = api_client.error_string_from_body(resp)
70
- refresh(JSON.load(resp.body))
71
- break
72
- end
73
- diff -r d55067c6de25 lib/vagrant-skytap/api/client.rb
74
- --- a/lib/vagrant-skytap/api/client.rb Mon Nov 09 18:52:55 2015 -0800
75
- +++ b/lib/vagrant-skytap/api/client.rb Tue Nov 10 15:32:33 2015 -0800
76
- @@ -96,7 +96,7 @@
77
- def error_string_from_body(resp)
78
- resp = resp.body if resp.respond_to?(:body)
79
- begin
80
- - resp = JSON.load(resp)
81
- + resp = JSON.load(resp) unless resp.is_a?(Hash)
82
- errors = resp['error'] || resp['errors']
83
- errors = errors.join('; ') if errors.respond_to? :join
84
- rescue
85
- diff -r d55067c6de25 lib/vagrant-skytap/api/runstate_operations.rb
86
- --- a/lib/vagrant-skytap/api/runstate_operations.rb Mon Nov 09 18:52:55 2015 -0800
87
- +++ b/lib/vagrant-skytap/api/runstate_operations.rb Tue Nov 10 15:32:33 2015 -0800
88
- @@ -36,12 +36,18 @@
89
- def wait_for_runstate(expected_runstate)
90
- expected_runstate = expected_runstate.to_s
91
- retry_while_resource_busy do
92
- - unless reload.busy?
93
- + unless reload_with_error_handling.busy?
94
- break if runstate == expected_runstate || expected_runstate == 'ready'
95
- end
96
- end
97
- end
98
-
99
- + def reload_with_error_handling
100
- + reload.tap do |ret|
101
- + raise Errors::OperationFailed, err: err if err = api_client.error_string_from_body(attrs)
102
- + end
103
- + end
104
- +
105
- def runstate
106
- get_api_attribute('runstate')
107
- end
108
- diff -r d55067c6de25 lib/vagrant-skytap/api/vm.rb
109
- --- a/lib/vagrant-skytap/api/vm.rb Mon Nov 09 18:52:55 2015 -0800
110
- +++ b/lib/vagrant-skytap/api/vm.rb Tue Nov 10 15:32:33 2015 -0800
111
- @@ -20,12 +20,6 @@
112
- resp = env[:api_client].get(url)
113
- new(JSON.load(resp.body), env[:environment], env)
114
- end
115
- -
116
- - def current_vm(env)
117
- - if (environment = env[:environment]) && (machine = env[:machine]) && machine.id
118
- - environment.get_vm_by_id(machine.id)
119
- - end
120
- - end
121
- end
122
-
123
- def initialize(attrs, environment, env)
124
- @@ -40,6 +34,19 @@
125
- super
126
- end
127
-
128
- + def refresh_from_environment
129
- + refresh(environment.get_vm_by_id(id).attrs)
130
- + end
131
- +
132
- + def reload_with_error_handling
133
- + environment.reload_with_error_handling
134
- + refresh_from_environment.tap do |ret|
135
- + if err = api_client.error_string_from_body(attrs)
136
- + raise Errors::OperationFailed, err: err
137
- + end
138
- + end
139
- + end
140
- +
141
- def interfaces
142
- @interfaces ||= (get_api_attribute('interfaces') || []).collect do |iface_attrs|
143
- Interface.new(iface_attrs, self, env)
@@ -1,60 +0,0 @@
1
- # HG changeset patch
2
- # Parent d5f0a5fe77ec4a2935c018a0687deddad1a951c7
3
- diff -r d5f0a5fe77ec -r c9b0b1d64a0a lib/vagrant-skytap/api/client.rb
4
- --- a/lib/vagrant-skytap/api/client.rb Mon Nov 09 19:28:06 2015 -0800
5
- +++ b/lib/vagrant-skytap/api/client.rb Mon Nov 09 19:46:14 2015 -0800
6
- @@ -67,11 +67,7 @@
7
- tries += 1
8
- http.send_request(method, URI.encode(path), body, headers).tap do |ret|
9
- @logger.debug("REST API response: #{ret.body}")
10
- - if ret.code =~ /^2\d\d/
11
- - if options[:raise_on_error_field] && err = error_string_from_body(ret)
12
- - raise Errors::OperationSucceededWithErrors, err: err
13
- - end
14
- - else
15
- + unless ret.code =~ /^2\d\d/
16
- raise Errors::DoesNotExist, object_name: "Object '#{path}'" if ret.code == '404'
17
- error_class = case ret.code
18
- when '403'
19
- diff -r d5f0a5fe77ec -r c9b0b1d64a0a lib/vagrant-skytap/api/resource.rb
20
- --- a/lib/vagrant-skytap/api/resource.rb Mon Nov 09 19:28:06 2015 -0800
21
- +++ b/lib/vagrant-skytap/api/resource.rb Mon Nov 09 19:46:14 2015 -0800
22
- @@ -23,8 +23,8 @@
23
- "/#{self.class.resource_name.downcase}s/#{id}"
24
- end
25
-
26
- - def reload(options={})
27
- - resp = api_client.get(url, options)
28
- + def reload
29
- + resp = api_client.get(url)
30
- refresh(JSON.load(resp.body))
31
- end
32
-
33
- @@ -33,6 +33,14 @@
34
- self
35
- end
36
-
37
- + def error?
38
- + error.present?
39
- + end
40
- +
41
- + def error
42
- + api_client.error_string_from_body(attrs)
43
- + end
44
- +
45
- private
46
-
47
- def api_client
48
- diff -r d5f0a5fe77ec -r c9b0b1d64a0a lib/vagrant-skytap/api/runstate_operations.rb
49
- --- a/lib/vagrant-skytap/api/runstate_operations.rb Mon Nov 09 19:28:06 2015 -0800
50
- +++ b/lib/vagrant-skytap/api/runstate_operations.rb Mon Nov 09 19:46:14 2015 -0800
51
- @@ -43,7 +43,8 @@
52
- end
53
-
54
- def reload_with_error_handling
55
- - reload(raise_on_error_field: true)
56
- + reload
57
- + raise Errors::OperationSucceededWithErrors, err: error if error
58
- end
59
-
60
- def runstate
@@ -1,56 +0,0 @@
1
- # HG changeset patch
2
- # Parent 5e38cb4ec26e32e78ff52c68649daacdcafb0b3d
3
- ENG-10919 handle SIGINT in api_client
4
-
5
- diff -r 5e38cb4ec26e lib/vagrant-skytap/action/initialize_api_client.rb
6
- --- a/lib/vagrant-skytap/action/initialize_api_client.rb Tue Oct 20 12:34:52 2015 -0700
7
- +++ b/lib/vagrant-skytap/action/initialize_api_client.rb Tue Oct 20 12:35:29 2015 -0700
8
- @@ -17,7 +17,7 @@
9
- def call(env)
10
- @logger.info("Connecting to Skytap...")
11
-
12
- - client = API::Client.new(env[:machine].provider_config)
13
- + client = API::Client.new(env[:machine].provider_config, env)
14
- if client.get('/configurations').code == '200'
15
- env[:api_client] = client
16
- end
17
- diff -r 5e38cb4ec26e lib/vagrant-skytap/api/busyable.rb
18
- --- a/lib/vagrant-skytap/api/busyable.rb Tue Oct 20 12:34:52 2015 -0700
19
- +++ b/lib/vagrant-skytap/api/busyable.rb Tue Oct 20 12:35:29 2015 -0700
20
- @@ -19,7 +19,7 @@
21
- begin
22
- Timeout.timeout(timeout) do
23
- loop do
24
- - break if env[:interrupted] # is this right?
25
- + break if env[:interrupted]
26
- begin
27
- yield
28
- rescue Errors::ResourceBusy
29
- diff -r 5e38cb4ec26e lib/vagrant-skytap/api/client.rb
30
- --- a/lib/vagrant-skytap/api/client.rb Tue Oct 20 12:34:52 2015 -0700
31
- +++ b/lib/vagrant-skytap/api/client.rb Tue Oct 20 12:35:29 2015 -0700
32
- @@ -4,13 +4,14 @@
33
- module Skytap
34
- module API
35
- class Client
36
- - attr_reader :config, :http
37
- + attr_reader :config, :http, :env
38
-
39
- MAX_RATE_LIMIT_RETRIES = 3
40
- DEFAULT_RETRY_AFTER_SECONDS = 10
41
-
42
- - def initialize(config)
43
- + def initialize(config, env)
44
- @logger = Log4r::Logger.new("vagrant_skytap::api_client")
45
- + @env = env
46
-
47
- @config = config
48
- uri = URI.parse(config.base_url)
49
- @@ -65,6 +66,7 @@
50
- retry_after = DEFAULT_RETRY_AFTER_SECONDS
51
- begin
52
- tries += 1
53
- + break if env[:interrupted]
54
- http.send_request(method, URI.encode(path), body, headers).tap do |ret|
55
- unless ret.code =~ /^2\d\d/
56
- raise Errors::DoesNotExist, object_name: "Object '#{path}'" if ret.code == '404'
@@ -1,44 +0,0 @@
1
- # HG changeset patch
2
- # Parent 31f40af2f5bd2a0dd1fbb21d3f00e34333866824
3
- ENG-11177 fix 'require's
4
-
5
- diff -r 31f40af2f5bd lib/vagrant-skytap/action/add_vm_to_environment.rb
6
- --- a/lib/vagrant-skytap/action/add_vm_to_environment.rb Tue Oct 20 13:54:33 2015 -0700
7
- +++ b/lib/vagrant-skytap/action/add_vm_to_environment.rb Tue Oct 20 13:56:31 2015 -0700
8
- @@ -1,7 +1,4 @@
9
- require 'log4r'
10
- -require 'json'
11
- -require 'vagrant-skytap/setup_helper'
12
- -
13
-
14
- module VagrantPlugins
15
- module Skytap
16
- diff -r 31f40af2f5bd lib/vagrant-skytap/action/create_environment.rb
17
- --- a/lib/vagrant-skytap/action/create_environment.rb Tue Oct 20 13:54:33 2015 -0700
18
- +++ b/lib/vagrant-skytap/action/create_environment.rb Tue Oct 20 13:56:31 2015 -0700
19
- @@ -1,16 +1,7 @@
20
- require 'log4r'
21
- -require 'json'
22
- -
23
- -require 'vagrant-skytap/setup_helper'
24
- require 'vagrant-skytap/util/timer'
25
- require 'vagrant-skytap/api/environment'
26
-
27
- -require 'net/https'
28
- -require 'uri'
29
- -require 'base64'
30
- -require 'json'
31
- -require 'timeout'
32
- -
33
- module VagrantPlugins
34
- module Skytap
35
- module Action
36
- diff -r 31f40af2f5bd lib/vagrant-skytap/action/delete_environment.rb
37
- --- a/lib/vagrant-skytap/action/delete_environment.rb Tue Oct 20 13:54:33 2015 -0700
38
- +++ b/lib/vagrant-skytap/action/delete_environment.rb Tue Oct 20 13:56:31 2015 -0700
39
- @@ -1,3 +1,5 @@
40
- +require 'log4r'
41
- +
42
- module VagrantPlugins
43
- module Skytap
44
- module Action
@@ -1,4 +0,0 @@
1
- # HG changeset patch
2
- # Parent ba71fe2c4ceae94483de98f66c12c847759ec956
3
- ENG-11442 Vagrant provider: speed up the environment creation by adding multiple VMs before starting them
4
-