remove use of deprecated nfdc syntax and update output processing

change all calls to nfd-status to nfdc

(except test_nfdc)

refs #4058

Change-Id: I4205602d180f5cb5c64e9883e79d5deb518533ad
diff --git a/test_nexthopfaceid/nexthopfaceid-test.sh b/test_nexthopfaceid/nexthopfaceid-test.sh
index d4b22b7..93677f8 100755
--- a/test_nexthopfaceid/nexthopfaceid-test.sh
+++ b/test_nexthopfaceid/nexthopfaceid-test.sh
@@ -21,90 +21,99 @@
 
 echo "starting nfd on host B..."
 ssh $CTRL_B "mkdir -p $workdir/logs;\
-    sudo nfd &> $workdir/logs/nfd.log &"
+  sudo nfd &> $workdir/logs/nfd.log &"
 sleep 1
 
 echo "starting nfd on host C..."
 ssh $CTRL_C "mkdir -p $workdir/logs;\
-    sudo nfd &> $workdir/logs/nfd.log &"
+  sudo nfd &> $workdir/logs/nfd.log &"
 sleep 1
 
-# A: Create route for prefix ndn:/P toward B with cost 10
-nfdc register -c 10 ndn:/P udp4://$IP4_B1
+# Create faces
+nfdc face create udp4://$IP4_B1
+nfdc face create udp4://$IP4_C1
+
+# A: Create route for prefix /P toward B with cost 10
+nfdc route add /P udp4://$IP4_B1 cost 10
 if [[ $? -ne 0 ]]
 then
-    echo "Failed to create route for ndn:/P toward host B"
-    clean_up
-    exit 1
+  echo "Failed to create route for /P toward host B"
+  clean_up
+  exit 1
 fi
 
-# A: Create route for prefix ndn:/P toward C with cost 20
-nfdc register -c 20 ndn:/P udp4://$IP4_C1
+# A: Create route for prefix /P toward C with cost 20
+nfdc route add /P udp4://$IP4_C1 cost 20
 if [[ $? -ne 0 ]]
 then
-    echo "Failed to create route for ndn:/P toward host C"
-    clean_up
-    exit 1
+  echo "Failed to create route for /P toward host C"
+  clean_up
+  exit 1
 fi
 
 # Get face IDs on A
-faceB=$(nfdc face list | grep "udp4://$IP4_B1" | cut -d" " -f3 | cut -d"=" -f2)
-faceC=$(nfdc face list | grep "udp4://$IP4_C1" | cut -d" " -f3 | cut -d"=" -f2)
+faceB=$(nfdc face list | grep "udp4://$IP4_B1" | cut -d" " -f1 | cut -d"=" -f2)
+faceC=$(nfdc face list | grep "udp4://$IP4_C1" | cut -d" " -f1 | cut -d"=" -f2)
 
-# B: Start ndn-traffic-server serving "BBBBBBBB" on ndn:/P
+# B: Start ndn-traffic-server serving "BBBBBBBB" on /P
 echo "starting ndn-traffic-server on host B..."
 ssh $CTRL_B "ndn-traffic-server $workdir/NDNTrafficServer-B.conf > $workdir/logs/server.log 2>&1 &"
 
-# C: Start ndn-traffic-server serving "CCCCCCCC" on ndn:/P
+# C: Start ndn-traffic-server serving "CCCCCCCC" on /P
 echo "starting ndn-traffic-server on host C..."
 ssh $CTRL_C "ndn-traffic-server $workdir/NDNTrafficServer-C.conf > $workdir/logs/server.log 2>&1 &"
 
-# A: Start consumer to enable local fields and express Interest for ndn:/P/1 w/o NextHopFaceId
+# A: Start consumer to enable local fields and express Interest for /P/1 w/o NextHopFaceId
 #    Expect Data w/ payload "BBBBBBBB"
-echo "From A, sending Interest for ndn:/P/1 (LocalFields=enabled)..."
+echo "From A, sending Interest for /P/1 (LocalFields=enabled)..."
 output=$(test-nexthopfaceid-consumer /P/1 t -1)
 if [[ $output != "BBBBBBBB" ]]; then
-  echo "Interest ndn:/P/1 not answered with Data containing payload 'BBBBBBBB'"
+  echo "Interest /P/1 not answered with Data containing payload 'BBBBBBBB'"
+  echo "Actual: $output"
   clean_up
   exit 2
 fi
 
-# A: Start consumer to enable local fields and express Interest for ndn:/P/2 w/ NextHopFaceId=faceB
+# A: Start consumer to enable local fields and express Interest for /P/2 w/ NextHopFaceId=faceB
 #    Expect Data w/ payload "BBBBBBBB"
-echo "From A, sending Interest for ndn:/P/2 (LocalFields=enabled, NextHopFaceId=faceB)..."
+echo "From A, sending Interest for /P/2 (LocalFields=enabled, NextHopFaceId=faceB)..."
 output=$(test-nexthopfaceid-consumer /P/2 t $faceB)
 if [[ $output != "BBBBBBBB" ]]; then
-  echo "Interest ndn:/P/2 not answered with Data containing payload 'BBBBBBBB'"
+  echo "Interest /P/2 not answered with Data containing payload 'BBBBBBBB'"
+  echo "Actual: $output"
   clean_up
   exit 3
 fi
 
-# A: Start consumer to enable local fields and express Interest for ndn:/P/3 w/ NextHopFaceId=faceC
+# A: Start consumer to enable local fields and express Interest for /P/3 w/ NextHopFaceId=faceC
 #    Expect Data w/ payload "CCCCCCCC"
-echo "From A, sending Interest for ndn:/P/3 (LocalFields=enabled, NextHopFaceId=faceC)..."
+echo "From A, sending Interest for /P/3 (LocalFields=enabled, NextHopFaceId=faceC)..."
 output=$(test-nexthopfaceid-consumer /P/3 t $faceC)
 if [[ $output != "CCCCCCCC" ]]; then
-  echo "Interest ndn:/P/3 not answered with Data containing payload 'CCCCCCCC'"
+  echo "Interest /P/3 not answered with Data containing payload 'CCCCCCCC'"
+  echo "Actual: $output"
   clean_up
   exit 4
 fi
 
-# A: Start consumer to enable local fields and express Interest for ndn:/P/4 w/ NextHopFaceId=null-face
+# A: Start consumer to enable local fields and express Interest for /P/4 w/ NextHopFaceId=null-face
 #    Expect either timeout or Nack
-echo "From A, sending Interest for ndn:/P/4 (LocalFields=enabled, NextHopFaceId=null-face)..."
+echo "From A, sending Interest for /P/4 (LocalFields=enabled, NextHopFaceId=null-face)..."
 output=$(test-nexthopfaceid-consumer /P/4 t 0)
 if [[ $output != "Timeout" && $output != "Nack" ]]; then
-  echo "Interest ndn:/P/4 was not answered with a Nack and did not time out"
+  echo "Interest /P/4 was not answered with a Nack and did not time out"
+  echo "Actual: $output"
   clean_up
   exit 5
 fi
 
-# A: Start consumer to disable local fields and express Interest for ndn:/P/5w/ NextHopFaceId=faceC
+# A: Start consumer to disable local fields and express Interest for /P/5w/ NextHopFaceId=faceC
 #    Expect either timeout or Data w/ payload "BBBBBBBB"
-echo "From A, sending Interest for ndn:/P/5 (LocalFields=disabled, NextHopFaceId=faceC)..."
+echo "From A, sending Interest for /P/5 (LocalFields=disabled, NextHopFaceId=faceC)..."
 output=$(test-nexthopfaceid-consumer /P/5 f $faceC)
 if [[ $output != "Timeout" && $output != "BBBBBBBB" ]]; then
-  echo "Interest ndn:/P/5 was not answered with Data containing payload 'BBBBBBBB' and did not time out"
+  echo "Interest /P/5 was not answered with Data containing payload 'BBBBBBBB' and did not time out"
+  echo "Actual: $output"
   clean_up
   exit 6
 fi