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
WIP - Rewrite Wireless Controller polling #13198
base: master
Are you sure you want to change the base?
Conversation
@ottorei Excited to see this, let us know if you have any questions :D |
f8dd68f
to
c9cfbee
Compare
e78a6dd
to
b083381
Compare
b083381
to
6f5a9be
Compare
I am having some issues with the syncmodel as for some reason it can not sync on dev machine. I think this has something do to with the DB being empty. Call to a member function getCompositeKey() on null |
app/Models/AccessPoint.php
Outdated
return "$this->mac_addr-$this->radio_number"; | ||
} | ||
|
||
public function setOffline() |
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.
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.
With this implemented, I would just need to use withThrashed to get all aps?
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.
@ottorei correct
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.
and it stores the deleted date, so we can do a cleanup.
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.
and it stores the deleted date, so we can do a cleanup.
Yes, with a user configurable amount of days.
With the latest commit, APs can now be saved and the error message is no longer present after polling. |
Would need to convert the existing wireless controllers code use this new module. The Aruba one seems to be working to some extent but I have not started the work with others yet. |
(Rerunning tests) |
Converted the Cisco WLC to the new module. Not really tested yet. |
Still not quite sure what to do with the soft deleted models. The existing alert rules for "deleted" APs will break with this PR if the deleted-field is removed from the DB. What kind of approach should I take here to still allow users to make alert rules with the query builder for these @murrant ? A macro...? |
Please note we got stricter php linting now, it's 99% about type hinting. But the tests will tell you what to do :) |
…ibrenms into accesspoint-duplicates
Are you sure the existing rule will break? Type juggling might make them work still. Also, see #13480 to merge all files to one RRD scheme. |
Yes, since the existing database column is named "deleted". But I remember that alert was not on the list of predefined rules. |
Apply fixes from StyleCI
…ibrenms into accesspoint-duplicates
@ottorei for alerting, we have in the past updated existing alert rules in the db. |
You mean the sample rules? |
No, I mean direct in the database ;) |
Modernize old code for wireless controllers polling. Work in progress.
TODO:
Notice: Each AP is uniquely distinguished by it's MAC-address + radionumber. This should work for most devices and would allow the AP to be moved to another controller without issues on the NMS.
Please note
Testers
If you would like to test this pull request then please run:
./scripts/github-apply <pr_id>
, i.e./scripts/github-apply 13198
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.