Class | Chef::Checksum |
In: |
lib/chef/checksum.rb
lib/chef/checksum/storage/filesystem.rb |
Parent: | Object |
Checksum for an individual file; e.g., used for sandbox/cookbook uploading to track which files the system already manages.
DESIGN_DOCUMENT | = | { "version" => 1, "language" => "javascript", "views" => { "all" => { "map" => <<-EOJS function(doc) { if (doc.chef_type == "checksum") { emit(doc.checksum, doc); } } EOJS |
checksum | [RW] | |
couchdb_id | [RW] | |
couchdb_rev | [RW] | |
create_time | [RW] | |
original_committed_file_location | [R] | When a Checksum commits a sandboxed file to its final home in the checksum repo, this attribute will have the original on-disk path where the file was stored; it will be used if the commit is reverted to restore the sandbox to the pre-commit state. |
storage | [R] |
Creates a new Chef::Checksum object.
checksum:: | the MD5 content hash of the file |
couchdb:: | An instance of Chef::CouchDB |
object<Chef::Checksum>: | Duh. :) |
Moves the given sandbox_file into the checksum repo using the path given by file_location and saves the Checksum to the database
Moves the checksum file back to its pre-commit location and deletes the checksum object from the database, effectively undoing commit_sandbox_file. Raises Chef::Exceptions::IllegalChecksumRevert if the original file location is unknown, which is will be the case if commit_sandbox_file was not previously called