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 commandline option for removal of specific nodes #78

Merged
merged 1 commit into from
Apr 6, 2016
Merged

add commandline option for removal of specific nodes #78

merged 1 commit into from
Apr 6, 2016

Conversation

rotanid
Copy link

@rotanid rotanid commented Mar 2, 2016

this command line option allows you to remove the information about a specific node from the data.
the node to be removed is chosen by its MAC address.

@tcatm
Copy link

tcatm commented Mar 2, 2016

Looks useful! Can you change it to use the node id instead of the mac? The mac may not be present for all nodes.

@rotanid
Copy link
Author

rotanid commented Mar 2, 2016

actually i forgot to add the "parser.add_argument", fixed it.

as the majority of nodes have a mac, would it be sufficient for you to internally remove the colons from the parameter, if there are any, and use it as the nodeid?
if i only have the mac of a node i'd need to manually remove all the colons otherwise before calling the script...

@jplitza
Copy link
Member

jplitza commented Mar 2, 2016

As usual, I don't see how this is useful. Can you please provide a use case? If possible one where "removing all the colons" is easier than "taking the node id"?

@rotanid
Copy link
Author

rotanid commented Mar 2, 2016

use case for the whole thing or taking the mac instead of the node id?

if mac: the mac is on the box of the router, it can be used to determine its ipv6 address and thus it's the thing that get's documented by me and others in my community as the nodes individual identifier. the node id on the other hand... i didn't need it so far for anything...

if whole thing: we already have it in our fork, i just thought i contribute upstream - if you don't want it, leave it...

@tcatm
Copy link

tcatm commented Mar 2, 2016

I guess the common workflow would be to copy&paste the node id from a frontend (e.g. meshviewer). I actually did this manually in the past using jq. There really is no relation between the node id and a node's MAC and nodes aren't required to submit a MAC. Therefore, the node id should be used.

The usecase is valid and the main problem to be solved are race conditions when the backend is run by a cronjob.

@rotanid
Copy link
Author

rotanid commented Mar 2, 2016

ok, i updated the PR to use the nodeid

can't test it though at the moment

@rotanid
Copy link
Author

rotanid commented Mar 4, 2016

tested it now and it seems to work like intended

@rotanid
Copy link
Author

rotanid commented Apr 5, 2016

if you still have objections, please close it instead of ignoring it ;-)

@tcatm tcatm merged commit cc12658 into ffnord:dev Apr 6, 2016
@rotanid rotanid deleted the prune-mac branch April 6, 2016 22:03
egon0 added a commit to FreifunkJena/ffmap-backend that referenced this pull request Apr 17, 2016
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.

None yet

3 participants