Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
class MininetCliDriver( Emulator ):

        def __init__( self ):
            super( MininetCliDriver, self ).__init__()
            self.handle = self

        def connect( self, user_name, ip_address, pwd, options ):
            self.handle = super( MininetCliDriver, self ).connect( user_name, ip_address, pwd )

Here the connect will call the inherited connect() method from CLI driver (via Emulator class).

...

 

Code Block
languagepy
main.Cluster.active( 0 ).devices()

can be used instead of

Code Block
languagepy
main.ONOScli1.devices()

and keeps the same context as the former. This can be helpful in tests where the number of ONOS nodes is not static throughout the test.

However, if the function name is similar across more than one driver, the driver name will need to be specified.  For example, in

Code Block
main.Cluster.active( 0 ).CLI.sendline( "roles" )

"CLI" must be specified to avoid ambiguity.  

...

Stuck? Found a bug? Questions?

Email us if you’re stuck, think you’ve found a bug, or just want to send some feedback. Please have a look at the guidelines to learn how to efficiently submit a bug report.

...