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 MPLS Support #10263

Merged
merged 11 commits into from Jun 6, 2019

Conversation

Projects
None yet
2 participants
@vitalisator
Copy link
Contributor

commented May 25, 2019

This introduce the generic MPLS support

  • New database tables for MPLS LSPs and MPLS LSP Paths
  • Actually discovery and polling on NOKIA SR OS (Timetra) devices
  • New routing->MPLS HTML pages

Global MPLS view
image

Device MPLS view
image

Suggestions and improvements are welcome

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926
After you are done testing, you can remove the changes with ./scripts/github-remove. If there are schema changes, you can ask on discord how to revert.

vitalisator added some commits May 25, 2019

WIP - Add MPLS Support
This introduce the generic MPLS support
- New database tables for MPLS LSPs
- actually discovery and polling on NOKIA SR OS (Timetra) devices
- new routing->MPLS HTML pages

- ToDo MPLS LSP paths table and views
Suggestions and improvements are welcome

@vitalisator vitalisator changed the title WIP - Add MPLS Support Add MPLS Support May 28, 2019

@murrant
Copy link
Member

left a comment

Thanks a lot @vitalisator
You should base modules off of the new style like the Nac module.
I notice you updated the test module table info, but did not add test data. You will need that :)

Show resolved Hide resolved includes/defaults.inc.php Outdated
@vitalisator

This comment has been minimized.

Copy link
Contributor Author

commented May 29, 2019

@murrant, have not really idea how to do "new style" or even where to start.
I would give it a try if you give me some advice :-)

Can I just put my code inside public functions poll and discover?
But I think there is more to do...

@murrant

This comment has been minimized.

Copy link
Member

commented May 29, 2019

Basically, but you would be missing out if you don't use Eloquent to update the DB, it replaces 90% of the code... You could convert it in steps.

Since you've added test data, I could take a crack some time.

Convert MPLS module to new style
Implement a SyncsModels trait to simplify code a lot
@murrant

This comment has been minimized.

Copy link
Member

commented Jun 6, 2019

@vitalisator ok, I updated this to the new style (and improved the infrastructure for that a bit) Can you test it?

I did change the migration because vRtrMplsLspPathStatTable is not in the test data so, trying to save nulls to the DB for that data caused the queries to fail. Perhaps more or less fields should be nullable?

vitalisator and others added some commits Jun 6, 2019

@vitalisator

This comment has been minimized.

Copy link
Contributor Author

commented Jun 6, 2019

LGTM

@murrant murrant merged commit 00b148d into librenms:master Jun 6, 2019

4 of 6 checks passed

Travis CI - Pull Request Build Failed
Details
codeclimate 16 issues to fix
Details
Inspection Summary
Details
Node: analysis
Details
WIP Ready for review
Details
license/cla Contributor License Agreement is signed.
Details

@vitalisator vitalisator deleted the vitalisator:mpls-lsp branch Jun 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.