From d86e4796432a61aa89330f5bf19c68609bda1e0b Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Wed, 25 May 2005 15:57:00 +0000 Subject: All tests pass again, and i have added Type.allclear to remove all existing type instances, thus making it much easier to run all of the parser and lexer and then server tests; i have also added remove server tests git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@273 980ebf18-57e1-0310-9a29-db15c13687c0 --- lib/blink/client.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib/blink/client.rb') diff --git a/lib/blink/client.rb b/lib/blink/client.rb index ce92d7a97..3f64c37ba 100644 --- a/lib/blink/client.rb +++ b/lib/blink/client.rb @@ -26,11 +26,11 @@ module Blink @nil = nil @url = hash[:Server] if hash.include?(:Listen) and hash[:Listen] == false - Blink.notice "We're local" + Blink.notice "We're a local client" @localonly = true @driver = @url else - Blink.notice "We're networked" + Blink.notice "We're a networked client" @localonly = false @driver = SOAP::RPC::Driver.new(@url, 'urn:blink-server') @driver.add_method("getconfig", "name") @@ -53,7 +53,12 @@ module Blink Blink.debug "server is %s" % @url #client.loadproperty('files/sslclient.properties') Blink.notice("getting config") - objects = @driver.getconfig(self) + objects = nil + if @localonly + objects = @driver.getconfig(self) + else + objects = @driver.getconfig(Blink::Fact["hostname"]) + end self.config(objects) end -- cgit