Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ✨ Decommissioning Job #85

Merged
merged 43 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
62559fe
Updates pyproject.toml for 3.11
jvanderaa Aug 1, 2023
625e680
fix: Updates for OSRB documentation review
abates Oct 23, 2023
b264d0a
docs: The custom `indent` filter was removed in favor of using the bu…
abates Oct 23, 2023
6faec79
docs: Documentation updates
abates Oct 24, 2023
1c96d02
Merge branch 'develop' into support311
abates Dec 7, 2023
85e4ed0
docs: Removed unneeded doc template
abates Dec 11, 2023
b3950ac
Merge branch 'develop' into osrb-docs-review
abates Dec 11, 2023
d88f578
feat: :sparkles: Decommissioning Job
chadell Dec 12, 2023
1bd206d
Apply suggestions from code review
chadell Dec 13, 2023
e96367c
Merge pull request #81 from networktocode-llc/osrb-docs-review
abates Dec 13, 2023
b11e238
Merge pull request #62 from networktocode-llc/support311
abates Dec 13, 2023
1999e21
Decouple pre decommission job
chadell Dec 14, 2023
8a3f890
use callable
chadell Dec 14, 2023
59ea087
generalize hook
chadell Dec 15, 2023
d106fa7
wip
chadell Dec 15, 2023
ca01bd0
wip
chadell Dec 18, 2023
0962021
fix: Fixed test failures.
abates Dec 18, 2023
08aba58
refactor: JournalEntry can now be reverted.
abates Dec 19, 2023
ea007da
fix tests
chadell Dec 19, 2023
0121d1b
fix dict logic
chadell Dec 19, 2023
11eea60
docs: Documented why refreshing `design_object` is necessary
abates Dec 19, 2023
a17cf92
refactor: Refactored revert code into `Journal` model
abates Dec 19, 2023
c8b7faf
docs: Updated branding from `plugin` to `app`
abates Jan 2, 2024
8333422
Merge branch 'osrb' into feature_delices_decom_job
abates Jan 2, 2024
92ee1ed
refactor: Refactored decom code to model and hooks to signals
abates Jan 2, 2024
f1fe686
style: Autoformatting
abates Jan 2, 2024
2132ac9
Add l3vpn design example
chadell Jan 2, 2024
63ea09f
fix old dict value null
chadell Jan 2, 2024
5efb783
Merge branch 'feature_delices_decom_job' of github.com:networktocode-…
chadell Jan 2, 2024
f911eec
refactor: Minor refactoring of `JournalEntry` revert and the model it…
abates Jan 2, 2024
42e4e19
fix tests
chadell Jan 3, 2024
d8ad207
update the l3vppn example and add a hook to validate input data
chadell Jan 3, 2024
fbad8f5
bump version
chadell Jan 3, 2024
9bf5ff4
avoid overwrite of method
chadell Jan 3, 2024
1d665ea
clean up some leftovers
chadell Jan 3, 2024
ccdd49f
Missing part of previous commit
chadell Jan 3, 2024
4513c5e
Rename variables for consistency
chadell Jan 3, 2024
192874f
fix: Fixed extra `{% endmacro %}` that got added at some point.
abates Jan 3, 2024
b39a54f
fix: Now logging the design instance and journal objects.
abates Jan 3, 2024
1cc2184
Adjust test with warning, improve logging plus journalentry retrieve …
chadell Jan 4, 2024
358390c
adjust logging
chadell Jan 4, 2024
4aabdce
mre info
chadell Jan 4, 2024
31de2a4
fix exception chain
chadell Jan 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion development/nautobot_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,16 @@
if nautobot_version < Version("2.0"):
PLUGINS.append("nautobot_bgp_models")

PLUGINS_CONFIG = {"design_builder": {"context_repository": os.getenv("DESIGN_BUILDER_CONTEXT_REPO_SLUG", None)}}

def pre_decommission_hook_example(design_instance):
return True, "Everything good!"


PLUGINS_CONFIG = {
"nautobot_design_builder": {
"context_repository": os.getenv("DESIGN_BUILDER_CONTEXT_REPO_SLUG", None),
"pre_decommission_hook": pre_decommission_hook_example,
}
}

STRICT_FILTERING = False
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
---
regions:
- "!update:name": "{{ region.name }}"
description: "new description for testing"

sites:
- name: "{{ site_name }}"
region__slug: "{{ region.slug }}"
Expand Down Expand Up @@ -51,6 +55,15 @@ racks:
status__name: "Reserved"
{% endmacro %}

{% macro device_edit(device_name) -%}
- "!update:name": "{{ device_name }}"
local_context_data: {
"snmp-location": "some-cool-place",
}

{% endmacro %}

devices:
{{ device("core01", "rack1", core_1_loopback) }}
{{ device("core02", "rack2", core_2_loopback) }}
{{ device_edit("core02.iad5") }}
chadell marked this conversation as resolved.
Show resolved Hide resolved
Loading
Loading