kytos / flow_manager

MIT License
1 stars 16 forks source link

Add support for non-strict exclusion in the consistency check #117

Closed cmagnobarbosa closed 3 years ago

cmagnobarbosa commented 3 years ago

Pull Request Template

:octocat: Are you working on some issue? Identify the issue!

Fix #114 Related #113

:bookmark_tabs: Description of the Change

Add support for non-strict exclusion in the consistency check.

Example of a request supported by the consistency check after this modification.

/DELETE

{
          "cookie": 6191162389751548793,
           "cookie_mask": 18446744073709551615
}

Important

Mask fields are applied to the IP address and the cookie field.

:computer: Verification Process

:page_facing_up: Release Notes

References

italovalcy commented 3 years ago

Hello folks,

Just to give you a feedback about this PR, after applying it on the flow_manager napp, the end-to-end tests related to issue #114 are no longer failing, which is great. Furthermore, no other test failed because of this patch, which is also good.

Before the patch:

...
tests/test_e2e_10_mef_eline.py ......FF....                              [ 51%]
...
____ TestE2EMefEline.test_040_disable_circuit_should_remove_openflow_rules _____

self = <tests.test_e2e_10_mef_eline.TestE2EMefEline instance at 0x7fb33ff4c0e0>

   def test_040_disable_circuit_should_remove_openflow_rules(self):
   ...
     assert len(flows_s1.split('\r\n ')) == 1
E       assert 3 == 1
..tests/test_e2e_10_mef_eline.py:378: AssertionError
TestE2EMefEline.test_045_create_circuit_reusing_same_vlanid_from_previous_evc _

self = <tests.test_e2e_10_mef_eline.TestE2EMefEline instance at 0x7fb33ffc3200>

   def test_045_create_circuit_reusing_same_vlanid_from_previous_evc(self):
...
       response = requests.post(api_url, data=json.dumps(payload), headers={'Content-type': 'application/json'})
     assert response.status_code == 201
E       assert 409 == 201
E        +  where 409 = <Response [409]>.status_code

tests/test_e2e_10_mef_eline.py:441: AssertionError

After applying the patch:

tests/test_e2e_10_mef_eline.py ............                                                                                             [ 51%]