Skip to content

Commit 8d51840

Browse files
author
bakebot
committed
Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool
Template: ``` { "template": "https://github.com/networktocode-llc/cookiecutter-ntc.git", "dir": "python", "ref": "main", "path": "/__w/cookiecutter-nautobot-app-drift-manager/cookiecutter-nautobot-app-drift-manager/cookiecutter-ntc/python" } ``` Cookie: ``` { "remote": "https://github.com/networktocode/netutils.git", "path": "/tmp/tmp8yy2e_dd/netutils", "repository_path": "/tmp/tmp8yy2e_dd/netutils", "dir": "", "branch_prefix": "drift-manager/develop", "context": { "codeowner_github_usernames": "@itdependsnetworks @jeffkala @qduk", "full_name": "Network to Code, LLC", "email": "info@networktocode.com", "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": "/__w/cookiecutter-nautobot-app-drift-manager/cookiecutter-nautobot-app-drift-manager/cookiecutter-ntc/python", "_output_dir": "/tmp/tmp8yy2e_dd", "_repo_dir": "/__w/cookiecutter-nautobot-app-drift-manager/cookiecutter-nautobot-app-drift-manager/cookiecutter-ntc/python", "_checkout": null }, "drift_managed_branch": "develop", "remote_name": "origin", "pull_request_strategy": "PullRequestStrategy.UPDATE_OR_CREATE", "post_actions": [], "baked_commit_ref": "b23a9ed5a4714810d83670ad47cc182764c6d464", "draft": false } ``` CLI Arguments: ``` { "cookie_dir": "", "input": false, "json_filename": "", "output_dir": "", "push": true, "template": "./cookiecutter-ntc", "template_dir": "python", "template_ref": "main", "pull_request": "update-or-create", "post_action": [], "disable_post_actions": true, "draft": null, "drift_managed_branch": "develop" } ```
1 parent 39ae909 commit 8d51840

7 files changed

Lines changed: 22 additions & 4 deletions

File tree

.cookiecutter.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
"pull_request_strategy": "update-or-create",
2424
"post_actions": [],
2525
"draft": false,
26+
<<<<<<< HEAD
2627
"baked_commit_ref": "b23a9ed5a4714810d83670ad47cc182764c6d464",
28+
=======
29+
"baked_commit_ref": "a996428068385caa4a089ec4abfd1ac731fca674",
30+
>>>>>>> 016b1ed (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
2731
"drift_managed_branch": "develop"
2832
}
2933
}

LICENSE

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Apache Software License 2.0
22

3+
<<<<<<< HEAD
34
Copyright (c) 2021-2025, Network to Code, LLC
5+
=======
6+
Copyright (c) 2021-2026, Network to Code, LLC
7+
>>>>>>> 016b1ed (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
48

59
Licensed under the Apache License, Version 2.0 (the "License");
610
you may not use this file except in compliance with the License.

changes/+main.housekeeping

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

docs/admin/release_notes/version_1.0.md

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

9+
<<<<<<< HEAD
910
## v1.0.0 - 2021-11
11+
=======
12+
## [v1.0.0] - 2026-02-12
13+
>>>>>>> 016b1ed (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
1014
1115
### Added
1216

example.invoke.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
"netutils":
3-
python_ver: "3.9"
3+
python_ver: "3.10"
44
local: false
55
# image_name: "netutils"
66
# image_ver: "latest"

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,16 @@ include = [
2626

2727
[tool.poetry.dependencies]
2828
python = ">=3.10,<3.14"
29+
<<<<<<< HEAD
2930
napalm = {version = "^4.0.0", optional = true}
3031
jsonschema = {version = "^4.17.3", optional = true}
3132
legacycrypt = {version = "0.3", optional = true}
3233

3334
[tool.poetry.extras]
3435
optionals = ["jsonschema", "napalm", "legacycrypt"]
36+
=======
37+
click = "*"
38+
>>>>>>> 016b1ed (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
3539

3640
[tool.poetry.group.dev.dependencies]
3741
coverage = "*"

tasks.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,14 @@ def task_wrapper(function=None):
6666
return task_wrapper
6767

6868

69-
def run_command(context, exec_cmd, port=None):
69+
def run_command(context, exec_cmd, port=None, rm=True):
7070
"""Wrapper to run the invoke task commands.
7171
7272
Args:
7373
context ([invoke.task]): Invoke task object.
7474
exec_cmd ([str]): Command to run.
7575
port (int): Used to serve local docs.
76+
rm (bool): Whether to remove the container after running the command.
7677
7778
Returns:
7879
result (obj): Contains Invoke result from running task.
@@ -86,12 +87,12 @@ def run_command(context, exec_cmd, port=None):
8687
)
8788
if port:
8889
result = context.run(
89-
f"docker run -it -p {port} -v {context.netutils.pwd}:/local {context.netutils.image_name}:{context.netutils.image_ver} sh -c '{exec_cmd}'",
90+
f"docker run -it {'--rm' if rm else ''} -p {port} -v {context.netutils.pwd}:/local {context.netutils.image_name}:{context.netutils.image_ver} sh -c '{exec_cmd}'",
9091
pty=True,
9192
)
9293
else:
9394
result = context.run(
94-
f"docker run -it -v {context.netutils.pwd}:/local {context.netutils.image_name}:{context.netutils.image_ver} sh -c '{exec_cmd}'",
95+
f"docker run -it {'--rm' if rm else ''} -v {context.netutils.pwd}:/local {context.netutils.image_name}:{context.netutils.image_ver} sh -c '{exec_cmd}'",
9596
pty=True,
9697
)
9798

0 commit comments

Comments
 (0)