#NEWLINE# def test_set_bfd_ip( self ) : #NEWLINE# #INDENT# bfd_addr = '10.10.4.101' #NEWLINE# cases = [ ( bfd_addr , None , None , ( 'vrrp %d bfd ip %s' % ( upd_vrid , bfd_addr ) ) ) , ( None , True , None , ( 'no vrrp %d bfd ip' % upd_vrid ) ) , ( None , None , True , ( 'default vrrp %d bfd ip' % upd_vrid ) ) , ( None , True , True , ( 'default vrrp %d bfd ip' % upd_vrid ) ) ] #NEWLINE# for ( bfd_ip , disable , default , cmd ) in cases : #NEWLINE# #INDENT# func = function ( 'set_bfd_ip' , upd_intf , upd_vrid , value = bfd_ip , disable = disable , default = default ) #NEWLINE# exp_cmds = ( [ upd_cmd ] + [ cmd ] ) #NEWLINE# self . eapi_positive_config_test ( func , exp_cmds ) #NEWLINE# #UNINDENT# cases = [ 'abc' , 500 , '101.101' ] #NEWLINE# for bfd_ip in cases : #NEWLINE# #INDENT# func = function ( 'set_bfd_ip' , upd_intf , upd_vrid , value = bfd_ip ) #NEWLINE# self . eapi_exception_config_test ( func , ValueError )