Sha256: 7395c7ceb7dd1f54a025bc6fb8c133e579c9d0145447f2c710398a076721f131
Contents?: true
Size: 1.78 KB
Versions: 21
Compression:
Stored size: 1.78 KB
Contents
module Fog module OpenStack class Workflow class V2 class Real def create_cron_trigger(name, workflow_identifier, workflow_input = nil, workflow_params = nil, pattern = "* * * * *", first_time = nil, count = nil) data = { :name => name, :pattern => pattern, :first_execution_time => first_time, :remaining_executions => count } if workflow_identifier data[:workflow_id] = workflow_identifier end if workflow_input data[:workflow_input] = Fog::JSON.encode(workflow_input) end if workflow_params data[:workflow_params] = Fog::JSON.encode(workflow_params) end body = Fog::JSON.encode(data) request( :body => body, :expects => 201, :method => "POST", :path => "cron_triggers" ) end end class Mock def create_cron_trigger(_name, _workflow_identifier, _workflow_input = nil, _workflow_params = nil, _pattern = nil, _first_time = nil, _count = nil) response = Excon::Response.new response.status = 201 response.body = "" response end end end end end end
Version data entries
21 entries across 21 versions & 3 rubygems