Skip to content

Commit

Permalink
Acl check (networktocode#290)
Browse files Browse the repository at this point in the history
Co-authored-by: Jeff Kala <48843785+jeffkala@users.noreply.github.com>
Co-authored-by: Adam Byczkowski <38091261+qduk@users.noreply.github.com>
  • Loading branch information
3 people authored Aug 18, 2023
1 parent a98264e commit 15df1cc
Show file tree
Hide file tree
Showing 22 changed files with 2,136 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 @@ -34,6 +34,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 @@ -44,7 +45,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 @@ -26,7 +26,7 @@ Functions are grouped with like functions, such as IP or MAC address based funct
- Protocol Mapper - Provides a mapping for protocol names to numbers and vice versa.
- Regex - Provide convenience methods for regex to be used in Jinja2.
- 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
304 changes: 304 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 @@ -106,6 +106,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 @@ -128,10 +129,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 15df1cc

Please sign in to comment.