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_route_expiration/include.sh b/test_route_expiration/include.sh
index 281e8f1..b767926 100644
--- a/test_route_expiration/include.sh
+++ b/test_route_expiration/include.sh
@@ -20,12 +20,19 @@
   exit 0
 }
 
+create_face() {
+  nextHop=$1
+
+  result=$(nfdc face create udp4://$nextHop)
+  echo $result
+}
+
 register() {
   name=$1
   expirationPeriod=$2
   nextHop=$3
 
-  result=$(nfdc register -e $(($expirationPeriod * 1000)) $name udp4://$nextHop | grep -o 'FaceId: [0-9]*' | sed s/'FaceId: '//)
+  result=$(nfdc route add $name udp4://$nextHop expires $(($expirationPeriod * 1000)) | grep -o 'nexthop=[0-9]*' | sed s/'nexthop='//)
   echo $result
 }
 
@@ -35,7 +42,7 @@
   lowerBound=$3
   upperBound=$4
 
-  expirationPeriod=$(nfd-status -r | grep -iF ''$name'' | grep -o 'faceid='$nextHop' ([a-zA-Z0-9 =]*)' |\
+  expirationPeriod=$(nfdc route list | grep -iF ''$name'' | grep 'nexthop='$nextHop'' |\
                      grep -o 'expires=[0-9]*' | sed 's/'expires='//')
 
   if [[ "$expirationPeriod" -lt $lowerBound || "$expirationPeriod" -gt $upperBound ]]; then
@@ -49,7 +56,7 @@
 expect_entry_does_not_exist() {
   name=$1
 
-  count=$(nfd-status -r | grep -c ' $name ')
+  count=$(nfdc route list | grep -c '$name ')
 
   if [[ $count -gt 0 ]]; then
     echo $name "exists past its expected expiration period."
@@ -61,19 +68,19 @@
 
 expect_route_does_not_exist() {
   name=$1
-  faceId=$2
+  nexthop=$2
 
-  count=$(nfd-status -r | grep -iF ''$name'' | grep -c 'faceid='$faceId'')
+  count=$(nfdc route list | grep -iF ''$name'' | grep -c 'nexthop='$nexthop'')
 
   if [[ $count -gt 0 ]]; then
-    echo "Route for $name with FaceId: $faceId exists past its expected expiration period."
+    echo "Route for $name with nexthop=$nexthop exists past its expected expiration period."
     exit 2
   else
-    echo "Route for $name with FaceId: $faceId has expired successfully"
+    echo "Route for $name with nexthop=$nexthop has expired successfully"
   fi
 }
 
 sleep_for_seconds() {
   echo -e "Sleeping for $1 seconds...\n"
   sleep $1
-}
\ No newline at end of file
+}