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 new options to import IPs/hostnames, and filter IP family output #27

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

felddy
Copy link
Member

@felddy felddy commented Jun 22, 2023

🗣 Description

This PR adds the ability to include one or more files with lists of IPs and hostnames.
It also adds flags for filtering out IPv4 or IPv6 address from the generated output.

Closes #25
Closes #26

💭 Motivation and context

Features requested by @bra1ncramp in issues:

🧪 Testing

Tested on local development machine and in continuous integration.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated
    to reflect the changes in this PR.
  • All new and existing tests pass.

mcdonnnj and others added 4 commits June 22, 2023 11:51
This is done automatically with the `pre-commit autoupdate` command.
Allows import of lists of static IPs and host names.
Add flags to filter IPv4 or IPv6 addresses from output.
@felddy felddy added the improvement This issue or pull request will add or improve functionality, maintainability, or ease of use label Jun 22, 2023
@felddy felddy self-assigned this Jun 22, 2023
Copy link
Member

@jsf9k jsf9k left a comment

Choose a reason for hiding this comment

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

I have one minor comment.

# If there were unresolved hostnames, log an error and terminate the program
logging.error(
f"Could not resolve the following hostnames: {', '.join(dns_errors)}"
)
Copy link
Member

Choose a reason for hiding this comment

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

Do you need to shutdown logging even when you exit uncleanly?

Suggested change
)
)
logging.shutdown()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement This issue or pull request will add or improve functionality, maintainability, or ease of use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add argument for v4_only=True Allow list of STATIC ROUTES
3 participants