From 4c4412642e40a92bebd26f2966bc72619e16ae79 Mon Sep 17 00:00:00 2001 From: Venkata Harish K Kajur Date: Thu, 18 Jan 2018 02:25:31 -0500 Subject: Sync up the latest logging code changes Issue-ID: AAI-493 Change-Id: I778acf7726b1f9881dee62b128b1fbc457bf7a7e Signed-off-by: Venkata Harish K Kajur --- aai-resources/src/main/scripts/updateTool.sh | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'aai-resources/src/main/scripts/updateTool.sh') diff --git a/aai-resources/src/main/scripts/updateTool.sh b/aai-resources/src/main/scripts/updateTool.sh index f4e2941..05377d6 100644 --- a/aai-resources/src/main/scripts/updateTool.sh +++ b/aai-resources/src/main/scripts/updateTool.sh @@ -47,20 +47,15 @@ contains() { display_usage() { cat < : +[,: -3. Usage 1 example: ./updateTool.sh customer business/customers/customer/customer-id-1 /tmp/updateTest.json +Usage 2. using .json file for update: ./updateTool.sh /tmp/updatepayload.json +Ex: ./updateTool.sh pserver cloud-infrastructure/pservers/pserver/XXX /tmp/testpayload.json -4. Usage 2 (update a property directly): updateTool.sh ':,:' -5. Usage 2 example: ./updateTool.sh complex cloud-infrastructure/complexes/complex/complex-id 'physical-location-id:complex-id, city:New York' -6. You could try without the : (only the property and its new value), but on some servers this did not work: -7. ./updateTool.sh complex cloud-infrastructure/complexes/complex/complex-id 'city:New York' - -8. Usage 3 (update an attribute on an object that is embedded a level or two levels. Use the full path) -9. ./updateTool.sh -10. ./updateTool.sh p-interface network/pnfs/pnf/pnf-name-1/p-interfaces/p-interface/int-1 'interface-type:int-typei' EOF } @@ -131,11 +126,10 @@ fi #or #'physical-location-id:complex-id, city:New York' thirdarg=$3 -isjson = true +isjson = false if [[ "$thirdarg" == *json || "$thirdarg" == *JSON ]]; then - echo "Usage 1(JSON) because the 2nd arg ends with json"; + isjson = true else - echo "Usage 2(Comand Arg) because the 2nd arg does not end with json"; #For Usage 2, format input into JSON string format JSONSTRING="{" INPUT=$3 -- cgit 1.2.3-korg