CID-515: check launch_options param
This commit is contained in:
parent
a37ddc9fb3
commit
732d48833f
@ -11,6 +11,10 @@ module Devops
|
||||
env_name = check_string(@body["deploy_env"], "Parameter 'deploy_env' must be a not empty string")
|
||||
check_string(@body["name"], "Parameter 'name' must be a not empty string", true, false)
|
||||
list = check_array(@body["run_list"], "Parameter 'run_list' is invalid, it should be not empty array of strings", String, true, true)
|
||||
check_param(@body['launch_options'], Hash, "Parameter 'launch_options' should be a hash with 'without_bootstrap' and 'skip_rollback' keys")
|
||||
if !@body['launch_options'].key?('without_bootstrap') || !@body['launch_options'].key?('skip_rollback')
|
||||
raise Devops::ValidationError.new("Parameter 'launch_options' should contain 'without_bootstrap' and 'skip_rollback' keys")
|
||||
end
|
||||
Validators::Helpers::RunList.new(list).validate! unless list.nil?
|
||||
@body
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user