Class: VagrantPlugins::AWS::Action::ElbDeregisterInstance

Inherits:
Object
  • Object
show all
Includes:
ElasticLoadBalancer
Defined in:
lib/vagrant-aws/action/elb_deregister_instance.rb

Overview

This registers instance in ELB

Instance Method Summary collapse

Methods included from ElasticLoadBalancer

#adjust_availability_zones, #deregister_instance, #register_instance

Constructor Details

#initialize(app, env) ⇒ ElbDeregisterInstance

Returns a new instance of ElbDeregisterInstance.



10
11
12
13
# File 'lib/vagrant-aws/action/elb_deregister_instance.rb', line 10

def initialize(app, env)
  @app    = app
  @logger = Log4r::Logger.new("vagrant_aws::action::elb_deregister_instance")
end

Instance Method Details

#call(env) ⇒ Object



15
16
17
18
19
20
# File 'lib/vagrant-aws/action/elb_deregister_instance.rb', line 15

def call(env)
  if elb_name = env[:machine].provider_config.elb
    deregister_instance env, elb_name, env[:machine].id
  end
  @app.call(env)
end