Class: Mccloud::Provider::Aws::Ip

Inherits:
Core::Ip
  • Object
show all
Includes:
IpCommand
Defined in:
lib/mccloud/provider/aws/ip.rb

Instance Attribute Summary collapse

Attributes inherited from Core::Ip

#auto_selection, #env, #name, #provider

Instance Method Summary collapse

Methods included from IpCommand

#associate

Methods inherited from Core::Ip

#auto_selected?

Constructor Details

#initialize(env) ⇒ Ip

Returns a new instance of Ip.



16
17
18
# File 'lib/mccloud/provider/aws/ip.rb', line 16

def initialize(env)
  super(env)
end

Instance Attribute Details

#addressObject

Returns the value of attribute address.



12
13
14
# File 'lib/mccloud/provider/aws/ip.rb', line 12

def address
  @address
end

#vmnameObject

Inherits :name

:provider


11
12
13
# File 'lib/mccloud/provider/aws/ip.rb', line 11

def vmname
  @vmname
end

Instance Method Details

#rawObject



20
21
22
23
24
25
26
27
# File 'lib/mccloud/provider/aws/ip.rb', line 20

def raw
  if @raw.nil?
    rawname="#{@provider.filter}#{@name}"
    @raw=@provider.raw.addresses.all('public-ip' => self.address).first
    env.logger.info("IP found #{@raw.server_id} #{@raw.public_ip}")
  end
  return @raw
end