summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network/handler/configuration.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-08-23 13:25:40 -0500
committerLuke Kanies <luke@madstop.com>2007-08-23 13:25:40 -0500
commit724fef1269bd593496bca9827a0ad7d9361e92d4 (patch)
tree8b8fb73ee625680bcbc3913e2ee007c8b344f44f /lib/puppet/network/handler/configuration.rb
parent3d68ed66ca7545c26b83a4c921d21f5aad710ee0 (diff)
downloadpuppet-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/handler/configuration.rb')
-rw-r--r--lib/puppet/network/handler/configuration.rb18
1 files changed, 11 insertions, 7 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