summaryrefslogtreecommitdiff
path: root/validation
diff options
context:
space:
mode:
authorOlivier Dufour2013-06-19 10:08:48 +0200
committerOlivier Dufour2013-06-27 11:06:32 +0200
commit0c915a945b445fe0fd77f4235c9bae957442b6e2 (patch)
tree392c59fc6c9b9430449fcdda8e2b389e961c17dc /validation
parent0cb3a19b70948871e8ed401078eaad3e2599c6ae (diff)
validation/test/av_home: add the number of plugs/networks, refs #4047
Diffstat (limited to 'validation')
-rwxr-xr-xvalidation/test/av_home/av_mme.py24
1 files changed, 18 insertions, 6 deletions
diff --git a/validation/test/av_home/av_mme.py b/validation/test/av_home/av_mme.py
index c45b63860f..c64e301b98 100755
--- a/validation/test/av_home/av_mme.py
+++ b/validation/test/av_home/av_mme.py
@@ -138,28 +138,40 @@ def process_discovery (ans, mode):
discover = """
List of stations for {plug}:
-+-------------------+------+-----+
-| MAC | SNID | TEI |
-+-------------------+------+-----+
{stations}
List of neighbor networks for {plug}:
-+-------------------+------+
-| NID | SNID |
-+-------------------+------+
{networks}
"""
stations = ""
networks = ""
if ans[CC_DISCOVER_LIST_CNF].num_station != 0:
+ stations = """Total: {n} station(s)
+
++-------------------+------+-----+
+| MAC | SNID | TEI |
++-------------------+------+-----+
+"""
for e in ans[CC_DISCOVER_LIST_CNF].stations:
stations += "| %s | %02d | %03d |\n" % (e.mac, int (e.snid), int (e.tei))
stations += "+-------------------+------+-----+\n"
+ stations = stations.format (n = ans[CC_DISCOVER_LIST_CNF].num_station)
+ else:
+ stations = "No neighbor station discovered."
if ans[CC_DISCOVER_LIST_CNF].num_network != 0:
+ networks = """Total: {n} network(s)
+
++-------------------+------+
+| NID | SNID |
++-------------------+------+
+"""
for e in ans[CC_DISCOVER_LIST_CNF].networks:
networks += "| %16s | %02d |\n" % (e.nid, int (e.snid))
networks += "+-------------------+------+\n"
+ networks = networks.format (n = ans[CC_DISCOVER_LIST_CNF].num_network)
+ else:
+ networks = "No neighbor network discovered."
discover = discover.format (plug = av_home_attr.plug_mac,
stations = stations,
networks = networks)