[openstack-dev] [Mistral]

Dmitri Zimine dz at stackstorm.com
Tue Feb 11 09:23:25 UTC 2014


Do we have (or think about) a shorthand to calling REST_API action, without defining a service? 

FULL  DSL:

Services:
  TimeService:
  	type: REST_API
  	parameters:
  	  baseUrl:http://api.timezonedb.com
  	  key:<my_api_key>
  	actions:
  	  get-time:
  	    task-parameters:
  	      zone:
Workflow:
   tasks:
      timeInToronto:
         action: TimeService:get-time
         parameters:
           zone: "America/Toronto"
           
SHORTCUT - may look something like this: 

Workflow:
   tasks:
       timeInToronto:
  	    action:std:REST_API
  	    parameters:
  	      baseUrl: "http://api.timezonedb.com"
  	      method: "GET"
  	      parameters: "zone=/America/Toronto&key=<my_api_key>"
  	      
Why asking:  

1) analogy with std:send-email action. I wonder do we have to make user define Service for std:send-email? and I think that for standard tasks we shouldn't have to. If there is any thinking on REST_API, it may apply here. 

2) For a one-off web service calls the complete syntax is may be overkill (but yes, it comes handy for reuse). See examples below. 






More information about the OpenStack-dev mailing list