the indirector will not serve xmlrpc (this is the responsibility of the legacy networking code; it was a mistake to include stubbed support for it in the new code); removing
This commit is contained in:
Родитель
13c40e93a5
Коммит
c2f8c69af3
|
@ -1,7 +1,6 @@
|
|||
require 'mongrel' if Puppet.features.mongrel?
|
||||
|
||||
require 'puppet/network/http/mongrel/rest'
|
||||
require 'puppet/network/http/mongrel/xmlrpc'
|
||||
|
||||
class Puppet::Network::HTTP::Mongrel
|
||||
def initialize(args = {})
|
||||
|
@ -47,7 +46,6 @@ class Puppet::Network::HTTP::Mongrel
|
|||
|
||||
def class_for_protocol(protocol)
|
||||
return Puppet::Network::HTTP::MongrelREST if protocol.to_sym == :rest
|
||||
return Puppet::Network::HTTP::MongrelXMLRPC if protocol.to_sym == :xmlrpc
|
||||
raise ArgumentError, "Unknown protocol [#{protocol}]."
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
class Puppet::Network::HTTP::MongrelXMLRPC
|
||||
def initialize(args = {})
|
||||
end
|
||||
end
|
|
@ -1,7 +1,6 @@
|
|||
require 'webrick'
|
||||
require 'webrick/https'
|
||||
require 'puppet/network/http/webrick/rest'
|
||||
require 'puppet/network/http/webrick/xmlrpc'
|
||||
|
||||
class Puppet::Network::HTTP::WEBrick
|
||||
def initialize(args = {})
|
||||
|
@ -45,7 +44,6 @@ class Puppet::Network::HTTP::WEBrick
|
|||
|
||||
def class_for_protocol(protocol)
|
||||
return Puppet::Network::HTTP::WEBrickREST if protocol.to_sym == :rest
|
||||
return Puppet::Network::HTTP::WEBrickXMLRPC if protocol.to_sym == :xmlrpc
|
||||
raise ArgumentError, "Unknown protocol [#{protocol}]."
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
class Puppet::Network::HTTP::WEBrickXMLRPC
|
||||
def initialize(args = {})
|
||||
end
|
||||
end
|
|
@ -1,3 +1,5 @@
|
|||
--format
|
||||
s
|
||||
--colour
|
||||
--loadby
|
||||
mtime
|
||||
|
|
|
@ -23,7 +23,7 @@ describe Puppet::Network::HTTP::Mongrel, "when turning on listening" do
|
|||
@mock_mongrel.stubs(:run)
|
||||
@mock_mongrel.stubs(:register)
|
||||
Mongrel::HttpServer.stubs(:new).returns(@mock_mongrel)
|
||||
@listen_params = { :address => "127.0.0.1", :port => 31337, :handlers => [ :node, :catalog ], :protocols => [ :rest, :xmlrpc ] }
|
||||
@listen_params = { :address => "127.0.0.1", :port => 31337, :handlers => [ :node, :catalog ], :protocols => [ :rest ] }
|
||||
end
|
||||
|
||||
it "should fail if already listening" do
|
||||
|
@ -82,11 +82,6 @@ describe Puppet::Network::HTTP::Mongrel, "when turning on listening" do
|
|||
@server.listen(@listen_params.merge(:protocols => [:rest]))
|
||||
end
|
||||
|
||||
it "should use a Mongrel + XMLRPC class to configure Mongrel when XMLRPC services are requested" do
|
||||
Puppet::Network::HTTP::MongrelXMLRPC.expects(:new).at_least_once
|
||||
@server.listen(@listen_params.merge(:protocols => [:xmlrpc]))
|
||||
end
|
||||
|
||||
it "should fail if services from an unknown protocol are requested" do
|
||||
Proc.new { @server.listen(@listen_params.merge(:protocols => [ :foo ]))}.should raise_error(ArgumentError)
|
||||
end
|
||||
|
@ -102,7 +97,7 @@ describe Puppet::Network::HTTP::Mongrel, "when turning off listening" do
|
|||
@mock_mongrel.stubs(:register)
|
||||
Mongrel::HttpServer.stubs(:new).returns(@mock_mongrel)
|
||||
@server = Puppet::Network::HTTP::Mongrel.new
|
||||
@listen_params = { :address => "127.0.0.1", :port => 31337, :handlers => [ :node, :catalog ], :protocols => [ :rest, :xmlrpc ] }
|
||||
@listen_params = { :address => "127.0.0.1", :port => 31337, :handlers => [ :node, :catalog ], :protocols => [ :rest ] }
|
||||
end
|
||||
|
||||
it "should fail unless listening" do
|
||||
|
|
|
@ -18,7 +18,7 @@ describe Puppet::Network::HTTP::WEBrick, "when turning on listening" do
|
|||
[:mount, :start, :shutdown].each {|meth| @mock_webrick.stubs(meth)}
|
||||
WEBrick::HTTPServer.stubs(:new).returns(@mock_webrick)
|
||||
@server = Puppet::Network::HTTP::WEBrick.new
|
||||
@listen_params = { :address => "127.0.0.1", :port => 31337, :handlers => [ :node, :catalog ], :protocols => [ :rest, :xmlrpc ] }
|
||||
@listen_params = { :address => "127.0.0.1", :port => 31337, :handlers => [ :node, :catalog ], :protocols => [ :rest ] }
|
||||
end
|
||||
|
||||
it "should fail if already listening" do
|
||||
|
@ -78,11 +78,6 @@ describe Puppet::Network::HTTP::WEBrick, "when turning on listening" do
|
|||
@server.listen(@listen_params.merge(:protocols => [:rest]))
|
||||
end
|
||||
|
||||
it "should use a WEBrick + XMLRPC class to configure WEBrick when XMLRPC services are requested" do
|
||||
Puppet::Network::HTTP::WEBrickXMLRPC.expects(:new).at_least_once
|
||||
@server.listen(@listen_params.merge(:protocols => [:xmlrpc]))
|
||||
end
|
||||
|
||||
it "should fail if services from an unknown protocol are requested" do
|
||||
Proc.new { @server.listen(@listen_params.merge(:protocols => [ :foo ]))}.should raise_error(ArgumentError)
|
||||
end
|
||||
|
@ -94,7 +89,7 @@ describe Puppet::Network::HTTP::WEBrick, "when turning off listening" do
|
|||
[:mount, :start, :shutdown].each {|meth| @mock_webrick.stubs(meth)}
|
||||
WEBrick::HTTPServer.stubs(:new).returns(@mock_webrick)
|
||||
@server = Puppet::Network::HTTP::WEBrick.new
|
||||
@listen_params = { :address => "127.0.0.1", :port => 31337, :handlers => [ :node, :catalog ], :protocols => [ :rest, :xmlrpc ] }
|
||||
@listen_params = { :address => "127.0.0.1", :port => 31337, :handlers => [ :node, :catalog ], :protocols => [ :rest ] }
|
||||
end
|
||||
|
||||
it "should fail unless listening" do
|
||||
|
|
Загрузка…
Ссылка в новой задаче