Dollar Universe Trigger - CURL KSH

This script is an example of how to use Dollar Universe Triggers with the curl utility.


Description
This script is an example of how to use Dollar Universe Triggers with the curl utility.
Besides curl, this script uses sed, tr and awk.

Operating systems
Linux.
This script may run on Unix plateforms, but please note that, due to the variety of implementations, some adjustments may be needed.
For example, on SunOS, you may have to change awk by nawk.

This script has been briefly tested on:

  • Linux 2.6.32-431.el6.x86_64 x86_64 GNU/Linux , curl 7.19.7

  • Linux 2.6.18-238.9.1.el5PAE i386 GNU/Linux, curl 7.15.5

  • SunOS 5.11 11.0 sun4u sparc SUNW,SPARC-Enterprise, curl 7.21.2, (need to replace awk by nawk)


Prerequisites

  • Having curl utility installed (version 7.18.0 minimum is required to use --data-urlencode). See http://curl.haxx.se


How to use

  • Replace the variables defined at the beginning of the script

  • HOST: the hostname of the targeted Dollar Universe node

  • PORT: the port number of the Dollar Universe API

  • USER: the login used for authentication

  • PWD: the password used for authentication

  • EVENT: the name of the event type to send

  • AREA: the Dollar Universe targeted area



  • Run the script


Note: If the curl version is greater than 7.18.0, the data are sent in the application/x-www-form-urlencoded format; otherwise, the data are sent in text/plain format (--data-urlencode unsupported).


Output
The output gives information about the three steps of the script:

  • Login

  • Event type send

  • Logout


Script launched at
                                                                           <date and time>
Login on :<port> --> Success token is

Send event <event name> --> Incomplete
=> Trigger: DEMO TRIGGER --> Launch number: 0000995
=> Trigger: DEMO TRIGGER 2 --> Launch number: 0000996
=> Trigger: INCOMPLETE: --> Error 702: No task associated with trigger.

Logout --> Success

No content available.
No content available.
Please log in using your Broadcom account to download this plugin.
Please log in using your Broadcom account to download this plugin.
Products Workload Automation, Dollar Universe Workload Automation
Versions 5.x, 6.x
Operating Systems Linux
Last update 2015-05-11 22:44:32.0
Supported by
Community Source dollar-universe-trigger-curl-ksh

Broadcom does not support, maintain or warrant Solutions, Templates, Actions and any other content published on the Community and is subject to Broadcom Community Terms and Conditions.