bosh_agent/lib/bosh_agent/remote_exception.rb
def store_blob
      bsc_options  = Bosh::Agent::Config.blobstore_options
      bsc_provider = Bosh::Agent::Config.blobstore_provider

      blobstore = Bosh::Blobstore::Client.create(bsc_provider, bsc_options)

      logger.info("Uploading blob for '#{@message}' to blobstore")

      blobstore_id = nil
      blobstore_id = blobstore.create(@blob)

      blobstore_id
    rescue Bosh::Blobstore::BlobstoreError => e
      logger.warn("unable to upload blob for '#{@message}'")
      "error: unable to upload blob to blobstore: #{e.message}"
    end
# Stores the blob in the configured blobstore
#
# @return [String] blobstore id of the stored object, or an error
# string which can be displayed instead of the blob
Stores the blob in the configured blobstore
Stores the blob in the configured blobstore
def store_blob
      bsc_options  = Bosh::Agent::Config.blobstore_options
      bsc_provider = Bosh::Agent::Config.blobstore_provider
      blobstore = Bosh::Blobstore::Client.create(bsc_provider, bsc_options)
      logger.info("Uploading blob for '#{@message}' to blobstore")
      blobstore_id = nil
      blobstore_id = blobstore.create(@blob)
      blobstore_id
    rescue Bosh::Blobstore::BlobstoreError => e
      logger.warn("unable to upload blob for '#{@message}'")
      "error: unable to upload blob to blobstore: #{e.message}"
    end
def store_blob bsc_options = Bosh :: Agent :: Config . blobstore_options bsc_provider = Bosh :: Agent :: Config . blobstore_provider blobstore = Bosh :: Blobstore :: Client . create ( bsc_provider , bsc_options ) logger . info ( "Uploading blob for '#{@message}' to blobstore" ) blobstore_id = nil blobstore_id = blobstore . create ( @blob ) blobstore_id rescue Bosh :: Blobstore :: BlobstoreError => e logger . warn ( "unable to upload blob for '#{@message}'" ) "error: unable to upload blob to blobstore: #{e.message}" end
Stores the blob in the configured blobstore
Stores the blob in the configured blobstore
blobstore id of the stored object, or an error string which can be displayed instead of the blob
blobstore id of the stored object or an error string which can be displayed instead of the blob
String