Revision 07aad110 mininet/cli.py

View differences:

mininet/cli.py
157 157
        else:
158 158
            self.mn.link( *args )
159 159

  
160
    def do_pause( self, args ):
161
        "Temporarily bring a node down."
162
        args = args.split()
163
        if len(args) != 1:
164
            error( 'invalid number of args: pause [node]\n' )
165
        elif args[0] not in self.nodemap:
166
            error( 'invalid node: %s\n' % args[0] )
167
        else:
168
            self.nodemap[ args[ 0 ] ].pause()
169

  
170
    def do_resume( self, args ):
171
        "Temporarily bring a node up."
172
        args = args.split()
173
        if len(args) != 1:
174
            error( 'invalid number of args: resume [node]\n' )
175
        elif args[0] not in self.nodemap:
176
            error( 'invalid node: %s\n' % args[0] )
177
        else:
178
            self.nodemap[ args[ 0 ] ].resume()
179

  
160 180
    def do_exit( self, args ):
161 181
        "Exit"
162 182
        return 'exited by user command'

Also available in: Unified diff