diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-05-07 22:29:44 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-05-07 22:29:44 +0000 |
commit | 1decfa31a588bc46249c89680c80f74e14183ab1 (patch) | |
tree | 0f67d5aa595bb8763ac889db7327f90482b11909 /lib/puppet/network/handler.rb | |
parent | 69cb72120ced589b81038f685f9765ceb353e062 (diff) | |
download | puppet-1decfa31a588bc46249c89680c80f74e14183ab1.tar.gz puppet-1decfa31a588bc46249c89680c80f74e14183ab1.tar.xz puppet-1decfa31a588bc46249c89680c80f74e14183ab1.zip |
Lots of work related to generating more reference. Moving all of the individual references out of puppetdoc and into an external "reference" class, which itself can autoload, so it is now easy to add new types of references. Also adding a network reference, along with an unfinished provider reference.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2479 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/network/handler.rb')
-rw-r--r-- | lib/puppet/network/handler.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/puppet/network/handler.rb b/lib/puppet/network/handler.rb index 080997e98..33343e4fe 100644 --- a/lib/puppet/network/handler.rb +++ b/lib/puppet/network/handler.rb @@ -1,9 +1,12 @@ +require 'puppet/util/docs' require 'puppet/util/subclass_loader' module Puppet::Network # The base class for the different handlers. The handlers are each responsible # for separate xmlrpc namespaces. class Handler + extend Puppet::Util::Docs + # This is so that the handlers can subclass just 'Handler', rather # then having to specify the full class path. Handler = self @@ -24,6 +27,20 @@ module Puppet::Network end end + # Set/Determine whether we're a client- or server-side handler. + def self.side(side = nil) + if side + side = side.intern if side.is_a?(String) + unless [:client, :server].include?(side) + raise ArgumentError, "Invalid side registration '%s' for %s" % [side, self.name] + end + @side = side + else + @side ||= :server + return @side + end + end + # Create an empty init method with the same signature. def initialize(hash = {}) end |