class LogStash::Outputs::Application_insights::Test_storage
Public Class Methods
new( storage_account_name )
click to toggle source
Calls superclass method
LogStash::Outputs::Application_insights::Blob::new
# File lib/logstash/outputs/application_insights/test_storage.rb, line 25 def initialize ( storage_account_name ) # super first parameter must be nil. blob first parameter is channel, otherwise it will pass storage_account_name as channel super( nil ) @storage_account_name = storage_account_name @test_storage_container = @configuration[:test_storage_container] @test_storage_table = @configuration[:test_storage_table] @action = :test_storage @base_info = "#{@action} #{@storage_account_name}" @recoverable = [ :invalid_storage_key, :container_exist, :create_container, :table_exist, :create_table ] @force_client = true # to enable get a client even if all storage_accounts marked dead end
Public Instance Methods
test()
click to toggle source
# File lib/logstash/outputs/application_insights/test_storage.rb, line 37 def test test_container end
test_container()
click to toggle source
# File lib/logstash/outputs/application_insights/test_storage.rb, line 41 def test_container @max_tries = 1 @info = "#{@base_info} - create #{@test_storage_container} container" storage_io_block { if @recovery.nil? || :invalid_storage_key == @recovery @client.blobClient.create_container( @test_storage_container ) unless @configuration[:disable_blob_upload] end } end
test_table()
click to toggle source
# File lib/logstash/outputs/application_insights/test_storage.rb, line 51 def test_table @max_tries = 1 @info = "#{@base_info} - create #{@test_storage_table} table" storage_io_block { if @recovery.nil? || :invalid_storage_key == @recovery @client.tableClient.create_table( @test_storage_table ) unless @configuration[:disable_blob_upload] end } end