-
Notifications
You must be signed in to change notification settings - Fork 3
make sure inter-domain links in the port_link_map #295
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
Conversation
Pull Request Test Coverage Report for Build 17327002424Details
💛 - Coveralls |
|
atlanticwave-sdx/sdx-controller#476 This PR will resolve multiple issues related to port and link (intra- and inter-) failure handling reported in sdx-controller. |
italovalcy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @YufengXin this PR along with SDX-Controller 476 is adding regressions as showed on the previews review and also reproduced below:
============================= test session starts ==============================
platform linux -- Python 3.11.2, pytest-7.2.1, pluggy-1.0.0+repack
rootdir: /sdx-end-to-end-tests
plugins: unordered-0.7.0
collected 92 items
tests/test_01_topology.py ..... [ 5%]
tests/test_05_l2vpn.py ........ [ 14%]
tests/test_06_l2vpn_return_codes.py .................................. [ 51%]
tests/test_07_l2vpn_return_codes.py ....................... [ 76%]
tests/test_08_l2vpn_return_codes.py ...... [ 82%]
tests/test_20_use_case_topology.py xx.xFxxF.xEEE [ 96%]
tests/test_99_topology_big_changes.py ... [100%]
==================================== ERRORS ====================================
_ ERROR at setup of TestE2ETopologyUseCases.test_081_link_missing_with_alternate_path _
cls = <class 'test_20_use_case_topology.TestE2ETopologyUseCases'>
@classmethod
def setup_method(cls):
"""Reset network configuration before each test."""
api_url = SDX_CONTROLLER + '/l2vpn/1.0'
response = requests.get(api_url)
assert response.status_code == 200, response.text
response_json = response.json()
for l2vpn in response_json:
response = requests.delete(api_url+f'/{l2vpn}')
> assert response.status_code == 200, response.text
E AssertionError: "Failed, reason: Unknown connection request (ID: 63fd714b-147d-454c-b8b0-f9335868af64)"
E
E assert 500 == 200
E + where 500 = <Response [500]>.status_code
tests/test_20_use_case_topology.py:63: AssertionError
_____ ERROR at setup of TestE2ETopologyUseCases.test_100_vlan_range_change _____
cls = <class 'test_20_use_case_topology.TestE2ETopologyUseCases'>
@classmethod
def setup_method(cls):
"""Reset network configuration before each test."""
api_url = SDX_CONTROLLER + '/l2vpn/1.0'
response = requests.get(api_url)
assert response.status_code == 200, response.text
response_json = response.json()
for l2vpn in response_json:
response = requests.delete(api_url+f'/{l2vpn}')
> assert response.status_code == 200, response.text
E AssertionError: "Failed, reason: Unknown connection request (ID: 63fd714b-147d-454c-b8b0-f9335868af64)"
E
E assert 500 == 200
E + where 500 = <Response [500]>.status_code
tests/test_20_use_case_topology.py:63: AssertionError
_ ERROR at setup of TestE2ETopologyUseCases.test_110_service_no_longer_supported _
cls = <class 'test_20_use_case_topology.TestE2ETopologyUseCases'>
@classmethod
def setup_method(cls):
"""Reset network configuration before each test."""
api_url = SDX_CONTROLLER + '/l2vpn/1.0'
response = requests.get(api_url)
assert response.status_code == 200, response.text
response_json = response.json()
for l2vpn in response_json:
response = requests.delete(api_url+f'/{l2vpn}')
> assert response.status_code == 200, response.text
E AssertionError: "Failed, reason: Unknown connection request (ID: 63fd714b-147d-454c-b8b0-f9335868af64)"
E
E assert 500 == 200
E + where 500 = <Response [500]>.status_code
tests/test_20_use_case_topology.py:63: AssertionError
=================================== FAILURES ===================================
________________ TestE2ETopologyUseCases.test_030_uni_port_down ________________
self = <test_20_use_case_topology.TestE2ETopologyUseCases object at 0x7fe8603f95d0>
def test_030_uni_port_down(self):
"""
Use case 3: OXPO sends a topology update with a Port Down and that port is an UNI for some L2VPN.
"""
l2vpn_data = self.create_new_l2vpn(vlan='300')
l2vpn_id = l2vpn_data['id']
# Get UNI ports
port = 'urn:sdx:port:tenet.ac.za:Tenet01:50'
response = requests.get(API_URL_TOPO)
data = response.json()
ports = {port["id"] for node in data["nodes"] for port in node["ports"] if port['nni'] == ''}
assert port in ports
Tenet01 = self.net.net.get('Tenet01')
Tenet01.intf('Tenet01-eth50').ifconfig('down')
time.sleep(15)
data = requests.get(API_URL).json()
> assert data[l2vpn_id]["status"] == "down"
E AssertionError: assert 'up' == 'down'
E - down
E + up
tests/test_20_use_case_topology.py:324: AssertionError
_________________ TestE2ETopologyUseCases.test_060_port_up_uni _________________
self = <test_20_use_case_topology.TestE2ETopologyUseCases object at 0x7fe8603fb390>
def test_060_port_up_uni(self):
"""
Use Case 6: OXPO sends a topology update with a Port UP and that port is UNI for some L2VPNs.
Expected behavior:
SDX Controller: update the statuses involved. Use Case 3 is explicit saying the configs should not be removed in case of a Port Down
which means the data plane config is already there.
"""
l2vpn_data = self.create_new_l2vpn(vlan='600')
l2vpn_id = l2vpn_data['id']
# Simulate UNI port going down
ampath_node = self.net.net.get('Ampath1')
ampath_node.intf('Ampath1-eth50').ifconfig('down')
time.sleep(15)
# Verify L2VPN status is down
response = requests.get(API_URL)
assert response.status_code == 200, response.text
l2vpn_response = response.json()
assert l2vpn_id in l2vpn_response
> assert l2vpn_response.get(l2vpn_id).get("status") == "down", str(l2vpn_response)
E AssertionError: {'91d7037c-3f2b-438b-9c64-140e6cfb2ec6': {'archived_date': 0, 'current_path': [{'port_id': 'urn:sdx:port:ampath.net:Ampath1:50', 'vlan': '600'}, {'port_id': 'urn:sdx:port:ampath.net:Ampath1:40', 'vlan': '1'}, {'port_id': 'urn:sdx:port:sax.net:Sax01:40', 'vlan': '1'}, {'port_id': 'urn:sdx:port:sax.net:Sax01:41', 'vlan': '1'}, {'port_id': 'urn:sdx:port:tenet.ac.za:Tenet01:41', 'vlan': '1'}, {'port_id': 'urn:sdx:port:tenet.ac.za:Tenet01:50', 'vlan': '600'}], 'description': None, 'endpoints': [{'port_id': 'urn:sdx:port:ampath.net:Ampath1:50', 'vlan': '600'}, {'port_id': 'urn:sdx:port:tenet.ac.za:Tenet01:50', 'vlan': '600'}], 'name': 'Test L2VPN', 'oxp_response': {'ampath.net': [200, {'circuit_id': 'f86e6cea00c043', 'deployed': True}], 'sax.net': [200, {'circuit_id': '4b981bd301804d', 'deployed': True}], 'tenet.ac.za': [200, {'circuit_id': '7eebdbc670b14c', 'deployed': True}]}, 'service_id': '91d7037c-3f2b-438b-9c64-140e6cfb2ec6', 'status': 'up'}}
E assert 'up' == 'down'
E - down
E + up
tests/test_20_use_case_topology.py:469: AssertionError
------------------------------- start/stop times -------------------------------
tests/test_20_use_case_topology.py::TestE2ETopologyUseCases::test_030_uni_port_down: 2025-08-06,19:48:22.789116 - 2025-08-06,19:48:46.040081
tests/test_20_use_case_topology.py::TestE2ETopologyUseCases::test_060_port_up_uni: 2025-08-06,19:50:03.276855 - 2025-08-06,19:50:26.508738
=========================== short test summary info ============================
FAILED tests/test_20_use_case_topology.py::TestE2ETopologyUseCases::test_030_uni_port_down
FAILED tests/test_20_use_case_topology.py::TestE2ETopologyUseCases::test_060_port_up_uni
ERROR tests/test_20_use_case_topology.py::TestE2ETopologyUseCases::test_081_link_missing_with_alternate_path
ERROR tests/test_20_use_case_topology.py::TestE2ETopologyUseCases::test_100_vlan_range_change
ERROR tests/test_20_use_case_topology.py::TestE2ETopologyUseCases::test_110_service_no_longer_supported
======== 2 failed, 81 passed, 6 xfailed, 3 errors in 1565.49s (0:26:05) ========
Merge branch 'main' into 294-full-path-link-failure-handling
The upstream PR in sdx-controller has been approved and merged.
No description provided.