diff options
author | 2019-01-13 12:18:00 -0500 | |
---|---|---|
committer | 2019-01-13 12:18:07 -0500 | |
commit | 3289e79a0f0343cbd380a385d61e21f59ceff85c (patch) | |
tree | a74957c74fb41275aede412e5c43307fd3e0c859 /aai-resources/src/main/scripts/putTool.sh | |
parent | 92ac3a80c822340c07b9d09189b85c34ac797122 (diff) |
Sync up the changes for v15
Issue-ID: AAI-1811
Change-Id: I5c397d5907bb0711977f62ba84abe454f410a3b7
Signed-off-by: Kajur, Harish (vk250x) <vk250x@att.com>
Diffstat (limited to 'aai-resources/src/main/scripts/putTool.sh')
-rw-r--r-- | aai-resources/src/main/scripts/putTool.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/aai-resources/src/main/scripts/putTool.sh b/aai-resources/src/main/scripts/putTool.sh index cb28413..4e55b0c 100644 --- a/aai-resources/src/main/scripts/putTool.sh +++ b/aai-resources/src/main/scripts/putTool.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/ksh ### # ============LICENSE_START======================================================= @@ -46,7 +46,7 @@ display_usage() { cat <<EOF Usage: $0 [options] - 1. Usage: putTool.sh <resource-path> <json payload file> <optional -display> + 1. Usage: putTool.sh <resource-path> <json payload file> <optional -display> <optional -XFROMAPPID> <optional -XTRANSID> 2. This script requires two arguments, a resource path and a file path to a json file containing the payload. 3. Example: resource-path and payload for a particular customer is: business/customers/customer/JohnDoe customerpayload.json 4. Adding the optional "-display" argument will display all data returned from the request. @@ -76,6 +76,14 @@ ALLOWHTTPRESPONSES=$3 XFROMAPPID="AAI-TOOLS" XTRANSID=`uuidgen` +if [ ! -z "$4" ]; then + XFROMAPPID=$4 +fi + +if [ ! -z "$5" ]; then + XTRANSID=$5 +fi + userid=$( id | cut -f2 -d"(" | cut -f1 -d")" ) if [ "${userid}" != "aaiadmin" ]; then echo "You must be aaiadmin to run $0. The id used $userid." |