Storable
# File lib/stella/testplan.rb, line 438 def checkup? @mode == :checkup end
# File lib/stella/testplan.rb, line 462 def cust @cust ||= Customer.from_redis @custid @cust || Customer.anonymous end
# File lib/stella/testplan.rb, line 444 def destroy! VendorInfo.global.checkups.remove self host.checkups.remove self if host plan.checkups.remove self if plan cust.checkups.remove self if cust super end
# File lib/stella/testplan.rb, line 398 def duration return 0 unless @stime (@etime || Stella.now) - @stime end
# File lib/stella/testplan.rb, line 402 def errors? @report && @report.errors? end
# File lib/stella/testplan.rb, line 466 def host @host ||= plan.host if plan @host end
# File lib/stella/testplan.rb, line 425 def hostid # NOTE: This method is needed only until May 30 or so. # (there was an issue where incidents were not including a hostid) @hostid || (plan.nil? ? nil : plan.hostid) end
# File lib/stella/testplan.rb, line 393 def id @id ||= gibbler @id end
# File lib/stella/testplan.rb, line 386 def init plan=nil, mode=nil, options={} @ctime = Stella.now @plan, @mode = plan, mode @options = { }.merge options preprocess end
# File lib/stella/testplan.rb, line 441 def monitor? @mode == :monitor end
# File lib/stella/testplan.rb, line 458 def owner?(obj) obj = Customer === obj ? obj.custid : obj cust.username?(obj) end
# File lib/stella/testplan.rb, line 415 def postprocess @id &&= Gibbler::Digest.new(@id) # Calling plan calls Redis. #@privacy = plan.privacy if Stella::Testplan === plan if Hash === @report @report = Stella::Report.from_hash @report @report.runid = runid end @planid &&= Gibbler::Digest.new(@planid) end
# File lib/stella/testplan.rb, line 405 def preprocess @salt ||= Stella.now.digest.short @status ||= :new if @plan @planid = @plan.id @hostid = @plan.hostid end @options ||= {} @privacy ||= false end
Generated with the Darkfish Rdoc Generator 2.