Class: Bosh::Director::CompiledPackage::CompiledPackage
- Defined in:
- lib/bosh/director/compiled_package/compiled_package.rb
Instance Attribute Summary collapse
-
#blob_path ⇒ Object
readonly
Returns the value of attribute blob_path.
-
#blobstore_id ⇒ Object
readonly
Returns the value of attribute blobstore_id.
-
#package_fingerprint ⇒ Object
readonly
Returns the value of attribute package_fingerprint.
-
#package_name ⇒ Object
readonly
Returns the value of attribute package_name.
-
#sha1 ⇒ Object
readonly
Returns the value of attribute sha1.
-
#stemcell_sha1 ⇒ Object
readonly
Returns the value of attribute stemcell_sha1.
Instance Method Summary collapse
- #check_blob_sha ⇒ Object
-
#initialize(options = {}) ⇒ CompiledPackage
constructor
A new instance of CompiledPackage.
Constructor Details
#initialize(options = {}) ⇒ CompiledPackage
Returns a new instance of CompiledPackage.
11 12 13 14 15 16 17 18 |
# File 'lib/bosh/director/compiled_package/compiled_package.rb', line 11 def initialize( = {}) @package_name = .fetch(:package_name) @package_fingerprint = .fetch(:package_fingerprint) @sha1 = .fetch(:sha1) @stemcell_sha1 = .fetch(:stemcell_sha1) @blobstore_id = .fetch(:blobstore_id) @blob_path = .fetch(:blob_path) end |
Instance Attribute Details
#blob_path ⇒ Object (readonly)
Returns the value of attribute blob_path.
9 10 11 |
# File 'lib/bosh/director/compiled_package/compiled_package.rb', line 9 def blob_path @blob_path end |
#blobstore_id ⇒ Object (readonly)
Returns the value of attribute blobstore_id.
9 10 11 |
# File 'lib/bosh/director/compiled_package/compiled_package.rb', line 9 def blobstore_id @blobstore_id end |
#package_fingerprint ⇒ Object (readonly)
Returns the value of attribute package_fingerprint.
9 10 11 |
# File 'lib/bosh/director/compiled_package/compiled_package.rb', line 9 def package_fingerprint @package_fingerprint end |
#package_name ⇒ Object (readonly)
Returns the value of attribute package_name.
9 10 11 |
# File 'lib/bosh/director/compiled_package/compiled_package.rb', line 9 def package_name @package_name end |
#sha1 ⇒ Object (readonly)
Returns the value of attribute sha1.
9 10 11 |
# File 'lib/bosh/director/compiled_package/compiled_package.rb', line 9 def sha1 @sha1 end |
#stemcell_sha1 ⇒ Object (readonly)
Returns the value of attribute stemcell_sha1.
9 10 11 |
# File 'lib/bosh/director/compiled_package/compiled_package.rb', line 9 def stemcell_sha1 @stemcell_sha1 end |
Instance Method Details
#check_blob_sha ⇒ Object
20 21 22 23 24 |
# File 'lib/bosh/director/compiled_package/compiled_package.rb', line 20 def check_blob_sha if sha1 != actual_sha raise BlobShaMismatchError, "Blob SHA mismatch in file #{blob_path}: expected: #{sha1}, got #{actual_sha}" end end |