lib/testlab/provisioners/chef/ruby_gem_client.rb in testlab-0.9.1 vs lib/testlab/provisioners/chef/ruby_gem_client.rb in testlab-1.0.0
- old
+ new
@@ -25,19 +25,19 @@
@config[:chef][:client][:attributes] ||= Hash.new
@ui.logger.debug { "config(#{@config.inspect})" }
end
- # RubyGemClient Provisioner Container Setup
+ # RubyGemClient: Container Provision
#
# Renders the defined script to a temporary file on the target container
# and proceeds to execute said script as root via *lxc-attach*.
#
# @param [TestLab::Container] container The container which we want to
# provision.
# @return [Boolean] True if successful.
- def on_container_setup(container)
+ def on_container_provision(container)
@config[:chef][:client][:node_name] ||= container.id
rubygem_client_template = File.join(TestLab::Provisioner::Chef.template_dir, 'ruby_gem_client.erb')
config = {}.merge!({
@@ -53,13 +53,13 @@
container.bootstrap(ZTK::Template.render(rubygem_client_template, config))
true
end
- # RubyGemClient Provisioner Container Teardown
+ # RubyGemClient: Container Deprovision
#
# @return [Boolean] True if successful.
- def on_container_teardown(container)
+ def on_container_deprovision(container)
if @chef_server.state == :running
@chef_server.ssh.exec(%(knife node delete #{container.id} --yes), :ignore_exit_status => true)
@chef_server.ssh.exec(%(knife client delete #{container.id} --yes), :ignore_exit_status => true)
end