| | 206 | Lastly, the topology and network objects are instantiated and everything is started up (and shut down) in the `__main__` section of the network setup script: |
| | 207 | |
| | 208 | {{{#!python |
| | 209 | if __name__ == '__main__': |
| | 210 | ... |
| | 211 | topo = TutorialTopo() |
| | 212 | net = Mininet( topo=topo, controller=None ) |
| | 213 | restServer = RestServer( net ) |
| | 214 | net.start() |
| | 215 | restServer.start() |
| | 216 | netconfServer = NetconfServer( |
| | 217 | net, username=username, password=password, sslkeyfile=sslkeyfile ) |
| | 218 | netconfServer.start() |
| | 219 | ... |
| | 220 | if 'test' in argv: |
| | 221 | test(net) |
| | 222 | else: |
| | 223 | info(TutorialTopo.__doc__+'\n') |
| | 224 | CLI(net) |
| | 225 | netconfServer.stop() |
| | 226 | restServer.stop() |
| | 227 | net.stop() |
| | 228 | info( 'Done.\n') |
| | 229 | }}} |