eipmap 0.1.4.beta → 0.1.4.beta2

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
  SHA1:
3
- metadata.gz: cea6021c131545716978bc6cb9027ae71f6d6368
4
- data.tar.gz: c19aace9cd3b41f0738d22494c03a070b9d7e7bd
3
+ metadata.gz: 2f50b37d4c7ccefce2ddc3b752af1b0227dd420d
4
+ data.tar.gz: 9e767e150ac68eee0c77bf09f2691c6a6b434be1
5
5
  SHA512:
6
- metadata.gz: 3e085507aa4dd468226771bdcfc86531e01caf8bb1a4eafc18dc52926c92beb680d4dc9fe5e861c3e06a5f84c4cd953051b92186e75327c349a2180ded524804
7
- data.tar.gz: 15bb105c46fd6294da578e73a20e90d6b001e2ae08c47388f4f1a37bf0efa173d8fd9be3a938d00fc0eed67232308f0c9e8c4e4b321a77be17ad3288344775eb
6
+ metadata.gz: 770a11e025023fe0fcf3fd2c5863a8848c4c38edac078baf2599dd444e7796eeb32fb1ccf079af093ebe4bc5d233650879340333d8c898f945a384c88121972b
7
+ data.tar.gz: 77ae7466794ee92f20865c84859d4c40935fba13ae7485ac759449b66ab49ef1c3335d0677b3d2a10a479292700c3660192df6e28e4760d368f9edfc9b8439ba
data/lib/eipmap/driver.rb CHANGED
@@ -52,7 +52,17 @@ class Eipmap::Driver
52
52
  log_info[:instance_id] = instance_id
53
53
  end
54
54
 
55
- log(:info, "#{domain} > #{ip}: Associate to #{log_info.inspect}", :color => :green)
55
+ msg = "#{domain} > #{ip}: Associate"
56
+
57
+ if instance_id = actual_attrs[:instance_id]
58
+ instance_names = describe_instance_names([instance_id])
59
+ instance_name = instance_names.fetch(instance_id, instance_id)
60
+ msg << " from #{instance_name}"
61
+ end
62
+
63
+ msg << " to #{log_info.inspect}"
64
+
65
+ log(:info, msg, :color => :green)
56
66
 
57
67
  unless_dry_run do
58
68
  @ec2.associate_address(params)
@@ -68,7 +78,16 @@ class Eipmap::Driver
68
78
  params[:public_ip] = ip
69
79
  end
70
80
 
71
- log(:info, "#{domain} > #{ip}: Dissociate", :color => :red)
81
+ msg = "#{domain} > #{ip}: Dissociate"
82
+
83
+
84
+ if instance_id = actual_attrs[:instance_id]
85
+ instance_names = describe_instance_names([instance_id])
86
+ instance_name = instance_names.fetch(instance_id, instance_id)
87
+ msg << " from #{instance_name}"
88
+ end
89
+
90
+ log(:info, msg, :color => :red)
72
91
 
73
92
  unless_dry_run do
74
93
  @ec2.disassociate_address(params)
@@ -1,3 +1,3 @@
1
1
  module Eipmap
2
- VERSION = '0.1.4.beta'
2
+ VERSION = '0.1.4.beta2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eipmap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4.beta
4
+ version: 0.1.4.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara