summaryrefslogtreecommitdiffstats
path: root/src/main/scripts/dynamicPayloadPartial.sh
blob: 77b291955dcc2e39ac1f87e5b4931b65a67a0e43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/ksh

#Create empty partial snapshot file
INPUT_DATASNAPSHOT_FILE=$1

set -A nodes customer service-subscription service pserver cloud-region availability-zone tenant zone complex
 > $INPUT_DATASNAPSHOT_FILE".partial"

for nodeType in ${nodes[@]}
	do
         grep "aai-node-type.*\"value\":\"$nodeType\"" $INPUT_DATASNAPSHOT_FILE >>$INPUT_DATASNAPSHOT_FILE'.partial'
    done
exit 0