Class: LogStash::Outputs::Application_insights::Validate_storage
- Inherits:
-
Object
- Object
- LogStash::Outputs::Application_insights::Validate_storage
- Defined in:
- lib/logstash/outputs/application_insights/validate_storage.rb
Instance Method Summary collapse
-
#initialize ⇒ Validate_storage
constructor
A new instance of Validate_storage.
- #validate ⇒ Object
Constructor Details
#initialize ⇒ Validate_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
#validate ⇒ Object
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 |storage_account_name, storage_account_keys| test_storage = Test_storage.new( storage_account_name ) result << { :storage_account_name => storage_account_name, :test => "create container", :success => test_storage.test_container, :error => test_storage.last_io_exception } result << { :storage_account_name => storage_account_name, :test => "create table", :success => test_storage.test_table, :error => test_storage.last_io_exception } end result end |