diff options
author | Luke Kanies <luke@madstop.com> | 2005-05-21 23:31:49 +0000 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2005-05-21 23:31:49 +0000 |
commit | 576a0310021cbe4bd0efb2b4814f33c78895c026 (patch) | |
tree | 8f8e1b361a7ac524b70298619e212c32c5bf3b36 /lib/blink/client.rb | |
parent | 03741b41b3fba65d10c9adafd8969913876e28d2 (diff) | |
download | puppet-576a0310021cbe4bd0efb2b4814f33c78895c026.tar.gz puppet-576a0310021cbe4bd0efb2b4814f33c78895c026.tar.xz puppet-576a0310021cbe4bd0efb2b4814f33c78895c026.zip |
okay, bin/blinker works again, and i have modified both client and server to be a bit easier to use non-networked
git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@267 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/blink/client.rb')
-rw-r--r-- | lib/blink/client.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/blink/client.rb b/lib/blink/client.rb index 627d8e4eb..1715ab8f5 100644 --- a/lib/blink/client.rb +++ b/lib/blink/client.rb @@ -22,13 +22,18 @@ module Blink class Client < SOAP::RPC::HTTPServer def initialize(hash) # to whom do we connect? - if hash.include?(:Local) and hash[:Local] == true + @url = hash[:Server] + if hash.include?(:Listen) and hash[:Listen] == false + Blink.notice "We're local" @localonly = true + @driver = @url else + Blink.notice "We're networked" @localonly = false + @driver = SOAP::RPC::Driver.new(@url, 'urn:blink-server') + @driver.add_method("getconfig", "name") end unless @localonly - @url = hash[:Server] hash.delete(:Server) Blink.notice "Server is %s" % @url @@ -44,8 +49,6 @@ module Blink def getconfig Blink.debug "server is %s" % @url - @driver = SOAP::RPC::Driver.new(@url, 'urn:blink-server') - @driver.add_method("getconfig", "name") #client.loadproperty('files/sslclient.properties') Blink.notice("getting config") objects = @driver.getconfig(Blink::Fact["hostname"]) |