lib/chef/provisioning/chef_image_spec.rb in chef-provisioning-0.17 vs lib/chef/provisioning/chef_image_spec.rb in chef-provisioning-0.18

- old
+ new

@@ -13,11 +13,11 @@ super(node) @chef_server = chef_server end # - # Get a ImageSpec from the chef server. If the node does not exist on the + # Get a ImageSpec from the chef server. If the image does not exist on the # server, it returns nil. # def self.get(name, chef_server = Cheffish.default_chef_server) chef_api = Cheffish.chef_server_api(chef_server) begin @@ -49,16 +49,16 @@ def self.id_from(chef_server, name) "#{chef_server[:chef_server_url]}/data/images/#{name}" end # - # Save this node to the server. If you have significant information that + # Save this image to the server. If you have significant information that # could be lost, you should do this as quickly as possible. Data will be # saved automatically for you after allocate_image and ready_image. # def save(action_handler) - # Save the node to the server. + # Save the image to the server. _self = self _chef_server = _self.chef_server Chef::Provisioning.inline_resource(action_handler) do # Create the data bag if needed chef_data_bag 'images' @@ -70,17 +70,17 @@ end end end def delete(action_handler) - # Save the node to the server. + # Delete the image from the server. _self = self _chef_server = _self.chef_server Chef::Provisioning.inline_resource(action_handler) do chef_data_bag_item _self.name do data_bag 'images' chef_server _chef_server - action :destroy + action :delete end end end protected