Feature/ip cidr conversion#103
Merged
alagoutte merged 8 commits intoJan 14, 2025
Merged
Conversation
- Add UseCIDRNotation configuration option - Add Convert-AbrFgtSubnetToCIDR function for IP/subnet conversion - Implement CIDR conversion in firewall, route, system, and VPN IPsec sections - Add error handling and maintain backward compatibility
msoukhomlinov
marked this pull request as draft
January 13, 2025 09:37
msoukhomlinov
marked this pull request as ready for review
January 13, 2025 09:41
alagoutte
requested changes
Jan 13, 2025
alagoutte
left a comment
Collaborator
There was a problem hiding this comment.
Some minor change and it will be good !
add good idea also for Options
Thanks !
alagoutte
reviewed
Jan 13, 2025
…hell 5.1 compatible one-liners
Contributor
Author
|
Done |
Collaborator
|
Merged, Thanks max! |
Contributor
Author
|
@alagoutte , on a slightly different topic, would you happen to know owner of PScribo? If so, would you be able to see if he could take a look at this pull request for me? This is the enhanced table function I earlier tried to add to this module but then decided that its better to reside higher up stream. |
Collaborator
|
No but i will see what it is possible ! |
Collaborator
|
Hi Mark, look there is some issue when i try... (i need look why) May be also enable the feature by default ? |
alagoutte
pushed a commit
that referenced
this pull request
Jun 27, 2025
* Add CIDR notation support for IP addresses and subnets - Add UseCIDRNotation configuration option - Add Convert-AbrFgtSubnetToCIDR function for IP/subnet conversion - Implement CIDR conversion in firewall, route, system, and VPN IPsec sections - Add error handling and maintain backward compatibility * Add OutputType attributes to Convert-AbrFgtSubnetToCIDR functions * Add UseCIDRNotation option and convert CIDR notation checks to PowerShell 5.1 compatible one-liners
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add CIDR Notation Support for IP Addresses and Subnets
Overview
This PR adds the ability to display IP addresses and subnet masks in CIDR notation throughout the report. The feature is configurable through a new option in the JSON configuration file.
New Configuration Option
{ "Report": { "InfoLevel": { "UseCIDRNotation": false } } }New Functions
Added new private functions in
Src/Private/Convert-AbrFgtSubnetToCIDR.ps1:Convert-AbrFgtSubnetToCIDR: Converts IP/subnet pairs to CIDR notationConvert-AbrFgtSubnetMaskToCIDR: Helper function for subnet mask conversionModified Files
Get-AbrFgtFirewall.ps1
Get-AbrFgtRoute.ps1
ip_mask)Get-AbrFgtSystem.ps1
Get-AbrFgtVPNIPsec.ps1
Feature Behavior
When UseCIDRNotation = true
When UseCIDRNotation = false
Error Handling
Testing