#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# super ( TestTopology , self ) . setUp ( ) #NEWLINE# self . db_store = DbStore ( ) #NEWLINE# self . mock_nb_api = Mock ( name = 'nb_api' ) #NEWLINE# self . mock_openflow_app = Mock ( name = 'openflow_app' ) #NEWLINE# mock_controller = Mock ( name = 'controller' ) #NEWLINE# mock_controller . get_db_store . return_value = self . db_store #NEWLINE# mock_controller . get_nb_api . return_value = self . mock_nb_api #NEWLINE# mock_controller . get_openflow_app . return_value = self . mock_openflow_app #NEWLINE# mock_controller . get_chassis_name . return_value = 'test_chassis' #NEWLINE# self . mock_controller = mock_controller #NEWLINE# self . topology = Topology ( self . mock_controller , True ) #NEWLINE# value1 = Mock ( name = 'ovs_port' ) #NEWLINE# value1 . get_id . return_value = 'ovs_port1' #NEWLINE# value1 . get_ofport . return_value = 1 #NEWLINE# value1 . get_name . return_value = '' #NEWLINE# value1 . get_admin_state . return_value = 'True' #NEWLINE# value1 . get_type . return_value = 'vm' #NEWLINE# value1 . get_iface_id . return_value = 'lport1' #NEWLINE# value1 . get_peer . return_value = '' #NEWLINE# value1 . get_attached_mac . return_value = '' #NEWLINE# value1 . get_remote_ip . return_value = '' #NEWLINE# value1 . get_tunnel_type . return_value = '' #NEWLINE# self . ovs_port1 = OvsPort ( self ) #NEWLINE# self . lport1_value = '\n            {\n                "name": "lport1",\n                "chassis": "test_chassis",\n                "admin_state": "True",\n                "ips": ["192.168.10.1"],\n                "macs": ["112233445566"],\n                "lswitch": "lswitch1",\n                "topic": "tenant1"\n            }\n            ' #NEWLINE# self . lswitch1_value = '\n            {\n                "name": "lswitch1",\n                "subnets": ["subnet1"]\n            }\n        ' #NEWLINE# self . lport1 = LogicalPort ( self . lport1_value ) #NEWLINE# self . lswitch1 = LogicalSwitch ( self . lswitch1_value )