Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 10 commits into from
May 14, 2021

Conversation

cmagnobarbosa
Copy link
Member

@cmagnobarbosa cmagnobarbosa commented Apr 1, 2021

Pull Request Template

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

Fix #114
Related #113

📑 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.

💻 Verification Process

  • Manual tests and unit tests is still passing.

📄 Release Notes

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

References

Copy link
Member

@hdiogenes hdiogenes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be really nice if we could have some unit tests for the match functions.

settings.py Outdated Show resolved Hide resolved
match.py Outdated Show resolved Hide resolved
match.py Outdated Show resolved Hide resolved
match.py Outdated Show resolved Hide resolved
@cmagnobarbosa cmagnobarbosa force-pushed the match_flows branch 4 times, most recently from 87f9eae to e17fe6c Compare April 6, 2021 17:10
match.py Outdated Show resolved Hide resolved
match.py Outdated Show resolved Hide resolved
@italovalcy
Copy link
Contributor

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%]

tests/unit/test_main.py Outdated Show resolved Hide resolved
match.py Outdated Show resolved Hide resolved
match.py Show resolved Hide resolved
cmagnobarbosa and others added 7 commits May 10, 2021 11:37
Currently consistency check is not supported for no-strict deletion.
This modification begins to solve this problem by adding support for non-strict deletion using a cookie.
Co-authored-by: Humberto Diógenes <[email protected]>
Fix the masks in the non-strict delete operation.

Co-authored-by: Antonio Francisco <[email protected]>
Add unit test for non-strict delete using the cookie and IPv4 (OF 1.3) in the consistency check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disabled EVC leaves its flows in flow_manager
4 participants