Skip to content

Commit

Permalink
Review Comments
Browse files Browse the repository at this point in the history
Rework query string processing as per review comments.
Remove $fog_log reference.
  • Loading branch information
jerryk55 committed Sep 20, 2018
1 parent 120c914 commit 0f578f8
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions lib/gems/pending/util/mount/miq_swift_session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ def swift
extra_options[:service] = "Compute"

@osh ||= OpenstackHandle::Handle.new(@username, @password, @host, @port, @api_version, @security_protocol, extra_options)
@osh.connection_options = {:instrumentor => $fog_log}
begin
@swift ||= @osh.swift_service
rescue Excon::Errors::Unauthorized => err
Expand All @@ -104,18 +103,8 @@ def swift
end

def query_params(query_string)
query_string.split('&').each do |query|
query_parts = query.split('=')
case query_parts[0]
when 'region'
@region = query_parts[1]
when 'api_version'
@api_version = query_parts[1]
when 'domain_id'
@domain_id = query_parts[1]
when 'security_protocol'
@security_protocol = query_parts[1]
end
end

parts = URI.decode_www_form(query_string).to_h
@region, @api_version, @domain_id, @security_protocol = parts.values_at("region", "api_version", "domain_id", "security_protocol")
end
end

0 comments on commit 0f578f8

Please sign in to comment.