diff options
| author | Luke Kanies <luke@madstop.com> | 2007-08-20 22:25:00 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2007-08-20 22:25:00 -0500 |
| commit | 4eb87ed7c8829a6fbc558595be9149e9b3cf5b36 (patch) | |
| tree | 5c8319949022f932eb6467b17b55debaa42fa125 /lib/puppet/network/handler | |
| parent | 2a4e1011dbc244754f434f7eb97f3d41463e5cd4 (diff) | |
| download | puppet-4eb87ed7c8829a6fbc558595be9149e9b3cf5b36.tar.gz puppet-4eb87ed7c8829a6fbc558595be9149e9b3cf5b36.tar.xz puppet-4eb87ed7c8829a6fbc558595be9149e9b3cf5b36.zip | |
A round of bugfixing. Many more tests now pass -- I think we are largely down to tests that (yay!) fail in trunk.
Diffstat (limited to 'lib/puppet/network/handler')
| -rw-r--r-- | lib/puppet/network/handler/configuration.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/network/handler/master.rb | 16 | ||||
| -rw-r--r-- | lib/puppet/network/handler/node.rb | 3 |
3 files changed, 11 insertions, 10 deletions
diff --git a/lib/puppet/network/handler/configuration.rb b/lib/puppet/network/handler/configuration.rb index f1a20ee74..3539ab9a4 100644 --- a/lib/puppet/network/handler/configuration.rb +++ b/lib/puppet/network/handler/configuration.rb @@ -57,7 +57,7 @@ class Puppet::Network::Handler # Return the configuration version. def version(client = nil, clientip = nil) - v = interpreter.configuration_version + v = interpreter.parsedate # If we can find the node, then store the fact that the node # has checked in. if client and node = node_handler.details(client) diff --git a/lib/puppet/network/handler/master.rb b/lib/puppet/network/handler/master.rb index 0aa50a426..acc6c4cda 100644 --- a/lib/puppet/network/handler/master.rb +++ b/lib/puppet/network/handler/master.rb @@ -13,7 +13,7 @@ class Puppet::Network::Handler include Puppet::Util - attr_accessor :ast, :local + attr_accessor :ast attr_reader :ca @interface = XMLRPC::Service::Interface.new("puppetmaster") { |iface| @@ -23,7 +23,7 @@ class Puppet::Network::Handler # Tell a client whether there's a fresh config for it def freshness(client = nil, clientip = nil) - config_handler.version(client) + config_handler.version(client, clientip) end def initialize(hash = {}) @@ -42,7 +42,7 @@ class Puppet::Network::Handler @local = false end - args[:Local] = @local + args[:Local] = local? if hash.include?(:CA) and hash[:CA] @ca = Puppet::SSLCertificates::CA.new() @@ -79,12 +79,10 @@ class Puppet::Network::Handler return config_handler.configuration(client) end - def local? - if defined? @local and @local - return true - else - return false - end + def local=(val) + @local = val + config_handler.local = val + fact_handler.local = val end private diff --git a/lib/puppet/network/handler/node.rb b/lib/puppet/network/handler/node.rb index 0d685b1f1..a21d571b0 100644 --- a/lib/puppet/network/handler/node.rb +++ b/lib/puppet/network/handler/node.rb @@ -15,6 +15,9 @@ class Puppet::Network::Handler::Node < Puppet::Network::Handler def initialize(name, options = {}) @name = name + # Provide a default value. + @names = [name] + if classes = options[:classes] if classes.is_a?(String) @classes = [classes] |
