vagrant-packet 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d9bb728d50978abf13726fc2b7be25323b6db6203f845c9c6bf05fe11096449
4
- data.tar.gz: aafff717ee24f71f54aff126291e83f072c34c20a38b9f5817b6f53b50347ac1
3
+ metadata.gz: 215466bb44bc21972757b4a477870d4cfcd06f36050f9b2fab97145fd929f508
4
+ data.tar.gz: 2828be49bd71c3125528a7112e6f8018a5a6a9b2e58751a4f344165aad0ece2c
5
5
  SHA512:
6
- metadata.gz: 4f060b93f0dc4ac024fe3239f5ca593a8494fd0f7550f2310a22094e7c71e487b0027ad4a7d13563581b631c0d0e2e646718db62c0df7f186992a766881cdb2b
7
- data.tar.gz: 49e4e69c8bbae478676aa8fc8bbee9d37a65848e5dbeca96315d47fa5729d419397bb014b976a4196d65c4343f3f75ac2552b627a9de41b0a6b777ccd7231806
6
+ metadata.gz: 5b4aad1cba63a52193490dfc7a75fd167d7d091f0554fc2f1726dea401ebf2d1313c97894b2c711c40cb48bb368f9381e3e8bc2f934d22110aa2e933cbac0c80
7
+ data.tar.gz: 2fbc46596517976adc542aa971c91e5453f4eb906f58f4681be85650f8b66edbfebe74ddf8c8d0b551b0ff2c1ac8fe6d9dd2ce2f73a2802b94177d22f46bbd34
@@ -14,6 +14,10 @@ module VagrantPlugins
14
14
  class RunInstance
15
15
  include Vagrant::Util::Retryable
16
16
 
17
+ FOG_ERRORS = [
18
+ Fog::Errors::Error
19
+ ].freeze
20
+
17
21
  def initialize(app, _env)
18
22
  @app = app
19
23
  @logger = Log4r::Logger.new('vagrant_packet::action::run_instance')
@@ -56,7 +60,7 @@ module VagrantPlugins
56
60
 
57
61
  begin
58
62
  server = env[:packet_compute].devices.create(options)
59
- rescue *FOR_ERRORS => e
63
+ rescue *FOG_ERRORS => e
60
64
  # TODO: Flesh this out, mostly delete everything about the instance
61
65
  raise Errors::FogError, message: e.message
62
66
  end
@@ -18,8 +18,12 @@ module VagrantPlugins
18
18
 
19
19
  # Destroy the server and remove the tracking ID
20
20
  env[:ui].info(I18n.t('vagrant_packet.terminating'))
21
- server.destroy
22
- env[:machine].id = nil
21
+ begin
22
+ server.destroy
23
+ env[:machine].id = nil
24
+ rescue Exception => e
25
+ env[:ui].info(I18n.t('vagrant_packet.terminate_while_provisioning'))
26
+ end
23
27
 
24
28
  @app.call(env)
25
29
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module VagrantPlugins
4
4
  module Packet
5
- VERSION = '0.1.4'
5
+ VERSION = '0.1.5'
6
6
  end
7
7
  end
data/locales/en.yml CHANGED
@@ -22,6 +22,9 @@ en:
22
22
  Stopping the instance...
23
23
  terminating: |-
24
24
  Terminating the instance...
25
+ terminate_while_provisioning: |-
26
+ Cannot destroy a machine while provisioning.
27
+ Wait for provisioning to finish then try again.
25
28
  waiting_for_ready: |-
26
29
  Waiting for instance to become "ready"...
27
30
  waiting_for_ssh: |-
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-packet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeffrey Sica