Skip to content

Commit

Permalink
Merge pull request #19411 from AlexanderZagaynov/aws_sdk_v3
Browse files Browse the repository at this point in the history
require specific aws gems
  • Loading branch information
agrare authored Oct 21, 2019
2 parents 1b1c7af + 325d868 commit 5819fce
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/models/file_depot_s3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ def self.validate_settings(settings)
end

def connect(options = {})
require 'aws-sdk'
require 'aws-sdk-s3'

username = options[:username] || authentication_userid(options[:auth_type])
password = options[:password] || authentication_password(options[:auth_type])
# Note: The hard-coded aws_region will be removed after manageiq-ui-class implements region selection
Expand Down Expand Up @@ -62,7 +63,8 @@ def connection_rescue_block
end

def translate_exception(err)
require 'aws-sdk'
require 'aws-sdk-ec2'

case err
when Aws::EC2::Errors::SignatureDoesNotMatch
MiqException::MiqHostError.new("SignatureMismatch - check your AWS Secret Access Key and signing method")
Expand Down

0 comments on commit 5819fce

Please sign in to comment.