summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network/handler
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-10-08 19:12:39 -0500
committerLuke Kanies <luke@madstop.com>2007-10-08 19:12:39 -0500
commitd24c1ccc56b912e0ff69f7572dd36912c8c739c2 (patch)
treef86a02ae5845f1b7cb8327247356268a70e0948e /lib/puppet/network/handler
parentfc9c850414baff17dc97b0184f34e58b4bec5785 (diff)
downloadpuppet-d24c1ccc56b912e0ff69f7572dd36912c8c739c2.tar.gz
puppet-d24c1ccc56b912e0ff69f7572dd36912c8c739c2.tar.xz
puppet-d24c1ccc56b912e0ff69f7572dd36912c8c739c2.zip
All tests should now pass again.
This is the first real pass towards using caching. The `puppet` executable actually uses the indirection work, instead of handlers and such (and man! is it cleaner). Most of this work was a result of trying to get the client-side story working, with correct yaml caching of configurations, which means this commit also covers converting configurations to yaml, which was a much bigger PITA than it needed to be. I still need to write integration tests, and I also need to cover the server-side story of a normal configuration retrieval.
Diffstat (limited to 'lib/puppet/network/handler')
-rw-r--r--lib/puppet/network/handler/configuration.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/puppet/network/handler/configuration.rb b/lib/puppet/network/handler/configuration.rb
index 09c4b971a..680304e2a 100644
--- a/lib/puppet/network/handler/configuration.rb
+++ b/lib/puppet/network/handler/configuration.rb
@@ -13,7 +13,7 @@ class Puppet::Network::Handler
include Puppet::Util
- attr_accessor :local
+ attr_accessor :local, :classes
@interface = XMLRPC::Service::Interface.new("configuration") { |iface|
iface.add_method("string configuration(string)")
@@ -43,16 +43,10 @@ class Puppet::Network::Handler
end
def initialize(options = {})
- if options[:Local]
- @local = options[:Local]
- else
- @local = false
- end
-
options.each do |param, value|
case param
when :Classes: @classes = value
- when :Local: self.local = true
+ when :Local: self.local = value
else
raise ArgumentError, "Configuration handler does not accept %s" % param
end