You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MacAddress objects are used to represent both the src_mac and port_id of packets in some functions. MacAddress objects should be used to represent mac values at all times, but due to Pythons use of duck-typing this has slipped through.
The documentation of Chewie claims MacAddress is expected and is assumed below port_up() / port_down() functions.
Change the tests provide the correct object type and clean the use of mac address.
There should be no need for the use of str(port_id) as the __str__ function should be called internally in the log/print functions.
The text was updated successfully, but these errors were encountered:
MacAddress objects are used to represent both the src_mac and port_id of packets in some functions. MacAddress objects should be used to represent mac values at all times, but due to Pythons use of duck-typing this has slipped through.
An example of this is here:
https://github.com/faucetsdn/chewie/blob/master/test/unit/test_chewie.py#L292-L299
https://github.com/faucetsdn/chewie/blob/master/test/unit/test_chewie_mocks.py#L47
The documentation of Chewie claims MacAddress is expected and is assumed below port_up() / port_down() functions.
Change the tests provide the correct object type and clean the use of mac address.
There should be no need for the use of str(port_id) as the
__str__
function should be called internally in the log/print functions.The text was updated successfully, but these errors were encountered: