Module: Dag::Client::JobValidation

Included in:
JobCollection
Defined in:
lib/dag/client/job_validation.rb

Constant Summary collapse

VALID_WHERE_KEYS =
[
  :status,
  :type,
  :cluster_name,
  :label,
  :cluster_rebooted
]

Instance Method Summary collapse

Instance Method Details

#validate_job_param_keys(params) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/dag/client/job_validation.rb', line 13

def validate_job_param_keys(params)
  params.keys.each do |k|
    unless VALID_WHERE_KEYS.include?(k.to_sym)
      raise Dag::Client::ParameterInvalid.new("Invalid where condition: #{k}")
    end
  end
end