Class: Mccloud::Provider::Aws::Lb

Inherits:
Core::Lb
  • Object
show all
Includes:
LbCommand
Defined in:
lib/mccloud/provider/aws/lb.rb

Instance Attribute Summary collapse

Attributes inherited from Core::Lb

#auto_selection, #env, #name, #provider

Instance Method Summary collapse

Methods included from LbCommand

#associate, #balance, #sorry

Methods inherited from Core::Lb

#auto_selected?

Constructor Details

#initialize(env) ⇒ Lb

Returns a new instance of Lb.



17
18
19
20
21
# File 'lib/mccloud/provider/aws/lb.rb', line 17

def initialize(env)
  members=Array.new
  sorry_members=Array.new
  super(env)
end

Instance Attribute Details

#membersObject

Inherits :name

:provider


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

def members
  @members
end

#sorry_membersObject

Returns the value of attribute sorry_members.



13
14
15
# File 'lib/mccloud/provider/aws/lb.rb', line 13

def sorry_members
  @sorry_members
end

Instance Method Details

#rawObject



23
24
25
26
27
28
29
30
31
32
# File 'lib/mccloud/provider/aws/lb.rb', line 23

def raw
  if @raw.nil?
    rawname="#{@name}"
    #rawname="#{@provider.filter}#{@name}"
    ::Fog.credential=@provider.credential
    @raw=::Fog::AWS::ELB.new({:region => provider.region}.merge(provider.options)).load_balancers.get(@name)
    env.logger.info("LB found #{@raw}")
  end
  return @raw
end