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_interest_loop/README.md b/test_interest_loop/README.md
index 87d8941..ba34047 100644
--- a/test_interest_loop/README.md
+++ b/test_interest_loop/README.md
@@ -6,5 +6,5 @@
On host C, create UDP face to host A, and add nexthop for `ndn:/test-loop` toward this face.
3. On every host, set strategy of `ndn:/test-loop` to *strategy under test*.
4. On host A, execute ndn-traffic-client to send 100 Interests to `ndn:/test-loop/A/<random>`.
-5. On every host, execute nfd-status to see face counters.
+5. On every host, execute "nfdc face list" to see face counters.
Fail if NInInterests or NOutInterests counter of a UDP face is greater than 200.
diff --git a/test_interest_loop/add-nexthop.sh b/test_interest_loop/add-nexthop.sh
index 26dd4ce..b95a9fd 100755
--- a/test_interest_loop/add-nexthop.sh
+++ b/test_interest_loop/add-nexthop.sh
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
ipaddr=$1
strategy=$2
-nfdc add-nexthop ndn:/test-loop udp4://$ipaddr || exit 1
-nfdc set-strategy ndn:/test-loop $strategy || exit 1
+nfdc face create udp4://$ipaddr || exit 1
+nfdc route add /test-loop udp4://$ipaddr || exit 1
+nfdc strategy set /test-loop $strategy || exit 1
diff --git a/test_interest_loop/interest-loop-test.sh b/test_interest_loop/interest-loop-test.sh
index 9df944c..bb4f853 100755
--- a/test_interest_loop/interest-loop-test.sh
+++ b/test_interest_loop/interest-loop-test.sh
@@ -49,20 +49,20 @@
echo "using ndn-traffic client to send 100 interests..."
ndn-traffic -c 100 -i 200 NDNTrafficClient.conf > $workdir/logs/${logprefix}_client.log 2>&1
-# collect nfd-status from B and C
-echo "collecting nfd-status from B and C..."
-ssh $CTRL_B "nfd-status -f > $workdir/logs/${logprefix}_nfd-status-B.log 2>&1" || exit 4
-scp $CTRL_B:$workdir/logs/${logprefix}_nfd-status-B.log $workdir/logs/${logprefix}_nfd-status-B.log
-ssh $CTRL_C "nfd-status -f > $workdir/logs/${logprefix}_nfd-status-C.log 2>&1" || exit 4
-scp $CTRL_C:$workdir/logs/${logprefix}_nfd-status-C.log $workdir/logs/${logprefix}_nfd-status-C.log
-nfd-status -f > $workdir/logs/${logprefix}_nfd-status-A.log 2>&1 || exit 4
+# collect nfdc face list from B and C
+echo "collecting nfdc face list from B and C..."
+ssh $CTRL_B "nfdc face list > $workdir/logs/${logprefix}_nfdc-face-list-B.log 2>&1" || exit 4
+scp $CTRL_B:$workdir/logs/${logprefix}_nfdc-face-list-B.log $workdir/logs/${logprefix}_nfdc-face-list-B.log
+ssh $CTRL_C "nfdc face list > $workdir/logs/${logprefix}_nfdc-face-list-C.log 2>&1" || exit 4
+scp $CTRL_C:$workdir/logs/${logprefix}_nfdc-face-list-C.log $workdir/logs/${logprefix}_nfdc-face-list-C.log
+nfdc face list > $workdir/logs/${logprefix}_nfdc-face-list-A.log 2>&1 || exit 4
# analyze results
echo "analyzing results..."
for host in {A..C}
do
echo "Host $host:"
- cat $workdir/logs/${logprefix}_nfd-status-$host.log | grep udp4 | while read line
+ cat $workdir/logs/${logprefix}_nfdc-face-list-$host.log | grep udp4 | while read line
do
ini=$(echo "$line" | grep -Po "in={.*?i" | sed 's/in={//g' | sed 's/i//g')
outi=$(echo "$line" | grep -Po "out={.*?i" | sed 's/out={//g' | sed 's/i//g')
diff --git a/test_interest_loop/test_interest_loop.py b/test_interest_loop/test_interest_loop.py
index c22b146..229f338 100644
--- a/test_interest_loop/test_interest_loop.py
+++ b/test_interest_loop/test_interest_loop.py
@@ -17,7 +17,7 @@
1 : "Counter for incoming interest is greater than 200.",
2 : "Counter for outgoing interest is greater than 200.",
3 : "add-nexthop failed",
- 4 : "nfd-status failed",
+ 4 : "nfdc face list failed",
}
def setUp(self):