Ejemplo n.º 1
0
 def test_load_tracerequest_with_bridge(self):
     """ Test that a trace request can be loaded with a router port """
     vt_data = yaml.load("""
 tracerequests:
     - tracerequest:
         name: TRACEREQUEST_0
         bridge: BRIDGE-000-000
         tp_src: 12345
         tp_dst: 8080
         enabled: false""")
     tracerequest_data = vt_data['tracerequests'][0].get('tracerequest')
     tracerequest = TraceRequest(self._api, self._context,
                                 tracerequest_data)
     tracerequest.build()
     self._mn_tracerequest.set_bridge.assert_called_with(self.deviceid)
     self._mn_tracerequest.tp_src.assert_called_with(12345)
     self._mn_tracerequest.tp_dst.assert_called_with(8080)
     self._mn_tracerequest.set_enabled.assert_called_with(False)
     self._mn_tracerequest.set_name.assert_called_with("TRACEREQUEST_0")
Ejemplo n.º 2
0
 def add_tracerequest(self, tracerequest_data):
     tracerequest = TraceRequest(self._api, self, tracerequest_data)
     tracerequest.build()
     self._tracerequests[tracerequest_data['name']] = tracerequest
Ejemplo n.º 3
0
 def add_tracerequest(self, tracerequest_data):
     tracerequest = TraceRequest(self._api, self, tracerequest_data)
     tracerequest.build()
     self._tracerequests[tracerequest_data['name']] = tracerequest