lib/chef_metal.rb in chef-metal-0.1 vs lib/chef_metal.rb in chef-metal-0.2

- old
+ new

@@ -2,17 +2,10 @@ require 'chef_metal/recipe_dsl' require 'chef/resource/machine' require 'chef/provider/machine' require 'chef/resource/machine_file' require 'chef/provider/machine_file' -require 'chef/resource/vagrant_cluster' -require 'chef/provider/vagrant_cluster' -require 'chef/resource/vagrant_box' -require 'chef/provider/vagrant_box' -require 'chef/resource/fog_key_pair' -require 'chef/provider/fog_key_pair' -require 'chef_metal/provisioner/fog_provisioner' require 'chef_metal/inline_resource' module ChefMetal def self.with_provisioner(provisioner) @@ -35,32 +28,9 @@ yield ensure ChefMetal.enclosing_provisioner_options = old_provisioner_options end end - end - - def self.with_vagrant_cluster(cluster_path, &block) - require 'chef_metal/provisioner/vagrant_provisioner' - - with_provisioner(ChefMetal::Provisioner::VagrantProvisioner.new(cluster_path), &block) - end - - def self.with_vagrant_box(box_name, provisioner_options = nil, &block) - require 'chef/resource/vagrant_box' - - if box_name.is_a?(Chef::Resource::VagrantBox) - provisioner_options ||= box_name.provisioner_options || {} - provisioner_options['vagrant_options'] ||= {} - provisioner_options['vagrant_options']['vm.box'] = box_name.name - provisioner_options['vagrant_options']['vm.box_url'] = box_name.url if box_name.url - else - provisioner_options ||= {} - provisioner_options['vagrant_options'] ||= {} - provisioner_options['vagrant_options']['vm.box'] = box_name - end - - with_provisioner_options(provisioner_options, &block) end def self.inline_resource(provider, &block) InlineResource.new(provider).instance_eval(&block) end