diff options
author | Luke Kanies <luke@madstop.com> | 2007-10-19 17:35:40 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2007-10-19 17:35:40 -0500 |
commit | 08099b7a383987e292357f285e05933e10205660 (patch) | |
tree | c8f08a3afca5c9b45f965c7c8d051023170ea0d5 /lib/puppet/file_serving/configuration | |
parent | ec396729d76b26d0d08c0bd633f28fa3c68c414c (diff) | |
download | puppet-08099b7a383987e292357f285e05933e10205660.tar.gz puppet-08099b7a383987e292357f285e05933e10205660.tar.xz puppet-08099b7a383987e292357f285e05933e10205660.zip |
File serving now works. I've tested a couple of ways to
use it, and added integration tests at the most important
hook points.
This provides the final class structure for all of these classes,
but a lot of the class names are pretty bad, so I'm planning on
going through all of them (especially the file_server stuff) and
renaming.
The functionality is all here for finding files, though (finally).
Once the classes are renamed, I'll be adding searching ability
(which will enable the recursive file copies) and then adding
the link management and enabling ignoring files.
Diffstat (limited to 'lib/puppet/file_serving/configuration')
-rw-r--r-- | lib/puppet/file_serving/configuration/parser.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/puppet/file_serving/configuration/parser.rb b/lib/puppet/file_serving/configuration/parser.rb index 5b17d9801..707c3f9b1 100644 --- a/lib/puppet/file_serving/configuration/parser.rb +++ b/lib/puppet/file_serving/configuration/parser.rb @@ -3,6 +3,7 @@ require 'puppet/util/loadedfile' class Puppet::FileServing::Configuration::Parser < Puppet::Util::LoadedFile Mount = Puppet::FileServing::Mount + MODULES = 'modules' # Parse our configuration file. def parse @@ -52,10 +53,10 @@ class Puppet::FileServing::Configuration::Parser < Puppet::Util::LoadedFile # Add the mount for getting files from modules. def add_module_mount - unless @mounts[Mount::MODULES] - mount = Mount.new(Mount::MODULES) + unless @mounts[MODULES] + mount = Mount.new(MODULES) mount.allow("*") - @mounts[Mount::MODULES] = mount + @mounts[MODULES] = mount end end @@ -98,8 +99,8 @@ class Puppet::FileServing::Configuration::Parser < Puppet::Util::LoadedFile # Set the path for a mount. def path(mount, value) - if mount.name == Mount::MODULES - Puppet.warning "The '#{Mount::MODULES}' module can not have a path. Ignoring attempt to set it" + if mount.name == MODULES + Puppet.warning "The '#{MODULES}' module can not have a path. Ignoring attempt to set it" else begin mount.path = value |