diff options
| author | Luke Kanies <luke@madstop.com> | 2007-08-23 13:25:40 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2007-08-23 13:25:40 -0500 |
| commit | 724fef1269bd593496bca9827a0ad7d9361e92d4 (patch) | |
| tree | 8b8fb73ee625680bcbc3913e2ee007c8b344f44f /lib/puppet/network | |
| parent | 3d68ed66ca7545c26b83a4c921d21f5aad710ee0 (diff) | |
| download | puppet-724fef1269bd593496bca9827a0ad7d9361e92d4.tar.gz puppet-724fef1269bd593496bca9827a0ad7d9361e92d4.tar.xz puppet-724fef1269bd593496bca9827a0ad7d9361e92d4.zip | |
Everything up to the parser (and the Modules) is ready to support multiple environments, including the parser having an environment setting. I have also created my first spec-based tests, for the interpreter (and deleted the old test/unit tests).
Diffstat (limited to 'lib/puppet/network')
| -rw-r--r-- | lib/puppet/network/handler/configuration.rb | 18 | ||||
| -rw-r--r-- | lib/puppet/network/handler/master.rb | 4 |
2 files changed, 13 insertions, 9 deletions
diff --git a/lib/puppet/network/handler/configuration.rb b/lib/puppet/network/handler/configuration.rb index 7e91d74d6..a1b22207e 100644 --- a/lib/puppet/network/handler/configuration.rb +++ b/lib/puppet/network/handler/configuration.rb @@ -57,14 +57,18 @@ class Puppet::Network::Handler # Return the configuration version. def version(client = nil, clientip = nil) - 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) - update_node_check(node) + if client + if node = node_handler.details(client) + update_node_check(node) + return interpreter.configuration_version(node) + else + raise Puppet::Error, "Could not find node '%s'" % client + end + else + # Just return something that will always result in a recompile, because + # this is local. + return 0 end - - return v end private diff --git a/lib/puppet/network/handler/master.rb b/lib/puppet/network/handler/master.rb index acc6c4cda..0cab94f69 100644 --- a/lib/puppet/network/handler/master.rb +++ b/lib/puppet/network/handler/master.rb @@ -32,8 +32,8 @@ class Puppet::Network::Handler # Allow specification of a code snippet or of a file if code = hash[:Code] args[:Code] = code - else - args[:Manifest] = hash[:Manifest] || Puppet[:manifest] + elsif man = hash[:Manifest] + args[:Manifest] = man end if hash[:Local] |
