Skip to content

Commit db8cfca

Browse files
committed
Cookie updated by NetworkToCode Cookie Drift Manager Tool
Template: ``` { "template": "https://github.com/networktocode-llc/cookiecutter-ntc.git", "dir": "python", "ref": "jlk-more-fixes-sadface", "path": null } ``` Cookie: ``` { "remote": "https://github.com/networktocode/netutils.git", "path": "/Users/jeffkala/Documents/GitHub/outputs/netutils", "repository_path": "/Users/jeffkala/Documents/GitHub/outputs/netutils", "dir": "", "branch_prefix": "drift-manager", "context": { "codeowner_github_usernames": "@itdependsnetworks @jeffkala @qduk", "full_name": "Network to Code, LLC", "email": "[email protected]", "github_org": "networktocode", "description": "Common helper functions useful in network automation.", "project_name": "netutils", "project_slug": "netutils", "repo_url": "https://github.com/networktocode/netutils", "base_url": "netutils", "project_python_name": "netutils", "project_python_base_version": "3.10", "project_with_config_settings": "no", "generate_docs": "yes", "version": "1.15.1", "original_publish_year": "2021", "_template": "https://github.com/networktocode-llc/cookiecutter-ntc.git", "_output_dir": "/Users/jeffkala/Documents/GitHub/outputs", "_repo_dir": "/Users/jeffkala/.cookiecutters/cookiecutter-ntc/python", "_checkout": "jlk-more-fixes-sadface" }, "base_branch": "develop", "remote_name": "origin", "pull_request_strategy": "PullRequestStrategy.CREATE", "post_actions": [], "baked_commit_ref": "cb8b5e31dece5ab2663d2ffd218a96ca1ae794c5", "draft": false } ``` CLI Arguments: ``` { "cookie_dir": "", "input": true, "json_filename": "", "output_dir": "../outputs", "push": true, "template": "https://github.com/networktocode-llc/cookiecutter-ntc.git", "template_dir": "python", "template_ref": "jlk-more-fixes-sadface", "pull_request": null, "post_action": [], "disable_post_actions": false, "draft": null } ```
1 parent 985fd84 commit db8cfca

File tree

19 files changed

+317
-19
lines changed

19 files changed

+317
-19
lines changed

.cookiecutter.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,37 @@
22
"cookiecutter": {
33
"codeowner_github_usernames": "@itdependsnetworks @jeffkala @qduk",
44
"full_name": "Network to Code, LLC",
5-
"email": "info@networktocode.com",
5+
"email": "opensource@networktocode.com",
66
"github_org": "networktocode",
77
"description": "Common helper functions useful in network automation.",
88
"project_name": "netutils",
99
"project_slug": "netutils",
1010
"repo_url": "https://github.com/networktocode/netutils",
1111
"base_url": "netutils",
1212
"project_python_name": "netutils",
13+
<<<<<<< HEAD
1314
"project_python_base_version": "3.9",
15+
=======
16+
"project_python_base_version": "3.10",
17+
>>>>>>> f4d378c (Cookie updated by NetworkToCode Cookie Drift Manager Tool)
1418
"project_with_config_settings": "no",
1519
"generate_docs": "yes",
1620
"version": "1.15.1",
21+
"original_publish_year": "2021",
1722
"_drift_manager": {
1823
"template": "https://github.com/networktocode-llc/cookiecutter-ntc.git",
1924
"template_dir": "python",
20-
"template_ref": "main",
25+
"template_ref": "jlk-more-fixes-sadface",
2126
"cookie_dir": "",
2227
"branch_prefix": "drift-manager",
2328
"pull_request_strategy": "create",
2429
"post_actions": [],
2530
"draft": false,
31+
<<<<<<< HEAD
2632
"baked_commit_ref": "cb8b5e31dece5ab2663d2ffd218a96ca1ae794c5"
33+
=======
34+
"baked_commit_ref": "9155484a0981e21768ebe7d0181dfa1a233cd6c4"
35+
>>>>>>> f4d378c (Cookie updated by NetworkToCode Cookie Drift Manager Tool)
2736
}
2837
}
2938
}

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ about: Report a reproducible bug in the current release of netutils
44
---
55

66
### Environment
7-
* Python version: <!-- Example: 3.9 -->
7+
* Python version: <!-- Example: 3.10 -->
88
* netutils version: <!-- Example: 1.0.0 -->
99

1010
<!-- What did you expect to happen? -->

.github/workflows/ci.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ on: # yamllint disable-line rule:truthy rule:comments
88
branches:
99
- "main"
1010
- "develop"
11-
tags:
12-
- "v*"
1311
pull_request: ~
1412

1513
env:
@@ -86,10 +84,6 @@ jobs:
8684
poetry-version: "2.1.3"
8785
- name: "Checking: poetry lock file"
8886
run: "poetry run invoke lock --check"
89-
needs:
90-
- "ruff-format"
91-
- "ruff-lint"
92-
- "yamllint"
9387
yamllint:
9488
runs-on: "ubuntu-latest"
9589
env:
@@ -103,17 +97,23 @@ jobs:
10397
poetry-version: "2.1.3"
10498
- name: "Linting: yamllint"
10599
run: "poetry run invoke yamllint"
100+
check-in-docker:
106101
needs:
107102
- "ruff-format"
108103
- "ruff-lint"
109-
pylint:
104+
- "poetry"
105+
- "yamllint"
110106
runs-on: "ubuntu-latest"
111107
strategy:
112108
fail-fast: true
113109
matrix:
110+
<<<<<<< HEAD
114111
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
112+
=======
113+
python-version: ["3.10", "3.13"]
114+
>>>>>>> f4d378c (Cookie updated by NetworkToCode Cookie Drift Manager Tool)
115115
env:
116-
PYTHON_VER: "${{ matrix.python-version }}"
116+
INVOKE_NETUTILS_PYTHON_VER: "${{ matrix.python-version }}"
117117
steps:
118118
- name: "Check out repository code"
119119
uses: "actions/checkout@v4"
@@ -141,16 +141,20 @@ jobs:
141141
PYTHON_VER=${{ env.PYTHON_VER }}
142142
- name: "Linting: Pylint"
143143
run: "poetry run invoke pylint"
144-
needs:
145-
- "poetry"
146144
pytest:
145+
needs:
146+
- "check-in-docker"
147147
strategy:
148148
fail-fast: true
149149
matrix:
150+
<<<<<<< HEAD
150151
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
152+
=======
153+
python-version: ["3.10", "3.11", "3.12", "3.13"]
154+
>>>>>>> f4d378c (Cookie updated by NetworkToCode Cookie Drift Manager Tool)
151155
runs-on: "ubuntu-latest"
152156
env:
153-
PYTHON_VER: "${{ matrix.python-version }}"
157+
INVOKE_NETUTILS_PYTHON_VER: "${{ matrix.python-version }}"
154158
steps:
155159
- name: "Check out repository code"
156160
uses: "actions/checkout@v4"
@@ -178,8 +182,6 @@ jobs:
178182
PYTHON_VER=${{ env.PYTHON_VER }}
179183
- name: "Run Tests"
180184
run: "poetry run invoke pytest"
181-
needs:
182-
- "poetry"
183185
changelog:
184186
if: >
185187
contains(fromJson('["develop"]'), github.base_ref) &&
@@ -198,6 +200,7 @@ jobs:
198200
run: |
199201
git fetch --no-tags origin +refs/heads/${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }}
200202
poetry run towncrier check --compare-with origin/${{ github.base_ref }}
203+
<<<<<<< HEAD
201204
publish_gh:
202205
name: "Publish to GitHub"
203206
runs-on: "ubuntu-latest"
@@ -294,3 +297,5 @@ jobs:
294297
env:
295298
SLACK_WEBHOOK_URL: "${{ secrets.SLACK_WEBHOOK_URL }}"
296299
SLACK_WEBHOOK_TYPE: "INCOMING_WEBHOOK"
300+
=======
301+
>>>>>>> f4d378c (Cookie updated by NetworkToCode Cookie Drift Manager Tool)

.github/workflows/release.yml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
---
2+
name: "Release"
3+
on: # yamllint disable-line rule:truthy rule:comments
4+
release:
5+
types: ["published"]
6+
7+
jobs:
8+
build:
9+
name: "Build package with poetry"
10+
runs-on: "ubuntu-latest"
11+
if: "startsWith(github.ref, 'refs/tags/v')"
12+
steps:
13+
- uses: "actions/checkout@v4"
14+
- name: "Setup environment"
15+
uses: "networktocode/gh-action-setup-poetry-environment@v6"
16+
with:
17+
poetry-version: "2.1.3"
18+
python-version: "3.13"
19+
poetry-install-options: "--no-root"
20+
- name: "Build Documentation"
21+
run: "poetry run invoke build-and-check-docs"
22+
- name: "Run Poetry Build"
23+
run: "poetry build"
24+
25+
- name: "Check that the release tag matches the version in pyproject.toml"
26+
run: |
27+
if [ "${{ github.ref_name }}" != "v$(poetry version -s)" ]; then exit 1; fi
28+
29+
- uses: "actions/upload-artifact@v4"
30+
with:
31+
name: "distfiles"
32+
path: "dist/"
33+
if-no-files-found: "error"
34+
35+
publish-github:
36+
name: "Publish to GitHub"
37+
runs-on: "ubuntu-latest"
38+
if: "startsWith(github.ref, 'refs/tags/v')"
39+
permissions:
40+
contents: "write"
41+
needs: "build"
42+
steps:
43+
- uses: "actions/checkout@v4"
44+
- name: "Retrieve built package from cache"
45+
uses: "actions/download-artifact@v4"
46+
with:
47+
name: "distfiles"
48+
path: "dist/"
49+
50+
- name: "Upload binaries to release"
51+
run: "gh release upload ${{ github.ref_name }} dist/*.{tar.gz,whl}"
52+
env:
53+
GH_TOKEN: "${{ secrets.NTC_GITHUB_TOKEN }}"
54+
55+
publish-pypi:
56+
name: "Push Package to PyPI"
57+
runs-on: "ubuntu-latest"
58+
if: "startsWith(github.ref, 'refs/tags/v')"
59+
needs: "build"
60+
environment: "pypi"
61+
permissions:
62+
# IMPORTANT: this permission is mandatory for Trusted Publishing
63+
id-token: "write"
64+
steps:
65+
- name: "Retrieve built package from cache"
66+
uses: "actions/download-artifact@v4"
67+
with:
68+
name: "distfiles"
69+
path: "dist/"
70+
71+
- name: "Publish package distributions to PyPI"
72+
uses: "pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e" # v1.13.0
73+
74+
slack-notify:
75+
needs:
76+
- "publish-github"
77+
- "publish-pypi"
78+
runs-on: "ubuntu-latest"
79+
env:
80+
# Secrets cannot be directly referenced in if: conditionals. They must be set as a job env var first.
81+
# Ref: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-using-secrets
82+
SLACK_WEBHOOK_URL: "${{ secrets.OSS_PYPI_SLACK_WEBHOOK_URL }}"
83+
SLACK_WEBHOOK_TYPE: "INCOMING_WEBHOOK"
84+
SLACK_MESSAGE: >-
85+
*NOTIFICATION: NEW-RELEASE-PUBLISHED*\n
86+
Repository: <${{ github.server_url }}/${{ github.repository }}|${{ github.repository }}>\n
87+
Release: <${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}|${{ github.ref_name }}>\n
88+
Published by: <${{ github.server_url }}/${{ github.actor }}|${{ github.actor }}>
89+
steps:
90+
- name: "Send a notification to Slack"
91+
if: "${{ env.SLACK_WEBHOOK_URL != '' }}"
92+
uses: "slackapi/slack-github-action@fcfb566f8b0aab22203f066d80ca1d7e4b5d05b3" # v1.27.1
93+
with:
94+
payload: |
95+
{
96+
"text": "${{ env.SLACK_MESSAGE }}",
97+
"blocks": [
98+
{
99+
"type": "section",
100+
"text": {
101+
"type": "mrkdwn",
102+
"text": "${{ env.SLACK_MESSAGE }}"
103+
}
104+
}
105+
]
106+
}

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ version: 2
1010
build:
1111
os: "ubuntu-lts-latest"
1212
tools:
13-
python: "3.12"
13+
python: "3.13"
1414
jobs:
1515
post_install:
1616
# Install poetry

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
<<<<<<< HEAD
12
ARG PYTHON_VER="3.9"
3+
=======
4+
ARG PYTHON_VER="3.10"
5+
>>>>>>> f4d378c (Cookie updated by NetworkToCode Cookie Drift Manager Tool)
26

37
FROM python:${PYTHON_VER}-slim
48

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,35 @@
11
# Netutils
22

3+
<<<<<<< HEAD
4+
=======
5+
<!--
6+
Developer Note - Remove Me!
7+
8+
The README will have certain links/images broken until the PR is merged into `develop`. Update the GitHub links with whichever branch you're using (main etc.) if different.
9+
10+
The logo of the project is a placeholder (docs/images/icon-netutils.png) - please replace it with your app icon, making sure it's at least 200x200px and has a transparent background!
11+
12+
To avoid extra work and temporary links, make sure that publishing docs (or merging a PR) is done at the same time as setting up the docs site on RTD, then test everything.
13+
-->
14+
15+
>>>>>>> f4d378c (Cookie updated by NetworkToCode Cookie Drift Manager Tool)
316
<p align="center">
417
<img src="https://raw.githubusercontent.com/networktocode/netutils/develop/docs/images/icon-Netutils.png" class="logo" height="200px">
518
<br>
619
<a href="https://github.com/networktocode/netutils/actions"><img src="https://github.com/networktocode/netutils/actions/workflows/ci.yml/badge.svg?branch=main"></a>
20+
<<<<<<< HEAD
721
<a href="https://netutils.readthedocs.io/en/latest"><img src="https://readthedocs.org/projects/netutils/badge/"></a>
22+
=======
23+
<a href="https://netutils.readthedocs.io/en/latest/"><img src="https://readthedocs.org/projects/netutils/badge/"></a>
24+
>>>>>>> f4d378c (Cookie updated by NetworkToCode Cookie Drift Manager Tool)
825
<a href="https://pypi.org/project/netutils/"><img src="https://img.shields.io/pypi/v/netutils"></a>
926
<a href="https://pypi.org/project/netutils/"><img src="https://img.shields.io/pypi/dm/netutils"></a>
1027
<br>
1128
</p>
1229
1330
## Overview
1431

32+
<<<<<<< HEAD
1533
A Python library that is a collection of functions that are used in the common network automation tasks. Tasks such as converting a BGP ASN to and from dotted format, normalizing an interface name, or "type 5" encrypting a password. The intention is to centralize these functions while keeping the library light.
1634

1735
## Documentation
@@ -29,6 +47,25 @@ Full web-based HTML documentation for this library can be found over on the [Net
2947
All the Markdown source for the library documentation can be found under the [docs](https://github.com/networktocode/netutils/tree/develop/docs) folder in this repository. For simple edits, a Markdown capable editor is sufficient - clone the repository and edit away.
3048

3149
If you need to view the fully generated documentation site, you can build it with [mkdocs](https://www.mkdocs.org/). A container hosting the docs will be started using the invoke commands (details in the [Development Environment Guide](https://netutils.readthedocs.io/en/latest/dev/dev_environment/#docker-development-environment)) on [http://localhost:8001](http://localhost:8001). As your changes are saved, the live docs will be automatically reloaded.
50+
=======
51+
> Developer Note: Add a long (2-3 paragraphs) description of what the library does, what problems it solves, etc.
52+
53+
## Documentation
54+
55+
Full documentation for this library can be found over on the [Netutils Docs](https://netutils.readthedocs.io/) website:
56+
57+
- [User Guide](https://netutils.readthedocs.io/user/app_overview/) - Overview, Using the Library, Getting Started.
58+
- [Administrator Guide](https://netutils.readthedocs.io/admin/install/) - How to Install, Configure, Upgrade, or Uninstall the Library.
59+
- [Developer Guide](https://netutils.readthedocs.io/dev/contributing/) - Extending the Library, Code Reference, Contribution Guide.
60+
- [Release Notes / Changelog](https://netutils.readthedocs.io/admin/release_notes/).
61+
- [Frequently Asked Questions](https://netutils.readthedocs.io/user/faq/).
62+
63+
### Contributing to the Documentation
64+
65+
You can find all the Markdown source for the App documentation under the [`docs`](https://github.com/networktocode/netutils/tree/develop/docs) folder in this repository. For simple edits, a Markdown capable editor is sufficient: clone the repository and edit away.
66+
67+
If you need to view the fully-generated documentation site, you can build it with [MkDocs](https://www.mkdocs.org/). A container hosting the documentation can be started using the `invoke` commands (details in the [Development Environment Guide](https://netutils/dev/dev_environment/#docker-development-environment)) on [http://localhost:8001](http://localhost:8001). Using this container, as your changes to the documentation are saved, they will be automatically rebuilt and any pages currently being viewed will be reloaded in your browser.
68+
>>>>>>> f4d378c (Cookie updated by NetworkToCode Cookie Drift Manager Tool)
3269
3370
Any PRs with fixes or improvements are very welcome!
3471

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Rebaked from the cookie `jlk-more-fixes-sadface`.

changes/.gitkeep

Whitespace-only changes.

docs/admin/release_notes/version_1.0.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,24 @@
66
- Commit to SemVer
77
- F5 fixes
88

9+
<<<<<<< HEAD
910
## v1.0.0 - 2021-11
11+
=======
12+
## [v1.0.0] - 2025-11-11
13+
>>>>>>> f4d378c (Cookie updated by NetworkToCode Cookie Drift Manager Tool)
1014
1115
### Added
1216

1317
- [#69](https://github.com/networktocode/netutils/issues/69) Normalise banner delimiter for IOS to ^C & support parsing delimiter ^.
1418

1519
### Fixed
1620

21+
<<<<<<< HEAD
1722
- [#79](https://github.com/networktocode/netutils/issues/79) F5 parser fix for irules with multiline single command lines.
1823

1924
### Removed
2025

2126
- [#83](https://github.com/networktocode/netutils/issues/83) Remove support for old function 'is_fqdn_valid' as prep for 1.0.0.
27+
=======
28+
- [#123](https://github.com/networktocode/netutils/issues/123) Fixed Tag filtering not working in job launch form.
29+
>>>>>>> f4d378c (Cookie updated by NetworkToCode Cookie Drift Manager Tool)

0 commit comments

Comments
 (0)