Skip to content

Commit

Permalink
Add ACL class, create several ip functions in the process
Browse files Browse the repository at this point in the history
  • Loading branch information
itdependsnetworks committed Aug 2, 2023
1 parent cd7d728 commit 83abaee
Show file tree
Hide file tree
Showing 22 changed files with 2,123 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .bandit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
exclude_dirs:
- "./tests/"
- "./docs/"
- "netutils/oui_mappings.py"
- "netutils/data_files/"
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,10 @@ jobs:
run: "docker image ls"
- name: "Run Tests"
run: "poetry run invoke pytest"
- name: "Install Napalm"
run: "pip install napalm"
- name: "Install Optional Dependencies"
run: "poetry run poetry install --extras optionals"
- name: "Run Optional Tests"
run: "poetry run pytest tests/unit/test_lib_helpers_optionals.py"
run: "poetry run pytest tests/unit/test_lib_helpers_optionals.py tests/unit/test_acl.py"
needs:
- "pylint"
publish_gh:
Expand Down
367 changes: 367 additions & 0 deletions docs/assets/acl-workflow.drawio

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions docs/dev/code_reference/acl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# ACLs

::: netutils.acl
options:
show_submodules: True
File renamed without changes.
Binary file added docs/images/acl-workflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/user/include_jinja_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
| get_broadcast_address | netutils.ip.get_broadcast_address |
| get_first_usable | netutils.ip.get_first_usable |
| get_peer_ip | netutils.ip.get_peer_ip |
| get_range_ips | netutils.ip.get_range_ips |
| get_usable_range | netutils.ip.get_usable_range |
| ip_addition | netutils.ip.ip_addition |
| ip_subtract | netutils.ip.ip_subtract |
Expand All @@ -43,7 +44,10 @@
| ipaddress_network | netutils.ip.ipaddress_network |
| is_classful | netutils.ip.is_classful |
| is_ip | netutils.ip.is_ip |
| is_ip_range | netutils.ip.is_ip_range |
| is_ip_within | netutils.ip.is_ip_within |
| is_netmask | netutils.ip.is_netmask |
| is_network | netutils.ip.is_network |
| netmask_to_cidr | netutils.ip.netmask_to_cidr |
| get_napalm_getters | netutils.lib_helpers.get_napalm_getters |
| get_oui | netutils.mac.get_oui |
Expand Down
2 changes: 1 addition & 1 deletion docs/user/lib_use_cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Functions are grouped with like functions, such as IP or MAC address based funct
- Ping - Provides the ability to ping, currently only tcp ping.
- Protocol Mapper - Provides a mapping for protocol names to numbers and vice versa.
- Route - Provides the ability to provide a list of routes and an IP Address and return the longest prefix matched route.
- Time -Provides the ability to convert between integer time and string times.
- Time - Provides the ability to convert between integer time and string times.
- VLANs - Provide the ability to convert configuration into lists or lists into configuration.

## Examples
Expand Down
302 changes: 302 additions & 0 deletions docs/user/lib_use_cases_acl.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ nav:
- Jinja Filters: "user/lib_use_cases_jinja_filters.md"
- Library Mapper: "user/lib_use_cases_lib_mapper.md"
- Protocol Mapper: "user/lib_use_cases_protocol_mappers.md"
- ACL: "user/lib_use_cases_acl.md"
- Upgrade Paths: "user/lib_upgrade_paths.md"
- Getting Started: "user/lib_getting_started.md"
- Frequently Asked Questions: "user/faq.md"
Expand All @@ -122,10 +123,12 @@ nav:
- Contributing to the Library: "dev/contributing.md"
- Development Environment: "dev/dev_environment.md"
- Config Parser Development: "dev/dev_config.md"
- Arch Decision Records: "dev/dev_adr.md"
- Code Attribution to the Library: "dev/attribution.md"
- Code Reference:
- "dev/code_reference/index.md"
- ASN: "dev/code_reference/asn.md"
- ACL: "dev/code_reference/acl.md"
- Bandwidth: "dev/code_reference/bandwidth.md"
- Banner: "dev/code_reference/banner.md"
- Configs: "dev/code_reference/configs.md"
Expand Down
Loading

0 comments on commit 83abaee

Please sign in to comment.