lib/mu/api/scale.rb in mu-5.7.2.3 vs lib/mu/api/scale.rb in mu-5.7.2.4

- old
+ new

@@ -1,17 +1,18 @@ class Mu class Scale include Helper - attr_accessor :host, :username, :password, :docroot, :configuration, :config_file, :uuid + attr_accessor :host, :username, :password, :docroot, :configuration, :config_file, :uuid, :tracks def initialize(host=ENV['MU_IP'], username=ENV['MU_ADMIN_USER'], password=ENV['MU_ADMIN_PASS']) @host = host @username = username @password = password @docroot = "/api/v5/scale/" @uuid = nil + @tracks = Array.new # an array of @configuration objects for multi-track execution @http = HttpHelper.new(@host, @username, @password, @docroot) @config_file = (ENV['SCALE_CONFIG_FILE'].nil?) ? "scale.json" : ENV['SCALE_CONFIG_FILE'] if File.readable? @config_file msg "reading config file: #{@config_file}", Logger::DEBUG @configuration = JSON.parse File.read(@config_file) @@ -66,12 +67,26 @@ response = post "start", {"request" => @configuration} msg response, Logger::DEBUG return response end + # starts a multi-track scale test with the class @tracks object + def start_n + response = post "start_n", {"request" => @tracks} + msg response, Logger::DEBUG + return response + end + # verifies the class @configuration object def verify response = post "verify", {"request" => @configuration} + msg response, Logger::DEBUG + return response + end + + # verifies the multi-track class @tracks object + def verify_n + response = post "verify_n", {"request" => @tracks} msg response, Logger::DEBUG return response end # updates a running scale test, as long as the test pattern is 'none'