#NEWLINE# def do_standby( self , group , command , * args ) : #NEWLINE# #INDENT# vrrp = self . port . get_vrrp_group ( group ) #NEWLINE# if ( vrrp is None ) : #NEWLINE# #INDENT# vrrp = self . switch_configuration . new ( 'VRRP' , group ) #NEWLINE# self . port . vrrps . append ( vrrp ) #NEWLINE# #UNINDENT# if 'ip' . startswith ( command ) : #NEWLINE# #INDENT# if ( len ( args ) == 0 ) : #NEWLINE# #INDENT# vrrp . ip_addresses = ( vrrp . ip_addresses or [ ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ip = _parse_ip ( args [ 0 ] ) #NEWLINE# if ( ip is not None ) : #NEWLINE# #INDENT# in_networks = any ( ( ( ip in net ) for net in self . port . ips ) ) #NEWLINE# if in_networks : #NEWLINE# #INDENT# vrrp . ip_addresses = ( vrrp . ip_addresses or [ ] ) #NEWLINE# if ( ( len ( args ) > 1 ) and 'secondary' . startswith ( args [ 1 ] ) ) : #NEWLINE# #INDENT# vrrp . ip_addresses . append ( ip ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# vrrp . ip_addresses = ( [ ip ] + vrrp . ip_addresses [ 1 : ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . write_line ( '% Warning: address is not within a subnet on this interface' ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . write_line ( ' ^' ) #NEWLINE# self . write_line ( "% Invalid input detected at '^' marker." ) #NEWLINE# self . write_line ( '' ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if 'timers' . startswith ( command ) : #NEWLINE# #INDENT# vrrp . timers_hello = args [ 0 ] #NEWLINE# vrrp . timers_hold = args [ 1 ] #NEWLINE# #UNINDENT# if 'priority' . startswith ( command ) : #NEWLINE# #INDENT# vrrp . priority = args [ 0 ] #NEWLINE# #UNINDENT# if 'authentication' . startswith ( command ) : #NEWLINE# #INDENT# vrrp . authentication = args [ 0 ] #NEWLINE# #UNINDENT# if ( 'track' . startswith ( command ) and 'decrement' . startswith ( args [ 1 ] ) ) : #NEWLINE# #INDENT# vrrp . track . update ( { #NEWLINE# #INDENT# args [ 0 ] : args [ 2 ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# if 'preempt' . startswith ( command ) : #NEWLINE# #INDENT# vrrp . preempt = True #NEWLINE# if ( ( len ( args ) > 0 ) and ( ' ' . join ( args [ 0 : 2 ] ) == 'delay minimum' ) ) : #NEWLINE# #INDENT# vrrp . preempt_delay_minimum = args [ 2 ]