Class: VagrantPlugins::Skytap::Connection::PublicIpChoice::PublicIpAttachmentExecution
Direct Known Subclasses
Instance Attribute Summary collapse
-
#ip ⇒ Object
readonly
Returns the value of attribute ip.
Attributes inherited from Execution
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(env, iface, ip) ⇒ PublicIpAttachmentExecution
constructor
A new instance of PublicIpAttachmentExecution.
- #message ⇒ Object
Methods inherited from Execution
Constructor Details
#initialize(env, iface, ip) ⇒ PublicIpAttachmentExecution
Returns a new instance of PublicIpAttachmentExecution.
56 57 58 59 |
# File 'lib/vagrant-skytap/connection/public_ip_choice.rb', line 56 def initialize(env, iface, ip) super @ip = ip end |
Instance Attribute Details
#ip ⇒ Object (readonly)
Returns the value of attribute ip.
46 47 48 |
# File 'lib/vagrant-skytap/connection/public_ip_choice.rb', line 46 def ip @ip end |
Class Method Details
.make(env, iface, ip) ⇒ Object
48 49 50 51 52 53 54 |
# File 'lib/vagrant-skytap/connection/public_ip_choice.rb', line 48 def self.make(env, iface, ip) if ip.attached? UseExecution.new(env, iface, ip) else AttachAndUseExecution.new(env, iface, ip) end end |
Instance Method Details
#message ⇒ Object
61 62 63 64 65 66 67 68 69 |
# File 'lib/vagrant-skytap/connection/public_ip_choice.rb', line 61 def "#{verb}: #{ip.address}".tap do |ret| if ip.deployed? ret << " " << I18n.t("vagrant_skytap.connections.public_ip.deployed") elsif ip.attached? ret << " " << I18n.t("vagrant_skytap.connections.public_ip.attached") end end end |