X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-cass%2Fcass_init%2Frestore.sh;h=528978af607cc95a2e5fa6b8d9971cc3be990c78;hb=eeb50d3b600eb5c781c53cb6f9519e503e22ca6d;hp=768cf4c7e38edee8fa5f3333318fa1969e48760d;hpb=546c6c5d73b0a50e0aa784f1eae5abd2564ea145;p=aaf%2Fauthz.git diff --git a/auth/auth-cass/cass_init/restore.sh b/auth/auth-cass/cass_init/restore.sh index 768cf4c7..528978af 100644 --- a/auth/auth-cass/cass_init/restore.sh +++ b/auth/auth-cass/cass_init/restore.sh @@ -4,7 +4,7 @@ echo `date` ENV=DOCKER -CQLSH="/usr/bin/cqlsh -k authz" +CQLSH="cqlsh -k authz" cd dats if [ "$*" = "" ]; then @@ -35,9 +35,13 @@ for T in $DATA; do echo $T case "$T" in # 2.1.14 still has NULL problems for COPY. Fixed in 2.1.15+ - "approval"|"artifact"|"cred"|"ns"|"x509"|"role") + "approval"|"artifact"|"cred"|"ns"|"x509"|"role"|"notified") $CQLSH -e "truncate $T" - UPLOAD="$UPLOAD dats/"$T + UPLOAD="$UPLOAD "$T + ;; + "history") + $CQLSH -e "truncate $T" + DO_HISTORY=true ;; *) $CQLSH -e "truncate $T; COPY authz.${T} FROM 'dats/${T}.dat' WITH DELIMITER='|'" @@ -47,6 +51,12 @@ for T in $DATA; do done if [ ! "$UPLOAD" = "" ]; then - java -DCASS_ENV=$ENV -jar aaf-auth-batch-*-full.jar Upload $UPLOAD + cd dats + java -Dcadi_prop_files=../authBatch.props -DCASS_ENV=$ENV -jar ../aaf-auth-batch-*-full.jar Upload $UPLOAD + cd - +fi + +if [ "$DO_HISTORY" = "true" ]; then + $CQLSH -e "COPY authz.history FROM 'dats/history.dat' WITH DELIMITER='|'" fi echo `date`