[cli] add cli to get All Thread Nodes multicast address (#6500)

This commit adds APIs to get Link/Realm Local All Thread Nodes
multicast addresses. This commit also adds cli command to get
meshlocal prefix alone for writing tests.
This commit is contained in:
Li Cao
2021-04-22 19:14:56 -07:00
committed by GitHub
parent 7a2465f751
commit d4d81c39c9
10 changed files with 129 additions and 1 deletions
+8
View File
@@ -1468,6 +1468,14 @@ class OTCI(object):
"""Disable multicast promiscuous mode."""
self.execute_command('ipmaddr promiscuous disable')
def get_ipmaddr_llatn(self) -> Ip6Addr:
"""Get Link Local All Thread Nodes Multicast Address"""
return self.__parse_ip6addr(self.execute_command('ipmaddr llatn'))
def get_ipmaddr_rlatn(self) -> Ip6Addr:
"""Get Realm Local All Thread Nodes Multicast Address"""
return self.__parse_ip6addr(self.execute_command('ipmaddr rlatn'))
#
# Backbone Router Utilities
#
+2
View File
@@ -196,6 +196,8 @@ class TestOTCI(unittest.TestCase):
self.assertTrue(leader.get_ipaddr_rloc())
self.assertTrue(leader.get_ipaddr_linklocal())
self.assertTrue(leader.get_ipaddr_mleid())
self.assertTrue(leader.get_ipmaddr_llatn())
self.assertTrue(leader.get_ipmaddr_rlatn())
leader.add_ipaddr('2001::1')
leader.del_ipaddr('2001::1')