Skip to content

Commit

Permalink
Merge pull request #147 from bdunne/miq_apache_cleanup
Browse files Browse the repository at this point in the history
bybusiness is the only load balancing method used
  • Loading branch information
jrafanie authored May 1, 2017
2 parents 0609f72 + cce50f3 commit 6406841
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
8 changes: 1 addition & 7 deletions lib/gems/pending/util/miq_apache/miq_apache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,7 @@ def self.install_default_config(opts = {})
end

def self.create_balancer_config(opts = {})
lbmethod = case opts[:lbmethod]
when :busy then :bybusyness
when :traffic then :bytraffic
else :byrequests
end

"<Proxy balancer://#{opts[:cluster]}/ lbmethod=#{lbmethod}>\n</Proxy>\n"
"<Proxy balancer://#{opts[:cluster]}/ lbmethod=bybusyness>\n</Proxy>\n"
end

def self.create_redirects_config(opts = {})
Expand Down
14 changes: 0 additions & 14 deletions spec/util/miq_apache/conf_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,6 @@
end

context "building balancer config" do
context "lbmethod" do
it "should return a config with lbmethod of 'byrequests' by default" do
expect(MiqApache::Conf.create_balancer_config).to include("lbmethod=byrequests")
end

it "should return a config with lbmethod of 'bytraffic' if passed :traffic" do
expect(MiqApache::Conf.create_balancer_config(:lbmethod => :traffic)).to include("lbmethod=bytraffic")
end

it "should return a config with lbmethod of 'bybusyness' if passed :busy" do
expect(MiqApache::Conf.create_balancer_config(:lbmethod => :busy)).to include("lbmethod=bybusyness")
end
end

it "should set cluster name" do
expect(MiqApache::Conf.create_balancer_config(:cluster => 'evmcluster_ui')).to include("Proxy balancer://evmcluster_ui/")
end
Expand Down

0 comments on commit 6406841

Please sign in to comment.