diff options
| author | Luke Kanies <luke@madstop.com> | 2009-03-19 23:58:19 -0500 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2009-03-20 18:27:08 +1100 |
| commit | 0179e945a7d402c90a333c8207243882af362e06 (patch) | |
| tree | e977d49f50c7907a67799bd8d445f833f9c823ee /lib/puppet/application | |
| parent | a497263d97229489dcc4341cc98ca3c75f116374 (diff) | |
| download | puppet-0179e945a7d402c90a333c8207243882af362e06.tar.gz puppet-0179e945a7d402c90a333c8207243882af362e06.tar.xz puppet-0179e945a7d402c90a333c8207243882af362e06.zip | |
Fixing #1557 - Environments are now in REST URIs
This commit includes multiple, related changes, all
in one commit because the whole thing was necessary to
reach a functional tree again:
* The URI starts with the environment, so:
/production/certificate/foo
/development/file_content/path/to/your/file
* All REST handling is done by a single instance mounted
at / for webrick and Mongrel, rather than having individual
instances mounted at, say, /certificate.
* All REST URI translation is done by an API module. Currently
only the 'v1' module exists with no support for additional modules,
but it's well-separated and will be easy to expand as we need it.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/application')
| -rw-r--r-- | lib/puppet/application/puppetd.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/application/puppetmasterd.rb | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/lib/puppet/application/puppetd.rb b/lib/puppet/application/puppetd.rb index 3efb0ef0a..cacb84361 100644 --- a/lib/puppet/application/puppetd.rb +++ b/lib/puppet/application/puppetd.rb @@ -177,7 +177,7 @@ Puppet::Application.new(:puppetd) do require 'puppet/network/server' # No REST handlers yet. - server = Puppet::Network::Server.new(:handlers => [:facts], :xmlrpc_handlers => handlers, :port => Puppet[:puppetport]) + server = Puppet::Network::Server.new(:xmlrpc_handlers => handlers, :port => Puppet[:puppetport]) @daemon.server = server end diff --git a/lib/puppet/application/puppetmasterd.rb b/lib/puppet/application/puppetmasterd.rb index 15426ad96..fe92bca7a 100644 --- a/lib/puppet/application/puppetmasterd.rb +++ b/lib/puppet/application/puppetmasterd.rb @@ -55,14 +55,11 @@ Puppet::Application.new(:puppetmasterd) do xmlrpc_handlers = [:Status, :FileServer, :Master, :Report, :Filebucket] - # Just set up serving to all of the indirected classes. - rest_handlers = Puppet::Indirector::Indirection.instances - if Puppet[:ca] xmlrpc_handlers << :CA end - @daemon.server = Puppet::Network::Server.new(:handlers => rest_handlers, :xmlrpc_handlers => xmlrpc_handlers) + @daemon.server = Puppet::Network::Server.new(:xmlrpc_handlers => xmlrpc_handlers) # Make sure we've got a localhost ssl cert Puppet::SSL::Host.localhost |
