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

Reuse service id for patch #326

Merged
merged 6 commits into from
Sep 5, 2024
Merged

Reuse service id for patch #326

merged 6 commits into from
Sep 5, 2024

Conversation

congwang09
Copy link
Contributor

Relates to: #238, #235

Add a MongoDB collection "historical_connections" for saving the historical connections. Use service_id as key, a list of connection json as value. Example:

'e7fdf472-547d-455c-9c5c-b49c0a0d2974': ['{"name": "VLAN between AMPATH/300 and TENET/300", "endpoints": [{"id": "urn:sdx:port:ampath.net:Novi03:1", "name": "urn:sdx:port:ampath.net:Novi03:1", "vlan_range": 300}, {"id": "urn:sdx:port:tenet.ac.za:Novi07:1", "name": "urn:sdx:port:tenet.ac.za:Novi07:1", "vlan_range": 300}], "id": "e7fdf472-547d-455c-9c5c-b49c0a0d2974"}', '{"name": "VLAN between AMPATH/300 and TENET/300", "endpoints": [{"id": "urn:sdx:port:ampath.net:Novi03:1", "name": "urn:sdx:port:ampath.net:Novi03:1", "vlan_range": 300}, {"id": "urn:sdx:port:tenet.ac.za:Novi07:1", "name": "urn:sdx:port:tenet.ac.za:Novi07:1", "vlan_range": 300}], "id": "e7fdf472-547d-455c-9c5c-b49c0a0d2974"}']

And enable using same service_id when doing PATCH

@coveralls
Copy link

coveralls commented Sep 5, 2024

Pull Request Test Coverage Report for Build 10729515210

Details

  • 15 of 21 (71.43%) changed or added relevant lines in 4 files are covered.
  • 4 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.1%) to 57.757%

Changes Missing Coverage Covered Lines Changed/Added Lines %
sdx_controller/controllers/l2vpn_controller.py 0 2 0.0%
sdx_controller/handlers/connection_handler.py 13 17 76.47%
Files with Coverage Reduction New Missed Lines %
sdx_controller/utils/db_utils.py 4 85.23%
Totals Coverage Status
Change from base Build 10726011800: 0.1%
Covered Lines: 1052
Relevant Lines: 1885

💛 - Coveralls

Copy link
Collaborator

@YufengXin YufengXin left a comment

Choose a reason for hiding this comment

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

For historical records: they might ask for timestamp information, ie, when the event happened. Just a note for future action....

@congwang09
Copy link
Contributor Author

For historical records: they might ask for timestamp information, ie, when the event happened. Just a note for future action....

That's a great point, updated to include a timestamp in seconds. It's like this now:

'22a4c098-f476-4611-9462-bd2054111b87': [
'{"1725577581": {"name": "VLAN between AMPATH/300 and TENET/300", "endpoints": [{"id": "urn:sdx:port:ampath.net:Novi03:1", "name": "urn:sdx:port:ampath.net:Novi03:1", "vlan_range": 300}, {"id": "urn:sdx:port:tenet.ac.za:Novi07:1", "name": "urn:sdx:port:tenet.ac.za:Novi07:1", "vlan_range": 300}], "id": "22a4c098-f476-4611-9462-bd2054111b87"}}', 
'{"1725577589": {"name": "VLAN between AMPATH/300 and TENET/300", "endpoints": [{"id": "urn:sdx:port:ampath.net:Novi03:1", "name": "urn:sdx:port:ampath.net:Novi03:1", "vlan_range": 300}, {"id": "urn:sdx:port:tenet.ac.za:Novi07:1", "name": "urn:sdx:port:tenet.ac.za:Novi07:1", "vlan_range": 300}], "id": "22a4c098-f476-4611-9462-bd2054111b87"}}'
]

@congwang09 congwang09 merged commit c906388 into main Sep 5, 2024
11 checks passed
@congwang09 congwang09 deleted the reuse-service-id-for-patch branch September 5, 2024 23:12
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.

3 participants