6 Topotests is a suite of topology tests for FRR built on top of Mininet.
11 Only tested with Ubuntu 16.04 and Ubuntu 18.04 (which uses Mininet 2.2.x).
13 Instructions are the same for all setups (i.e. ExaBGP is only used for BGP
16 Installing Mininet Infrastructure
17 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21 apt-get install mininet
22 apt-get install python-pip
23 apt-get install iproute
26 pip install "pytest<5"
27 pip install exabgp==3.4.17 (Newer 4.0 version of exabgp is not yet
29 useradd -d /var/run/exabgp/ -s /bin/false exabgp
34 Optional, will give better output.
39 disable apport (which move core files)
41 Set ``enabled=0`` in ``/etc/default/apport``.
43 Next, update security limits by changing :file:`/etc/security/limits.conf` to::
45 #<domain> <type> <item> <value>
47 root soft core unlimited
49 root hard core unlimited
51 Reboot for options to take effect.
53 SNMP Utilities Installation
54 """""""""""""""""""""""""""
56 To run SNMP test you need to install SNMP utilities and MIBs. Unfortunately
57 there are some errors in the upstream MIBS which need to be patched up. The
58 following steps will get you there on Ubuntu 20.04.
62 apt install snmpd snmp
63 apt install snmp-mibs-downloader
65 wget http://www.iana.org/assignments/ianaippmmetricsregistry-mib/ianaippmmetricsregistry-mib -O /usr/share/snmp/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB
66 wget http://pastebin.com/raw.php?i=p3QyuXzZ -O /usr/share/snmp/mibs/ietf/SNMPv2-PDU
67 wget http://pastebin.com/raw.php?i=gG7j8nyk -O /usr/share/snmp/mibs/ietf/IPATM-IPMC-MIB
68 edit /etc/snmp/snmp.conf to look like this
69 # As the snmp packages come without MIB files due to license reasons, loading
70 # of MIBs is disabled by default. If you added the MIBs you can reenable
71 # loading them by commenting out the following line.
78 FRR needs to be installed separately. It is assume to be configured like the
79 standard Ubuntu Packages:
81 - Binaries in :file:`/usr/lib/frr`
82 - State Directory :file:`/var/run/frr`
83 - Running under user ``frr``, group ``frr``
84 - vtygroup: ``frrvty``
85 - config directory: :file:`/etc/frr`
86 - For FRR Packages, install the dbg package as well for coredump decoding
88 No FRR config needs to be done and no FRR daemons should be run ahead of the
89 test. They are all started as part of the test.
94 If you prefer to manually build FRR, then use the following suggested config:
100 --localstatedir=/var/run/frr \
101 --sbindir=/usr/lib/frr \
102 --sysconfdir=/etc/frr \
106 --enable-multipath=64 \
109 --enable-vty-group=frrvty \
110 --enable-snmp=agentx \
111 --with-pkg-extra-version=-my-manual-build
113 And create ``frr`` user and ``frrvty`` group as follows:
117 addgroup --system --gid 92 frr
118 addgroup --system --gid 85 frrvty
119 adduser --system --ingroup frr --home /var/run/frr/ \
120 --gecos "FRRouting suite" --shell /bin/false frr
121 usermod -G frrvty frr
126 Execute all tests with output to console
127 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131 py.test -s -v --tb=no
133 The above command must be executed from inside the topotests directory.
135 All test\_\* scripts in subdirectories are detected and executed (unless
136 disabled in ``pytest.ini`` file).
138 ``--tb=no`` disables the python traceback which might be irrelevant unless the
139 test script itself is debugged.
149 For example, and assuming you are inside the frr directory:
153 cd tests/topotests/bgp_l3vpn_to_bgp_vrf
154 ./test_bgp_l3vpn_to_bgp_vrf.py
156 For further options, refer to pytest documentation.
158 Test will set exit code which can be used with ``git bisect``.
160 For the simulated topology, see the description in the python file.
162 If you need to clear the mininet setup between tests (if it isn't cleanly
163 shutdown), then use the ``mn -c`` command to clean up the environment.
165 StdErr log from daemos after exit
166 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
168 To enable the reporting of any messages seen on StdErr after the daemons exit,
169 the following env variable can be set::
171 export TOPOTESTS_CHECK_STDERR=Yes
173 (The value doesn't matter at this time. The check is whether the env
174 variable exists or not.) There is no pass/fail on this reporting; the
175 Output will be reported to the console.
177 Collect Memory Leak Information
178 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
180 FRR processes can report unfreed memory allocations upon exit. To
181 enable the reporting of memory leaks, define an environment variable
182 ``TOPOTESTS_CHECK_MEMLEAK`` with the file prefix, i.e.::
184 export TOPOTESTS_CHECK_MEMLEAK="/home/mydir/memleak_"
186 This will enable the check and output to console and the writing of
187 the information to files with the given prefix (followed by testname),
188 ie :file:`/home/mydir/memcheck_test_bgp_multiview_topo1.txt` in case
191 Running Topotests with AddressSanitizer
192 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
194 Topotests can be run with AddressSanitizer. It requires GCC 4.8 or newer.
195 (Ubuntu 16.04 as suggested here is fine with GCC 5 as default). For more
196 information on AddressSanitizer, see
197 https://github.com/google/sanitizers/wiki/AddressSanitizer.
199 The checks are done automatically in the library call of ``checkRouterRunning``
200 (ie at beginning of tests when there is a check for all daemons running). No
201 changes or extra configuration for topotests is required beside compiling the
202 suite with AddressSanitizer enabled.
204 If a daemon crashed, then the errorlog is checked for AddressSanitizer output.
205 If found, then this is added with context (calling test) to
206 :file:`/tmp/AddressSanitizer.txt` in Markdown compatible format.
208 Compiling for GCC AddressSanitizer requires to use ``gcc`` as a linker as well
209 (instead of ``ld``). Here is a suggest way to compile frr with AddressSanitizer
210 for ``master`` branch:
214 git clone https://github.com/FRRouting/frr.git
218 --enable-address-sanitizer \
219 --prefix=/usr/lib/frr --sysconfdir=/etc/frr \
220 --localstatedir=/var/run/frr \
221 --sbindir=/usr/lib/frr --bindir=/usr/lib/frr \
222 --enable-exampledir=/usr/lib/frr/examples \
223 --with-moduledir=/usr/lib/frr/modules \
224 --enable-multipath=0 --enable-rtadv \
225 --enable-tcp-zebra --enable-fpm --enable-pimd \
229 # Create symlink for vtysh, so topotest finds it in /usr/lib/frr
230 sudo ln -s /usr/lib/frr/vtysh /usr/bin/
232 and create ``frr`` user and ``frrvty`` group as shown above.
234 .. _topotests_docker:
236 Running Tests with Docker
237 -------------------------
239 There is a Docker image which allows to run topotests.
244 If you have Docker installed, you can run the topotests in Docker. The easiest
245 way to do this, is to use the make targets from this repository.
247 Your current user needs to have access to the Docker daemon. Alternatively you
248 can run these commands as root.
254 This command will pull the most recent topotests image from Dockerhub, compile
255 FRR inside of it, and run the topotests.
260 Internally, the topotests make target uses a shell script to pull the image and
261 spawn the Docker container.
263 There are several environment variables which can be used to modify the
264 behavior of the script, these can be listed by calling it with ``-h``:
268 ./tests/topotests/docker/frr-topotests.sh -h
270 For example, a volume is used to cache build artifacts between multiple runs of
271 the image. If you need to force a complete recompile, you can set
276 TOPOTEST_CLEAN=1 ./tests/topotests/docker/frr-topotests.sh
278 By default, ``frr-topotests.sh`` will build frr and run pytest. If you append
279 arguments and the first one starts with ``/`` or ``./``, they will replace the
280 call to pytest. If the appended arguments do not match this patttern, they will
281 be provided to pytest as arguments. So, to run a specific test with more
286 ./tests/topotests/docker/frr-topotests.sh -vv -s all-protocol-startup/test_all_protocol_startup.py
288 And to compile FRR but drop into a shell instead of running pytest:
292 ./tests/topotests/docker/frr-topotests.sh /bin/bash
297 The Docker image just includes all the components to run the topotests, but not
298 the topotests themselves. So if you just want to write tests and don't want to
299 make changes to the environment provided by the Docker image. You don't need to
300 build your own Docker image if you do not want to.
302 When developing new tests, there is one caveat though: The startup script of
303 the container will run a ``git-clean`` on its copy of the FRR tree to avoid any
304 pollution of the container with build artefacts from the host. This will also
305 result in your newly written tests being unavailable in the container unless at
306 least added to the index with ``git-add``.
308 If you do want to test changes to the Docker image, you can locally build the
309 image and run the tests without pulling from the registry using the following
315 TOPOTEST_PULL=0 make topotests
318 .. _topotests-guidelines:
326 To run the whole suite of tests the following commands must be executed at the
327 top level directory of topotest:
331 $ # Change to the top level directory of topotests.
332 $ cd path/to/topotests
333 $ # Tests must be run as root, since Mininet requires it.
336 In order to run a specific test, you can use the following command:
340 $ # running a specific topology
341 $ sudo pytest ospf-topo1/
342 $ # or inside the test folder
344 $ sudo pytest # to run all tests inside the directory
345 $ sudo pytest test_ospf_topo1.py # to run a specific test
346 $ # or outside the test folder
348 $ sudo pytest ospf-topo1/test_ospf_topo1.py # to run a specific one
350 The output of the tested daemons will be available at the temporary folder of
355 $ ls /tmp/topotest/ospf-topo1.test_ospf-topo1/r1
357 zebra.err # zebra stderr output
358 zebra.log # zebra log file
359 zebra.out # zebra stdout output
362 You can also run memory leak tests to get reports:
366 $ # Set the environment variable to apply to a specific test...
367 $ sudo env TOPOTESTS_CHECK_MEMLEAK="/tmp/memleak_report_" pytest ospf-topo1/test_ospf_topo1.py
368 $ # ...or apply to all tests adding this line to the configuration file
369 $ echo 'memleak_path = /tmp/memleak_report_' >> pytest.ini
370 $ # You can also use your editor
372 $ # After running tests you should see your files:
373 $ ls /tmp/memleak_report_*
374 memleak_report_test_ospf_topo1.txt
379 This section will guide you in all recommended steps to produce a standard
382 This is the recommended test writing routine:
384 - Write a topology (Graphviz recommended)
385 - Obtain configuration files
386 - Write the test itself
387 - Format the new code using `black <https://github.com/psf/black>`_
388 - Create a Pull Request
392 BGP tests MUST use generous convergence timeouts - you must ensure
393 that any test involving BGP uses a convergence timeout of at least
396 Topotest File Hierarchy
397 """""""""""""""""""""""
399 Before starting to write any tests one must know the file hierarchy. The
400 repository hierarchy looks like this:
404 $ cd path/to/topotest
407 ./README.md # repository read me
408 ./GUIDELINES.md # this file
409 ./conftest.py # test hooks - pytest related functions
410 ./example-test # example test folder
411 ./example-test/__init__.py # python package marker - must always exist.
412 ./example-test/test_template.jpg # generated topology picture - see next section
413 ./example-test/test_template.dot # Graphviz dot file
414 ./example-test/test_template.py # the topology plus the test
416 ./ospf-topo1 # the ospf topology test
417 ./ospf-topo1/r1 # router 1 configuration files
418 ./ospf-topo1/r1/zebra.conf # zebra configuration file
419 ./ospf-topo1/r1/ospfd.conf # ospf configuration file
420 ./ospf-topo1/r1/ospfroute.txt # 'show ip ospf' output reference file
421 # removed other for shortness sake
423 ./lib # shared test/topology functions
424 ./lib/topogen.py # topogen implementation
425 ./lib/topotest.py # topotest implementation
427 Guidelines for creating/editing topotest:
429 - New topologies that don't fit the existing directories should create its own
430 - Always remember to add the ``__init__.py`` to new folders, this makes auto
431 complete engines and pylint happy
432 - Router (Quagga/FRR) specific code should go on topotest.py
433 - Generic/repeated router actions should have an abstraction in
435 - Generic/repeated non-router code should go to topotest.py
436 - pytest related code should go to conftest.py (e.g. specialized asserts)
438 Defining the Topology
439 """""""""""""""""""""
441 The first step to write a new test is to define the topology. This step can be
442 done in many ways, but the recommended is to use Graphviz to generate a drawing
443 of the topology. It allows us to see the topology graphically and to see the
444 names of equipment, links and addresses.
446 Here is an example of Graphviz dot file that generates the template topology
447 :file:`tests/topotests/example-test/test_template.dot` (the inlined code might
448 get outdated, please see the linked file)::
470 label="s1\n192.168.0.0/24",
476 label="s2\n192.168.1.0/24",
482 r1 -- s1 [label="eth0\n.1"];
484 r1 -- s2 [label="eth1\n.100"];
485 r2 -- s2 [label="eth0\n.1"];
488 Here is the produced graph:
512 label="s1\n192.168.0.0/24",
518 label="s2\n192.168.1.0/24",
524 r1 -- s1 [label="eth0\n.1"];
526 r1 -- s2 [label="eth1\n.100"];
527 r2 -- s2 [label="eth0\n.1"];
530 Generating / Obtaining Configuration Files
531 """"""""""""""""""""""""""""""""""""""""""
533 In order to get the configuration files or command output for each router, we
534 need to run the topology and execute commands in ``vtysh``. The quickest way to
535 achieve that is writing the topology building code and running the topology.
537 To bootstrap your test topology, do the following steps:
539 - Copy the template test
544 $ touch new-topo/__init__.py
545 $ cp example-test/test_template.py new-topo/test_new_topo.py
547 - Modify the template according to your dot file
549 Here is the template topology described in the previous section in python code:
553 class TemplateTopo(Topo):
554 "Test topology builder"
555 def build(self, *_args, **_opts):
557 tgen = get_topogen(self)
560 for routern in range(1, 3):
561 tgen.add_router('r{}'.format(routern))
563 # Create a switch with just one router connected to it to simulate a
565 switch = tgen.add_switch('s1')
566 switch.add_link(tgen.gears['r1'])
568 # Create a connection between r1 and r2
569 switch = tgen.add_switch('s2')
570 switch.add_link(tgen.gears['r1'])
571 switch.add_link(tgen.gears['r2'])
575 Topogen allows us to run the topology without running any tests, you can do
576 that using the following example commands:
580 $ # Running your bootstraped topology
581 $ sudo pytest -s --topology-only new-topo/test_new_topo.py
582 $ # Running the test_template.py topology
583 $ sudo pytest -s --topology-only example-test/test_template.py
584 $ # Running the ospf_topo1.py topology
585 $ sudo pytest -s --topology-only ospf-topo1/test_ospf_topo1.py
587 Parameters explanation:
593 Actives input/output capture. This is required by mininet in order to show
594 the interactive shell.
596 .. option:: --topology-only
598 Don't run any tests, just build the topology.
600 After executing the commands above, you should get the following terminal
605 === test session starts ===
606 platform linux2 -- Python 2.7.12, pytest-3.1.2, py-1.4.34, pluggy-0.4.0
607 rootdir: /media/sf_src/topotests, inifile: pytest.ini
610 ospf-topo1/test_ospf_topo1.py *** Starting controller
612 *** Starting 6 switches
613 switch1 switch2 switch3 switch4 switch5 switch6 ...
614 r2: frr zebra started
615 r2: frr ospfd started
616 r3: frr zebra started
617 r3: frr ospfd started
618 r1: frr zebra started
619 r1: frr ospfd started
620 r4: frr zebra started
621 r4: frr ospfd started
625 The last line shows us that we are now using the Mininet CLI (Command Line
626 Interface), from here you can call your router ``vtysh`` or even bash.
628 Here are some commands example:
632 mininet> r1 ping 10.0.3.1
633 PING 10.0.3.1 (10.0.3.1) 56(84) bytes of data.
634 64 bytes from 10.0.3.1: icmp_seq=1 ttl=64 time=0.576 ms
635 64 bytes from 10.0.3.1: icmp_seq=2 ttl=64 time=0.083 ms
636 64 bytes from 10.0.3.1: icmp_seq=3 ttl=64 time=0.088 ms
638 --- 10.0.3.1 ping statistics ---
639 3 packets transmitted, 3 received, 0% packet loss, time 1998ms
640 rtt min/avg/max/mdev = 0.083/0.249/0.576/0.231 ms
644 mininet> r1 ping 10.0.3.3
645 PING 10.0.3.3 (10.0.3.3) 56(84) bytes of data.
646 64 bytes from 10.0.3.3: icmp_seq=1 ttl=64 time=2.87 ms
647 64 bytes from 10.0.3.3: icmp_seq=2 ttl=64 time=0.080 ms
648 64 bytes from 10.0.3.3: icmp_seq=3 ttl=64 time=0.091 ms
650 --- 10.0.3.3 ping statistics ---
651 3 packets transmitted, 3 received, 0% packet loss, time 2003ms
652 rtt min/avg/max/mdev = 0.080/1.014/2.872/1.313 ms
658 Hello, this is FRRouting (version 3.1-devrzalamena-build).
659 Copyright 1996-2005 Kunihiro Ishiguro, et al.
661 frr-1# show running-config
662 Building configuration...
664 Current configuration:
666 frr version 3.1-devrzalamena-build
667 frr defaults traditional
669 no service integrated-vtysh-config
676 ip address 10.0.3.1/24
679 ip address 10.0.10.1/24
682 ip address 172.16.0.2/24
685 ospf router-id 10.0.255.3
687 redistribute connected
689 network 10.0.3.0/24 area 0
690 network 10.0.10.0/24 area 0
691 network 172.16.0.0/24 area 1
698 After you successfully configured your topology, you can obtain the
699 configuration files (per-daemon) using the following commands:
703 mininet> r3 vtysh -d ospfd
705 Hello, this is FRRouting (version 3.1-devrzalamena-build).
706 Copyright 1996-2005 Kunihiro Ishiguro, et al.
708 frr-1# show running-config
709 Building configuration...
711 Current configuration:
713 frr version 3.1-devrzalamena-build
714 frr defaults traditional
715 no service integrated-vtysh-config
720 ospf router-id 10.0.255.3
722 redistribute connected
724 network 10.0.3.0/24 area 0
725 network 10.0.10.0/24 area 0
726 network 172.16.0.0/24 area 1
736 Test topologies should always be bootstrapped from
737 :file:`tests/topotests/example-test/test_template.py` because it contains
738 important boilerplate code that can't be avoided, like:
740 - imports: os, sys, pytest, topotest/topogen and mininet topology class
741 - The global variable CWD (Current Working directory): which is most likely
742 going to be used to reference the routers configuration file location
748 # For all registered routers, load the zebra configuration file
749 for rname, router in router_list.items():
752 os.path.join(CWD, '{}/zebra.conf'.format(rname))
754 # os.path.join() joins the CWD string with arguments adding the necessary
755 # slashes ('/'). Arguments must not begin with '/'.
757 - The topology class that inherits from Mininet Topo class:
761 class TemplateTopo(Topo):
762 def build(self, *_args, **_opts):
763 tgen = get_topogen(self)
764 # topology build code
766 - pytest ``setup_module()`` and ``teardown_module()`` to start the topology
770 def setup_module(_m):
771 tgen = Topogen(TemplateTopo)
772 tgen.start_topology('debug')
774 def teardown_module(_m):
778 - ``__main__`` initialization code (to support running the script directly)
782 if __name__ == '__main__':
783 sys.exit(pytest.main(["-s"]))
787 - Test code should always be declared inside functions that begin with the
788 ``test_`` prefix. Functions beginning with different prefixes will not be run
790 - Configuration files and long output commands should go into separated files
791 inside folders named after the equipment.
792 - Tests must be able to run without any interaction. To make sure your test
793 conforms with this, run it without the :option:`-s` parameter.
794 - Use `black <https://github.com/psf/black>`_ code formatter before creating
795 a pull request. This ensures we have a unified code style.
796 - Mark test modules with pytest markers depending on the daemons used during the
801 - Keep results in stack variables, so people inspecting code with ``pdb`` can
802 easily print their values.
808 assert foobar(router1, router2)
814 result = foobar(router1, router2)
817 - Use ``assert`` messages to indicate where the test failed.
823 for router in router_list:
825 assert condition, 'Router "{}" condition failed'.format(router.name)
830 The most effective ways to inspect topology tests are:
832 - Run pytest with ``--pdb`` option. This option will cause a pdb shell to
833 appear when an assertion fails
835 Example: ``pytest -s --pdb ospf-topo1/test_ospf_topo1.py``
837 - Set a breakpoint in the test code with ``pdb``
843 # Add the pdb import at the beginning of the file
847 # Add a breakpoint where you think the problem is
853 The `Python Debugger <https://docs.python.org/2.7/library/pdb.html>`__ (pdb)
854 shell allows us to run many useful operations like:
856 - Setting breaking point on file/function/conditions (e.g. ``break``,
858 - Inspecting variables (e.g. ``p`` (print), ``pp`` (pretty print))
859 - Running python code
863 The TopoGear (equipment abstraction class) implements the ``__str__`` method
864 that allows the user to inspect equipment information.
866 Example of pdb usage:
870 > /media/sf_src/topotests/ospf-topo1/test_ospf_topo1.py(121)test_ospf_convergence()
871 -> for rnum in range(1, 5):
873 Documented commands (type help <topic>):
874 ========================================
875 EOF bt cont enable jump pp run unt
876 a c continue exit l q s until
877 alias cl d h list quit step up
878 args clear debug help n r tbreak w
879 b commands disable ignore next restart u whatis
880 break condition down j p return unalias where
882 Miscellaneous help topics:
883 ==========================
886 Undocumented commands:
887 ======================
891 116 title2="Expected output")
893 118 def test_ospf_convergence():
894 119 "Test OSPF daemon convergence"
896 121 -> for rnum in range(1, 5):
897 122 router = 'r{}'.format(rnum)
899 124 # Load expected results from the command
900 125 reffile = os.path.join(CWD, '{}/ospfroute.txt'.format(router))
901 126 expected = open(reffile).read()
903 > /media/sf_src/topotests/ospf-topo1/test_ospf_topo1.py(122)test_ospf_convergence()
904 -> router = 'r{}'.format(rnum)
906 > /media/sf_src/topotests/ospf-topo1/test_ospf_topo1.py(125)test_ospf_convergence()
907 -> reffile = os.path.join(CWD, '{}/ospfroute.txt'.format(router))
912 (Pdb) tgen = get_topogen()
913 (Pdb) pp tgen.gears[router]
914 <lib.topogen.TopoRouter object at 0x7f74e06c9850>
915 (Pdb) pp str(tgen.gears[router])
916 'TopoGear<name="r1",links=["r1-eth0"<->"s1-eth0","r1-eth1"<->"s3-eth0"]> TopoRouter<>'
919 121 for rnum in range(1, 5):
920 122 router = 'r{}'.format(rnum)
922 124 # Load expected results from the command
923 125 -> reffile = os.path.join(CWD, '{}/ospfroute.txt'.format(router))
924 126 expected = open(reffile).read()
926 128 # Run test function until we get an result. Wait at most 60 seconds.
927 129 test_func = partial(compare_show_ip_ospf, router, expected)
928 130 result, diff = topotest.run_and_expect(test_func, '',
929 (Pdb) router1 = tgen.gears[router]
930 (Pdb) router1.vtysh_cmd('show ip ospf route')
931 '============ OSPF network routing table ============\r\nN 10.0.1.0/24 [10] area: 0.0.0.0\r\n directly attached to r1-eth0\r\nN 10.0.2.0/24 [20] area: 0.0.0.0\r\n via 10.0.3.3, r1-eth1\r\nN 10.0.3.0/24 [10] area: 0.0.0.0\r\n directly attached to r1-eth1\r\nN 10.0.10.0/24 [20] area: 0.0.0.0\r\n via 10.0.3.1, r1-eth1\r\nN IA 172.16.0.0/24 [20] area: 0.0.0.0\r\n via 10.0.3.1, r1-eth1\r\nN IA 172.16.1.0/24 [30] area: 0.0.0.0\r\n via 10.0.3.1, r1-eth1\r\n\r\n============ OSPF router routing table =============\r\nR 10.0.255.2 [10] area: 0.0.0.0, ASBR\r\n via 10.0.3.3, r1-eth1\r\nR 10.0.255.3 [10] area: 0.0.0.0, ABR, ASBR\r\n via 10.0.3.1, r1-eth1\r\nR 10.0.255.4 IA [20] area: 0.0.0.0, ASBR\r\n via 10.0.3.1, r1-eth1\r\n\r\n============ OSPF external routing table ===========\r\n\r\n\r\n'
932 (Pdb) tgen.mininet_cli()
936 To enable more debug messages in other Topogen subsystems (like Mininet), more
937 logging messages can be displayed by modifying the test configuration file
943 # Change the default verbosity line from 'info'...
948 Instructions for use, write or debug topologies can be found in :ref:`topotests-guidelines`.
949 To learn/remember common code snippets see :ref:`topotests-snippets`.
951 Before creating a new topology, make sure that there isn't one already that
952 does what you need. If nothing is similar, then you may create a new topology,
953 preferably, using the newest template
954 (:file:`tests/topotests/example-test/test_template.py`).
956 .. include:: topotests-markers.rst
958 .. include:: topotests-snippets.rst
963 All the configs and scripts are licensed under a ISC-style license. See Python