Skip to content

Commit 15df1cc

Browse files
itdependsnetworksjeffkalaqduk
authored
Acl check (#290)
Co-authored-by: Jeff Kala <[email protected]> Co-authored-by: Adam Byczkowski <[email protected]>
1 parent a98264e commit 15df1cc

File tree

22 files changed

+2136
-29
lines changed

22 files changed

+2136
-29
lines changed

.bandit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
exclude_dirs:
44
- "./tests/"
55
- "./docs/"
6-
- "netutils/oui_mappings.py"
6+
- "netutils/data_files/"

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,10 @@ jobs:
204204
run: "docker image ls"
205205
- name: "Run Tests"
206206
run: "poetry run invoke pytest"
207-
- name: "Install Napalm"
208-
run: "pip install napalm"
207+
- name: "Install Optional Dependencies"
208+
run: "poetry run poetry install --extras optionals"
209209
- name: "Run Optional Tests"
210-
run: "poetry run pytest tests/unit/test_lib_helpers_optionals.py"
210+
run: "poetry run pytest tests/unit/test_lib_helpers_optionals.py tests/unit/test_acl.py"
211211
needs:
212212
- "pylint"
213213
publish_gh:

docs/assets/acl-workflow.drawio

Lines changed: 367 additions & 0 deletions
Large diffs are not rendered by default.

docs/dev/code_reference/acl.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# ACLs
2+
3+
::: netutils.acl
4+
options:
5+
show_submodules: True
File renamed without changes.

docs/images/acl-workflow.png

120 KB
Loading

docs/user/include_jinja_list.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
| get_broadcast_address | netutils.ip.get_broadcast_address |
3535
| get_first_usable | netutils.ip.get_first_usable |
3636
| get_peer_ip | netutils.ip.get_peer_ip |
37+
| get_range_ips | netutils.ip.get_range_ips |
3738
| get_usable_range | netutils.ip.get_usable_range |
3839
| ip_addition | netutils.ip.ip_addition |
3940
| ip_subtract | netutils.ip.ip_subtract |
@@ -44,7 +45,10 @@
4445
| ipaddress_network | netutils.ip.ipaddress_network |
4546
| is_classful | netutils.ip.is_classful |
4647
| is_ip | netutils.ip.is_ip |
48+
| is_ip_range | netutils.ip.is_ip_range |
49+
| is_ip_within | netutils.ip.is_ip_within |
4750
| is_netmask | netutils.ip.is_netmask |
51+
| is_network | netutils.ip.is_network |
4852
| netmask_to_cidr | netutils.ip.netmask_to_cidr |
4953
| get_napalm_getters | netutils.lib_helpers.get_napalm_getters |
5054
| get_oui | netutils.mac.get_oui |

docs/user/lib_use_cases.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Functions are grouped with like functions, such as IP or MAC address based funct
2626
- Protocol Mapper - Provides a mapping for protocol names to numbers and vice versa.
2727
- Regex - Provide convenience methods for regex to be used in Jinja2.
2828
- Route - Provides the ability to provide a list of routes and an IP Address and return the longest prefix matched route.
29-
- Time -Provides the ability to convert between integer time and string times.
29+
- Time - Provides the ability to convert between integer time and string times.
3030
- VLANs - Provide the ability to convert configuration into lists or lists into configuration.
3131

3232
## Examples

docs/user/lib_use_cases_acl.md

Lines changed: 304 additions & 0 deletions
Large diffs are not rendered by default.

mkdocs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ nav:
106106
- Jinja Filters: "user/lib_use_cases_jinja_filters.md"
107107
- Library Mapper: "user/lib_use_cases_lib_mapper.md"
108108
- Protocol Mapper: "user/lib_use_cases_protocol_mappers.md"
109+
- ACL: "user/lib_use_cases_acl.md"
109110
- Upgrade Paths: "user/lib_upgrade_paths.md"
110111
- Getting Started: "user/lib_getting_started.md"
111112
- Frequently Asked Questions: "user/faq.md"
@@ -128,10 +129,12 @@ nav:
128129
- Contributing to the Library: "dev/contributing.md"
129130
- Development Environment: "dev/dev_environment.md"
130131
- Config Parser Development: "dev/dev_config.md"
132+
- Arch Decision Records: "dev/dev_adr.md"
131133
- Code Attribution to the Library: "dev/attribution.md"
132134
- Code Reference:
133135
- "dev/code_reference/index.md"
134136
- ASN: "dev/code_reference/asn.md"
137+
- ACL: "dev/code_reference/acl.md"
135138
- Bandwidth: "dev/code_reference/bandwidth.md"
136139
- Banner: "dev/code_reference/banner.md"
137140
- Configs: "dev/code_reference/configs.md"

0 commit comments

Comments
 (0)