summaryrefslogtreecommitdiffstats
path: root/lib/puppet/application
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2010-03-15 14:16:09 -0700
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commite5a78009f6bd593e7e3957f0dadb470e623396dd (patch)
treef1d386962e4a7ef5b4e20347653e570dccd141bf /lib/puppet/application
parentf838389da0530201849958444dbbe60977935ad0 (diff)
downloadpuppet-e5a78009f6bd593e7e3957f0dadb470e623396dd.tar.gz
puppet-e5a78009f6bd593e7e3957f0dadb470e623396dd.tar.xz
puppet-e5a78009f6bd593e7e3957f0dadb470e623396dd.zip
Feature #3347 REST-ified FileBucket
FileBucket Files have been reimplemented as an indirector terminus so that they can be transmitted over REST. The old Network::Client.dipper has been replaced with a compatibility later in FileBucket::Dipper that uses the indirector to access filebucket termini. Slightly revised patch: * No longer allows nil contents in FileBucket outside of initialization * Uses File.exist? instead of the deprecated File.exists? * Tweaks JSON serialization and de-serialization to include "path" Deferred issues: * Feature #3371 "FileBucket should not keep files in memory". * Feature #3372 "Replace FileBucket Dipper with more idiomatic calls"
Diffstat (limited to 'lib/puppet/application')
-rw-r--r--lib/puppet/application/filebucket.rb9
-rw-r--r--lib/puppet/application/server.rb1
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/puppet/application/filebucket.rb b/lib/puppet/application/filebucket.rb
index 0723054df..09aaf2b5d 100644
--- a/lib/puppet/application/filebucket.rb
+++ b/lib/puppet/application/filebucket.rb
@@ -1,6 +1,6 @@
require 'puppet'
require 'puppet/application'
-require 'puppet/network/client'
+require 'puppet/file_bucket/dipper'
Puppet::Application.new(:filebucket) do
@@ -70,10 +70,10 @@ Puppet::Application.new(:filebucket) do
begin
if options[:local] or options[:bucket]
path = options[:bucket] || Puppet[:bucketdir]
- @client = Puppet::Network::Client.dipper.new(:Path => path)
+ @client = Puppet::FileBucket::Dipper.new(:Path => path)
else
require 'puppet/network/handler'
- @client = Puppet::Network::Client.dipper.new(:Server => Puppet[:server])
+ @client = Puppet::FileBucket::Dipper.new(:Server => Puppet[:server])
end
rescue => detail
$stderr.puts detail
@@ -84,4 +84,5 @@ Puppet::Application.new(:filebucket) do
end
end
-end \ No newline at end of file
+end
+
diff --git a/lib/puppet/application/server.rb b/lib/puppet/application/server.rb
index afdad54fb..7aeb6ad5d 100644
--- a/lib/puppet/application/server.rb
+++ b/lib/puppet/application/server.rb
@@ -81,7 +81,6 @@ Puppet::Application.new(:server) do
require 'etc'
require 'puppet/file_serving/content'
require 'puppet/file_serving/metadata'
- require 'puppet/checksum'
xmlrpc_handlers = [:Status, :FileServer, :Master, :Report, :Filebucket]