Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
5878b1b
Remove config conditionals from navigation
jtdub Dec 11, 2024
b7104dd
rollback changes for testing
jtdub Dec 13, 2024
2716c03
Add change log
jtdub Dec 13, 2024
09218ea
remove conditional views from golden config overview
jtdub Dec 13, 2024
db478b2
update nautobot dev container version
jtdub Dec 13, 2024
581cd3e
update change log
jtdub Dec 16, 2024
168ad27
Updated GoldenConfig model
jtdub Dec 19, 2024
4f2b7db
update enabled views
jtdub Dec 19, 2024
8f8aeee
add job evaluations
jtdub Dec 19, 2024
a2b5a7f
update changelog
jtdub Dec 19, 2024
68f604b
update html templates
jtdub Dec 19, 2024
fbe31c1
update migrations to inherit defaults
jtdub Dec 19, 2024
c709199
update golden config setting table
jtdub Dec 20, 2024
ff2e74e
add tests for enabled / disabled settings
jtdub Dec 20, 2024
e06609e
ruff
jtdub Dec 20, 2024
3ab44ca
pylint tests
jtdub Dec 27, 2024
0f71d35
update views to pull settings from ORM
jtdub Dec 27, 2024
e4efffc
lint
jtdub Dec 27, 2024
9c40f6f
create helper
jtdub Dec 27, 2024
03e8572
update jobs to use ORM settings
jtdub Dec 27, 2024
d006834
remove constants from tables and datasources
jtdub Dec 27, 2024
2e4fc7d
update config features constant
jtdub Dec 27, 2024
b1de060
add updated docs
jtdub Dec 27, 2024
a4e09da
add default setting class
jtdub Dec 27, 2024
bfcff72
ruff
jtdub Dec 27, 2024
38b68ed
revert changes to poetry.lock
jtdub Jan 6, 2025
e6207fd
pin poetry version
jtdub Jan 9, 2025
39a43cd
pin poetry version
jtdub Jan 9, 2025
1ec4e35
pin poetry version
jtdub Jan 9, 2025
9564736
Merge branch 'develop' into gc-app-settings
jtdub Jan 15, 2025
8ab7f45
Merge branch 'develop' into gc-app-settings
jtdub Feb 6, 2025
7b521e4
Merge branch 'develop' into gc-app-settings
jtdub Feb 18, 2025
04b63b7
add enhanced logging and feature checks
jtdub Feb 21, 2025
71595d4
Merge branch 'develop' into gc-app-settings
jtdub Feb 21, 2025
cc42498
ruff format
jtdub Feb 21, 2025
8b75b7e
update nornir test with additional arg
jtdub Feb 21, 2025
c2d7269
Merge branch 'develop' into gc-app-settings
jtdub Feb 24, 2025
5ba78a0
pylint
jtdub Feb 24, 2025
3addb3f
pylint
jtdub Feb 24, 2025
93c3f03
pylint
jtdub Feb 24, 2025
0bad3b6
Merge branch 'develop' into gc-app-settings
jtdub Feb 24, 2025
ad69a53
add error message docs
jtdub Feb 24, 2025
38147a2
update tests to use updated error code.
jtdub Feb 24, 2025
76cbe67
rollback first attempt at settings checks and add error codes to mkdocs
jtdub Feb 27, 2025
74560f9
remove checking settings from nornir itself
jtdub Feb 27, 2025
d2f0d76
remove unused cleanup function
jtdub Feb 27, 2025
265a2a0
remove pylint disable
jtdub Feb 27, 2025
3b94fd2
move verify_feature_enabled to individual nornir tasks
jtdub Feb 27, 2025
a5911cc
Merge branch 'develop' into gc-app-settings
jtdub Feb 28, 2025
d8d3c6d
add CustomSettingsFilter
jtdub Mar 6, 2025
c33cf02
add tests
jtdub Mar 10, 2025
7baa26b
lint
jtdub Mar 10, 2025
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
2 changes: 2 additions & 0 deletions changes/847.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1. Removes the conditional UI navigation and views based on config settings.
2. Allows users to update configuration parameters in the UI - specifically enabling/disabling backups, intended, plan, deploy, and compliance
31 changes: 23 additions & 8 deletions docs/admin/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,34 @@ sudo systemctl restart nautobot nautobot-worker nautobot-scheduler

## App Configuration

The app behavior can be controlled with the following list of settings:
The app behavior can be controlled with the following list of settings. All of these keys have default values in `nautobot_golden_config`, but can be overridden via the Nautobot UI on the **Golden Config Settings** page. If you’d like to update specific toggles—such as whether backups, compliance checks, or config plans are enabled—without editing your local configuration file.

!!! note
The `enable_backup`, `enable_compliance`, `enable_intended`, `enable_sotagg`, `enable_plan`, `enable_deploy`, and `enable_postprocessing` will toggle inclusion of the entire component.
### Managing Feature Toggles in the UI

You can easily manage these feature toggles in the UI:

1. Navigate to **Golden Config > Golden Config Settings**.
2. Select **Default Settings** (or your chosen Setting if multiple exist).
3. Click **Edit** and adjust the relevant toggles (e.g., **Enable Backup**, **Enable Compliance**, **Enable Intended**, **Enable Plan**, **Enable Deploy**).

![Golden Config Settings List](../images/golden-config-settings-list.png)

![Golden Config Settings - Backup and Intended](../images/golden-config-settings-01.png)

![Golden Config Settings - Additional Configuration](../images/golden-config-settings-02.png)

As shown, you can toggle any of the features on or off. Once saved, the job logic in Nautobot Golden Config will reflect those changes immediately, allowing you to control which aspects of Golden Config you want to enable.

## List of Settings

| Key | Example | Default | Description |
| ------------------------- | ----------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| enable_backup | True | True | A boolean to represent whether or not to run backup configurations within the app. |
| enable_compliance | True | True | A boolean to represent whether or not to run the compliance process within the app. |
| enable_intended | True | True | A boolean to represent whether or not to generate intended configurations within the app. |
| enable_backup | True | True | A boolean to represent whether or not to run backup configurations within the app. Can be changed in UI under **Enable Backup** in Golden Config Settings. |
| enable_compliance | True | True | A boolean to represent whether or not to run the compliance process within the app. Can be changed in UI under **Compliance Enabled** in Golden Config Settings. |
| enable_intended | True | True | A boolean to represent whether or not to generate intended configurations within the app. Can be changed in UI under **Intended Enabled** in Golden Config Settings. |
| enable_sotagg | True | True | A boolean to represent whether or not to provide a GraphQL query per device to allow the intended configuration to provide data variables to the app. |
| enable_plan | True | True | A boolean to represent whether or not to allow the config plan job to run. |
| enable_deploy | True | True | A boolean to represent whether or not to be able to deploy configs to network devices. |
| enable_plan | True | True | A boolean to represent whether or not to allow the config plan job to run. Can be changed in UI under **Plan Enabled** in Golden Config Settings. |
| enable_deploy | True | True | A boolean to represent whether or not to be able to deploy configs to network devices. Can be changed in UI under **Deploy Enabled** in Golden Config Settings. |
| enable_postprocessing | True | False | A boolean to represent whether or not to generate intended configurations to push, with extra processing such as secrets rendering. |
| default_deploy_status | "Not Approved" | "Not Approved" | A string that will be the name of the status you want as the default when create new config plans, you MUST create the status yourself before starting the app. |
| postprocessing_callables | ['mypackage.myfunction'] | [] | A list of function paths, in dotted format, that are appended to the available methods for post-processing the intended configuration, for instance, the `render_secrets`. |
Expand Down
22 changes: 22 additions & 0 deletions docs/admin/troubleshooting/E3032.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# E3032 Details

## Message emitted:

`E3032: Disabled Golden Config setting.`

## Description:

This error occurs when a required feature is disabled in Golden Config, preventing the task from executing properly.

The features affected by this error include:
* Configuration backup
* Intended configuration
* Compliance execution

## Troubleshooting:

Review the exception message to identify the cause of the failure.

## Recommendation:

Enable the feature in the Golden Configuration Settings to execute the task.
17 changes: 17 additions & 0 deletions docs/admin/troubleshooting/E3033.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# E3033 Details

## Message emitted:

`E3033: Missing required settings.`

## Description:

This error occurs when a feature is missing in Golden Config, but is required to execute the task. Currently, this applies to the intended feature, which requires an SoT Agg (GraphQL) query to render templates from device data.

## Troubleshooting:

Review the exception message to determine the cause of the failure.

## Recommendation:

Double-check the intended and template configurations to ensure all required fields are populated and enabled.
17 changes: 17 additions & 0 deletions docs/admin/troubleshooting/E3034.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# E3034 Details

## Message emitted:

`E3034: Config plan creation is disabled in Golden Config settings.`

## Description:

This error occurs when the config plan feature is disabled in Golden Config.

## Troubleshooting:

Review the exception message to determine the cause of the failure.

## Recommendation:

Enable the config plan feature in the Golden Config settings to resolve the issue.
16 changes: 16 additions & 0 deletions docs/admin/troubleshooting/E3035.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# E3035 Details

## Message emitted:

`E3035: Device is not in scope for config plans.`

## Description:

This occurs when a config plan attempts to create a plan for a device that is out of scope.

## Troubleshooting:

Review the exception message for the cause of the failure.

## Recommendation:

17 changes: 17 additions & 0 deletions docs/admin/troubleshooting/E3036.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# E3036 Details

## Message emitted:

`E3036: Configuration deployment is disabled in Golden Config settings.`

## Description:

This error occurs when the configuration deployment feature is disabled in Golden Config, but is required to execute the current task.

## Troubleshooting:

Review the exception message for the cause of the failure.

## Recommendation:

Enable the configuration deployment feature if necessary.
15 changes: 15 additions & 0 deletions docs/admin/troubleshooting/E3037.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# E3037 Details

## Message emitted:

`E3037: Device is no longer in scope for deployments.`

## Description:

This error occurs when a device is out of scope for a configuration deployment.

## Troubleshooting:

Review the exception message for the cause of the failure.

## Recommendation:
Binary file added docs/images/golden-config-settings-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/golden-config-settings-02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/golden-config-settings-list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ nav:
- E3029: "admin/troubleshooting/E3029.md"
- E3030: "admin/troubleshooting/E3030.md"
- E3031: "admin/troubleshooting/E3031.md"
- E3032: "admin/troubleshooting/E3032.md"
- E3033: "admin/troubleshooting/E3033.md"
- E3034: "admin/troubleshooting/E3034.md"
- E3035: "admin/troubleshooting/E3035.md"
- E3036: "admin/troubleshooting/E3036.md"
- E3037: "admin/troubleshooting/E3037.md"
- Migrating To v2: "admin/migrating_to_v2.md"
- Release Notes:
- "admin/release_notes/index.md"
Expand Down
10 changes: 6 additions & 4 deletions nautobot_golden_config/datasources.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@

from nautobot_golden_config.exceptions import MissingReference
from nautobot_golden_config.models import ComplianceFeature, ComplianceRule, ConfigRemove, ConfigReplace
from nautobot_golden_config.utilities.constant import ENABLE_BACKUP, ENABLE_COMPLIANCE, ENABLE_INTENDED
from nautobot_golden_config.utilities.helper import get_golden_config_settings

settings = get_golden_config_settings()


def refresh_git_jinja(repository_record, job_result, delete=False): # pylint: disable=unused-argument
Expand Down Expand Up @@ -215,7 +217,7 @@ def update_git_gc_properties(golden_config_path, job_result, gc_config_item): #


datasource_contents = []
if ENABLE_INTENDED or ENABLE_COMPLIANCE:
if settings.intended_enabled or settings.compliance_enabled:
datasource_contents.append(
(
"extras.gitrepository",
Expand All @@ -227,7 +229,7 @@ def update_git_gc_properties(golden_config_path, job_result, gc_config_item): #
),
)
)
if ENABLE_INTENDED:
if settings.intended_enabled:
datasource_contents.append(
(
"extras.gitrepository",
Expand All @@ -239,7 +241,7 @@ def update_git_gc_properties(golden_config_path, job_result, gc_config_item): #
),
)
)
if ENABLE_BACKUP or ENABLE_COMPLIANCE:
if settings.backup_enabled or settings.compliance_enabled:
datasource_contents.append(
(
"extras.gitrepository",
Expand Down
Loading