Class: Knife::Clc::Bootstrap::Bootstrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/knife-clc/bootstrap/bootstrapper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Bootstrapper

Returns a new instance of Bootstrapper.



16
17
18
19
20
# File 'lib/knife-clc/bootstrap/bootstrapper.rb', line 16

def initialize(params)
  @cloud_adapter = params.fetch(:cloud_adapter)
  @config = params.fetch(:config)
  @errors = params.fetch(:errors)
end

Instance Attribute Details

#cloud_adapterObject (readonly)

Returns the value of attribute cloud_adapter.



14
15
16
# File 'lib/knife-clc/bootstrap/bootstrapper.rb', line 14

def cloud_adapter
  @cloud_adapter
end

#configObject (readonly)

Returns the value of attribute config.



14
15
16
# File 'lib/knife-clc/bootstrap/bootstrapper.rb', line 14

def config
  @config
end

#errorsObject (readonly)

Returns the value of attribute errors.



14
15
16
# File 'lib/knife-clc/bootstrap/bootstrapper.rb', line 14

def errors
  @errors
end

Instance Method Details

#async_bootstrap(launch_parameters) ⇒ Object



26
27
28
# File 'lib/knife-clc/bootstrap/bootstrapper.rb', line 26

def async_bootstrap(launch_parameters)
  async_bootstrap_method.execute(launch_parameters)
end

#prepareObject



30
31
32
# File 'lib/knife-clc/bootstrap/bootstrapper.rb', line 30

def prepare
  validator.validate
end

#sync_bootstrap(server) ⇒ Object



22
23
24
# File 'lib/knife-clc/bootstrap/bootstrapper.rb', line 22

def sync_bootstrap(server)
  sync_bootstrap_method.execute(server)
end