diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-01-20 20:38:01 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-01-20 20:38:01 +0000 |
| commit | 258114d48b4853cbaa79b53776d5279f727451ab (patch) | |
| tree | d2eab221442ea669e3dff895f1358ebbf7afe21b /lib/puppet | |
| parent | 0cb51f3f7fb442b1b915523c93461b9a24febacb (diff) | |
| download | puppet-258114d48b4853cbaa79b53776d5279f727451ab.tar.gz puppet-258114d48b4853cbaa79b53776d5279f727451ab.tar.xz puppet-258114d48b4853cbaa79b53776d5279f727451ab.zip | |
Modifying docs, and adding scheduling hooks
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@846 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet')
| -rw-r--r-- | lib/puppet/config.rb | 2 | ||||
| -rwxr-xr-x | lib/puppet/daemon.rb | 2 | ||||
| -rwxr-xr-x | lib/puppet/filetype.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/log.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/metric.rb | 2 | ||||
| -rwxr-xr-x | lib/puppet/server/logger.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/type.rb | 26 | ||||
| -rwxr-xr-x | lib/puppet/type/parsedtype.rb | 2 |
8 files changed, 28 insertions, 12 deletions
diff --git a/lib/puppet/config.rb b/lib/puppet/config.rb index dc8b05f56..dc9892cfb 100644 --- a/lib/puppet/config.rb +++ b/lib/puppet/config.rb @@ -1,4 +1,4 @@ -module Puppet # :nodoc: +module Puppet # The class for handling configuration files. class Config < Hash # Slight override, since we can't seem to have a subclass where all instances diff --git a/lib/puppet/daemon.rb b/lib/puppet/daemon.rb index d4014f995..a3ced6c47 100755 --- a/lib/puppet/daemon.rb +++ b/lib/puppet/daemon.rb @@ -2,7 +2,7 @@ require 'puppet' -module Puppet # :nodoc: +module Puppet # A module that handles operations common to all daemons. module Daemon def daemonname diff --git a/lib/puppet/filetype.rb b/lib/puppet/filetype.rb index eb2cc4428..dfca58511 100755 --- a/lib/puppet/filetype.rb +++ b/lib/puppet/filetype.rb @@ -1,4 +1,4 @@ -module Puppet # :nodoc: +module Puppet # Basic classes for reading, writing, and emptying files. Not much # to see here. class FileType diff --git a/lib/puppet/log.rb b/lib/puppet/log.rb index 6b7aa506d..24a694be4 100644 --- a/lib/puppet/log.rb +++ b/lib/puppet/log.rb @@ -1,6 +1,6 @@ require 'syslog' -module Puppet # :nodoc: +module Puppet # Pass feedback to the user. Log levels are modeled after syslog's, and it is # expected that that will be the most common log destination. Supports # multiple destinations, one of which is a remote server. diff --git a/lib/puppet/metric.rb b/lib/puppet/metric.rb index 6e2040eda..f67c06d36 100644 --- a/lib/puppet/metric.rb +++ b/lib/puppet/metric.rb @@ -1,7 +1,7 @@ # included so we can test object types require 'puppet' -module Puppet # :nodoc: +module Puppet # A class for handling metrics. This is currently ridiculously hackish. class Metric def Metric.init diff --git a/lib/puppet/server/logger.rb b/lib/puppet/server/logger.rb index ae57370d8..2170a5772 100755 --- a/lib/puppet/server/logger.rb +++ b/lib/puppet/server/logger.rb @@ -1,7 +1,7 @@ require 'yaml' module Puppet -class Server # :nodoc: +class Server class LoggerError < RuntimeError; end # Receive logs from remote hosts. diff --git a/lib/puppet/type.rb b/lib/puppet/type.rb index b13831727..6a7dcacc1 100644 --- a/lib/puppet/type.rb +++ b/lib/puppet/type.rb @@ -8,7 +8,7 @@ require 'puppet/parameter' require 'puppet/util' # see the bottom of the file for the rest of the inclusions -module Puppet # :nodoc: +module Puppet class Type < Puppet::Element # Types (which map to elements in the languages) are entirely composed of # attribute value pairs. Generally, Puppet calls any of these things an @@ -1247,6 +1247,22 @@ class Type < Puppet::Element # Set up all of our autorequires. def finish self.autorequire + + # Scheduling has to be done when the whole config is instantiated, so + # that file order doesn't matter in finding them. + self.schedule + end + + def schedule + unless self[:schedule] + return + end + + if sched = Puppet.type(:schedule)[self[:schedule]] + self[:schedule] = sched + else + self.fail "Could not find schedule %s" % self[:schedule] + end end # Is the specified parameter set? @@ -1759,10 +1775,10 @@ class Type < Puppet::Element end end - #newmetaparam(:schedule) do - # desc "On what schedule the object should be managed. - # Currently non-functional." - #end + newmetaparam(:schedule) do + desc "On what schedule the object should be managed. + Currently non-functional." + end newmetaparam(:check) do desc "States which should have their values retrieved diff --git a/lib/puppet/type/parsedtype.rb b/lib/puppet/type/parsedtype.rb index ea55281f3..21d0299f1 100755 --- a/lib/puppet/type/parsedtype.rb +++ b/lib/puppet/type/parsedtype.rb @@ -76,7 +76,7 @@ module Puppet end end - class Type # :nodoc: + class Type # The collection of classes that are just simple records aggregated # into a file. See 'host.rb' for an example. class ParsedType < Puppet::Type |
