Class: Stella::CLI

Inherits:
Drydock::Command
  • Object
show all
Defined in:
lib/stella/cli.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#exit_codeObject

Returns the value of attribute exit_code.



4
5
6
# File 'lib/stella/cli.rb', line 4

def exit_code
  @exit_code
end

Instance Method Details

#initObject



6
7
8
9
# File 'lib/stella/cli.rb', line 6

def init
  @conf = Stella::Config.refresh
  @exit_code = 0
end

#loadObject



27
28
29
30
31
32
33
34
35
# File 'lib/stella/cli.rb', line 27

def load
  opts = {}
  opts[:hosts] = @hosts
  [:benchmark, :clients, :repetitions, :delay, :time].each do |opt|
    opts[opt] = @option.send(opt) unless @option.send(opt).nil?
  end
  ret = Stella::Engine::Load.run @testplan, opts
  @exit_code = (ret ? 0 : 1)
end

#load_valid?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/stella/cli.rb', line 23

def load_valid?
  create_testplan
end

#verifyObject



15
16
17
18
19
20
21
# File 'lib/stella/cli.rb', line 15

def verify
  opts = {}
  opts[:hosts] = @hosts
  opts[:benchmark] = true if @option.benchmark
  ret = Stella::Engine::Functional.run @testplan, opts
  @exit_code = (ret ? 0 : 1)
end

#verify_valid?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/stella/cli.rb', line 11

def verify_valid?
  create_testplan
end