kytos-ng / of_core

Kytos Main OpenFlow Network Application (NApp)
MIT License
0 stars 5 forks source link

Integration test update #85

Closed Alopalao closed 2 years ago

Alopalao commented 2 years ago

Issue: #68 Progress on updating integration test. test_execute() is still hanging. napp.controller.buffers.msg_out.get() has no events and hangs. test_handle_multipart_reply() fails. napp._multipart_replies_xids is not being populated at all. test_handle_port_desc_multipart_reply() has more events. Code change for _handle_multipart_reply() from:

stats_event = KytosEvent(name=event_name,
                                 content={'source': switch.connection,
                                          'message': port_desc})
napp.handle_multipart_reply(stats_event)

To:

stats_event = KytosEvent(name=event_name,
                                 content={'source': switch.connection,
                                          'message': port_desc})
reply = stats_event.content['message']
event_switch = stats_event.source.switch
await napp._handle_multipart_reply(reply, event_switch)

Produces more events:

{'switch': '00:00:00:00:00:00:00:02', 'port': 7, 'port_description': {'alias': 'Port7', 'mac': 'f2:0b:a4:d0:3f:70', 'state': 4}}
{'interface': Interface('Port7', 7, Switch('4'))}
{'switch': '00:00:00:00:00:00:00:02', 'port': 6, 'port_description': {'alias': 'Port6', 'mac': 'f2:0b:a4:7d:f8:ea', 'state': 4}}
{'interface': Interface('Port6', 6, Switch('4'))}
{'interfaces': [Interface('Port7', 7, Switch('4')), Interface('Port6', 6, Switch('4'))]}
{'switch': '00:00:00:00:00:00:00:02', 'port': 7, 'port_description': {'alias': 'Port7', 'mac': 'f2:0b:a4:d0:3f:70', 'state': 4}}
{'interface': Interface('Port7', 7, Switch('00:00:00:00:00:00:00:02'))}
{'switch': '00:00:00:00:00:00:00:02', 'port': 6, 'port_description': {'alias': 'Port6', 'mac': 'f2:0b:a4:7d:f8:ea', 'state': 4}}
Alopalao commented 2 years ago

Please ignore the print()'s. Soon to be deleted in the next commit.