#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# super ( TestCSR1kvHotplug , self ) . setUp ( ) #NEWLINE# device_params = { #NEWLINE# #INDENT# 'management_ip_address' : 'fake_ip' , #NEWLINE# 'protocol_port' : 22 , #NEWLINE# 'credentials' : { #NEWLINE# #INDENT# 'user_name' : 'stack' , #NEWLINE# 'password' : 'cisco' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'timeout' : None , #NEWLINE# #UNINDENT# } #NEWLINE# self . driver = csr_driver . CSR1kvHotPlugRoutingDriver ( ** device_params ) #NEWLINE# self . driver . _csr_conn = self . mock_conn #NEWLINE# self . driver . _check_response = mock . MagicMock ( return_value = True ) #NEWLINE# self . driver . _get_vrfs = mock . Mock ( return_value = [ self . vrf ] ) #NEWLINE# self . interface = 'GigabitEthernet0' #NEWLINE# self . mac = 'be:ef:de:ad:be:ef' #NEWLINE# self . ex_gw_mac = 'ca:fe:de:ad:be:ef' #NEWLINE# self . ex_gw_int = 'GigabitEthernet1' #NEWLINE# self . hosting_port_name = 'hostingport_12345' #NEWLINE# self . port [ 'mac_address' ] = device_params . mac #NEWLINE# self . port [ 'hosting_info' ] [ 'hosting_mac' ] = self . mac #NEWLINE# self . port [ 'hosting_info' ] [ 'hosting_port_name' ] = self . hosting_port_name #NEWLINE# self . ex_gw_netmask = netaddr . IPNetwork ( self . ex_gw_cidr ) . netmask #NEWLINE# self . ex_gw_port [ 'hosting_info' ] [ 'hosting_mac' ] = self . ex_gw_mac #NEWLINE# ret_VNIC = { #NEWLINE# #INDENT# netaddr . EUI ( self . mac ) : self . interface , #NEWLINE# netaddr . EUI ( self . ex_gw_mac ) : self . ex_gw_int , #NEWLINE# #UNINDENT# } #NEWLINE# self . driver . _get_VNIC_mapping = mock . MagicMock ( return_value = ret_VNIC )