Class: LogStash::Outputs::Application_insights::Validate_storage

Inherits:
Object
  • Object
show all
Defined in:
lib/logstash/outputs/application_insights/validate_storage.rb

Instance Method Summary collapse

Constructor Details

#initializeValidate_storage

Returns a new instance of Validate_storage.



27
28
29
30
# File 'lib/logstash/outputs/application_insights/validate_storage.rb', line 27

def initialize
  configuration = Config.current
  @storage_account_name_key = configuration[:storage_account_name_key]
end

Instance Method Details

#validateObject



32
33
34
35
36
37
38
39
40
# File 'lib/logstash/outputs/application_insights/validate_storage.rb', line 32

def validate
  result = []
  @storage_account_name_key.each do |, |
    test_storage = Test_storage.new(  )
    result << { :storage_account_name => , :test => "create container", :success => test_storage.test_container, :error => test_storage.last_io_exception }
    result << { :storage_account_name => , :test => "create table", :success => test_storage.test_table, :error => test_storage.last_io_exception }
  end
  result
end