#NEWLINE# def do_no_ip( self , * args ) : #NEWLINE# #INDENT# if 'address' . startswith ( args [ 0 ] ) : #NEWLINE# #INDENT# if ( len ( args ) == 1 ) : #NEWLINE# #INDENT# self . port . ips = [ ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ip = IPNetwork ( ( '%s/%s' % ( args [ 1 ] , args [ 2 ] ) ) ) #NEWLINE# is_secondary = ( 'secondary' . startswith ( args [ 3 ] ) if ( len ( args ) == 4 ) else False ) #NEWLINE# if is_secondary : #NEWLINE# #INDENT# self . port . remove_ip ( ip ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( len ( self . port . ips ) == 1 ) : #NEWLINE# #INDENT# self . port . remove_ip ( ip ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . write_line ( 'Must delete secondary before deleting primary' ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if 'access-group' . startswith ( args [ 0 ] ) : #NEWLINE# #INDENT# direction = args [ ( - 1 ) ] #NEWLINE# if 'in' . startswith ( direction ) : #NEWLINE# #INDENT# self . port . access_group_in = None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if 'out' . startswith ( direction ) : #NEWLINE# #INDENT# self . port . access_group_out = None #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if 'vrf' . startswith ( args [ 0 ] ) : #NEWLINE# #INDENT# if 'forwarding' . startswith ( args [ 1 ] ) : #NEWLINE# #INDENT# self . port . vrf = None #NEWLINE# #UNINDENT# #UNINDENT# if 'redirects' . startswith ( args [ 0 ] ) : #NEWLINE# #INDENT# self . port . ip_redirect = False #NEWLINE# #UNINDENT# if 'helper-address' . startswith ( args [ 0 ] ) : #NEWLINE# #INDENT# if ( len ( args ) > 2 ) : #NEWLINE# #INDENT# self . write_line ( ' ^' ) #NEWLINE# self . write_line ( "% Invalid input detected at '^' marker." ) #NEWLINE# self . write_line ( '' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( len ( args ) == 1 ) : #NEWLINE# #INDENT# self . port . ip_helpers = [ ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ip_address = IPAddress ( args [ 1 ] ) #NEWLINE# if ( ip_address in self . port . ip_helpers ) : #NEWLINE# #INDENT# self . port . ip_helpers . remove ( ip_address )