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 purge-port scipt to allow deleting of ports from the CLI. #7528

Merged
merged 2 commits into from Nov 9, 2017

Conversation

Projects
None yet
6 participants
@BarbarossaTM
Contributor

BarbarossaTM commented Oct 23, 2017

This script allows deleting single ports by their port_id or a list
of ports read from a file or STDIN.

LibreNMS Port purge tool
-p <port_id> Purge single port by it's port-id
-f Purge a list of ports, read port-ids from , one on each line.
A filename of - means reading from STDIN.

Signed-off-by: Maximilian Wilhelm max@sdn.clinic

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

@CLAassistant

This comment has been minimized.

Show comment
Hide comment
@CLAassistant

CLAassistant Oct 23, 2017

CLA assistant check
All committers have signed the CLA.

CLAassistant commented Oct 23, 2017

CLA assistant check
All committers have signed the CLA.

@laf

This comment has been minimized.

Show comment
Hide comment
@laf

laf Oct 30, 2017

Member

Thought I'd responded to this already.

@BarbarossaTM Can you sign the CLA + Also take a look at travis as you have some code styling issues. https://travis-ci.org/librenms/librenms/builds/291562436?utm_source=github_status&utm_medium=notification

Member

laf commented Oct 30, 2017

Thought I'd responded to this already.

@BarbarossaTM Can you sign the CLA + Also take a look at travis as you have some code styling issues. https://travis-ci.org/librenms/librenms/builds/291562436?utm_source=github_status&utm_medium=notification

@BarbarossaTM

This comment has been minimized.

Show comment
Hide comment
@BarbarossaTM

BarbarossaTM Oct 30, 2017

Contributor

Hey @laf

Do I have to accept the CLA again? Did so last year already :-)

I fixed the "null"s as well as the "Space before opening parenthesis of function call prohibited" (which are bad for readability IMHO, but ok, your style guidlines), but I don't get what's wrong with the if/while. Does it complain about a missing block for the follwing single line?

Best
Max

Contributor

BarbarossaTM commented Oct 30, 2017

Hey @laf

Do I have to accept the CLA again? Did so last year already :-)

I fixed the "null"s as well as the "Space before opening parenthesis of function call prohibited" (which are bad for readability IMHO, but ok, your style guidlines), but I don't get what's wrong with the if/while. Does it complain about a missing block for the follwing single line?

Best
Max

@laf

This comment has been minimized.

Show comment
Hide comment
@laf

laf Oct 30, 2017

Member

@BarbarossaTM We switched to a new CLA so yes you'll need to re-sign, just click the link from the bot above.

As for the style guides. We follow psr-2 so if () { is required.

Member

laf commented Oct 30, 2017

@BarbarossaTM We switched to a new CLA so yes you'll need to re-sign, just click the link from the bot above.

As for the style guides. We follow psr-2 so if () { is required.

@BarbarossaTM

This comment has been minimized.

Show comment
Hide comment
@BarbarossaTM

BarbarossaTM Oct 30, 2017

Contributor

@laf I see. Signed the CLA via the link above and added some {} into the code. This should be according the style guidelines now.

Best
Max

Contributor

BarbarossaTM commented Oct 30, 2017

@laf I see. Signed the CLA via the link above and added some {} into the code. This should be according the style guidelines now.

Best
Max

@laf

I've made a few small changes. Aside from that, this needs moving into the scripts dir and a document adding.

Probably doc/Support/CLI-Tools.md

Then edit mkdocs.yaml and under:

- 11. Misc:

Add:

     - CLI Scripts: Support/CLI-Tools.md
@laf

This comment has been minimized.

Show comment
Hide comment
@laf
Member

laf commented Nov 5, 2017

BarbarossaTM and others added some commits Oct 23, 2017

Add purge-port scipt to allow deleting of ports from the CLI.
  This script allows deleting single ports by their port_id or a list
  of ports read from a file or STDIN.

  LibreNMS Port purge tool
        -p <port_id>    Purge single port by it's port-id
        -f <file>       Purge a list of ports, read port-ids from <file>, one on each line.
                        A filename of - means reading from STDIN.

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
@scrutinizer-notifier

This comment has been minimized.

Show comment
Hide comment
@scrutinizer-notifier

scrutinizer-notifier commented Nov 8, 2017

A new inspection was created.

@laf

laf approved these changes Nov 8, 2017

LGTM.

@librenms/reviewers anyone else?

@f0o

f0o approved these changes Nov 9, 2017

@laf laf merged commit 95024af into librenms:master Nov 9, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details
@lock

This comment has been minimized.

Show comment
Hide comment
@lock

lock bot May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

lock bot commented May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

@lock lock bot locked as resolved and limited conversation to collaborators May 17, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.