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

additional pr review updates for remediation feature #564

Merged
merged 4 commits into from
Sep 6, 2023

Conversation

jeffkala
Copy link
Contributor

@jeffkala jeffkala commented Sep 6, 2023

Also a few other fixes from cookiecutter and newer poetry syntax

@jeffkala jeffkala marked this pull request as draft September 6, 2023 04:09
@jeffkala
Copy link
Contributor Author

jeffkala commented Sep 6, 2023

few filter updates made are not fully working yet.

@jeffkala jeffkala marked this pull request as ready for review September 6, 2023 17:25
@jeffkala jeffkala merged commit fb458d9 into config-working-group-temp Sep 6, 2023
16 checks passed
@jeffkala jeffkala deleted the jkala-remediation-review branch September 6, 2023 17:43
itdependsnetworks added a commit to itdependsnetworks/nautobot-plugin-golden-config that referenced this pull request Sep 7, 2023
* Adds ConfigPlan model and features (nautobot#521)

* Adds ConfigPlan model and initial generation utils

* Updates logic to not create empty config_set

* Changes functions to return config_set instead

* Format via black

* Adds signal to create default ConfigPlan statuses

* Adds ConfigPlan initial UI/API elements

* Fixes Status filter

* Removes unused imports

* Changes variable to function

* Adds ConfigPlan nested serializer

* Update help text per feedback

* Adds CLI rule generation

* Adds ConfigPlan model tests

* Adds ConfigPlan filter tests

* Adds ConfigPlan api tests

* Adds ConfigPlan utility tests

* Adds ConfigPlan view tests

* Changes the test to only run on certain versions

* Hides generate button until a plan type is chosen

* Adds line break to help text

* Changes serializer to disable POST method

* Updates wording

* Changes default statuses to Approved/Not Approved

* Changes field to singular

* Adds plan type to str method

* Adds initial Config Plan documentation

* Reorders migration file after rebase

* Fixes imported class after rebase

* Updates from PR feedback

* Fixes absolute url test

* Fixes typo

* Enables and fixes Edit View tests

---------

Co-authored-by: Jeff Kala <48843785+jeffkala@users.noreply.github.com>

* Config Remediation (nautobot#512)

* initial commit for remediation

* initial commit for remediation

* typo fix

* typo fix

* initial commit for remediation

* initial commit for remediation

* typo fix

* typo fix

* modified:   nautobot_golden_config/models.py
	modified:   pyproject.toml

* temporary fixes and changes

* modified:   nautobot_golden_config/nornir_plays/config_compliance.py

* modified:   nautobot_golden_config/models.py

* modified:   nautobot_golden_config/forms.py
	modified:   nautobot_golden_config/templates/nautobot_golden_config/compliance_device_report.html
	modified:   nautobot_golden_config/templates/nautobot_golden_config/compliancerule_retrieve.html
	modified:   nautobot_golden_config/templates/nautobot_golden_config/configcompliance.html

* Remediation options updates

* modified:   nautobot_golden_config/choices.py
	modified:   nautobot_golden_config/models.py
	modified:   nautobot_golden_config/navigation.py
	modified:   nautobot_golden_config/tables.py

* modified:   nautobot_golden_config/models.py
	modified:   nautobot_golden_config/navigation.py
	modified:   nautobot_golden_config/tables.py
	modified:   nautobot_golden_config/templates/nautobot_golden_config/remediationsetting_retrieve.html

* modified:   nautobot_golden_config/models.py
	modified:   nautobot_golden_config/templates/nautobot_golden_config/compliancerule_retrieve.html
	modified:   nautobot_golden_config/templates/nautobot_golden_config/remediationsetting_retrieve.html
	modified:   nautobot_golden_config/views.py

* modified:   nautobot_golden_config/models.py
	modified:   nautobot_golden_config/templates/nautobot_golden_config/compliancerule_retrieve.html
	modified:   nautobot_golden_config/templates/nautobot_golden_config/configcompliance.html

* lint:   nautobot_golden_config/api/serializers.py
	lint:   nautobot_golden_config/forms.py
	lint:   nautobot_golden_config/models.py
	lint:   nautobot_golden_config/tables.py
	lint:   nautobot_golden_config/views.py

* lint:   nautobot_golden_config/models.py

* lint:   nautobot_golden_config/models.py

* lint:   nautobot_golden_config/models.py

* lint:   nautobot_golden_config/models.py

* lint:   nautobot_golden_config/models.py

* Update pyproject.toml

* Update pyproject.toml

* Update pyproject.toml

* remove python 3.7 from ci.yml

* Update ci.yml

* Update ci.yml

* modified:   .github/workflows/ci.yml
	new file:   nautobot_golden_config/migrations/0025_auto_20230707_0921.py
	modified:   poetry.lock

* black:   nautobot_golden_config/migrations/0025_auto_20230707_0921.py

* black:   nautobot_golden_config/migrations/0025_auto_20230707_0921.py

* modified:   nautobot_golden_config/migrations/0005_json_compliance_rule.py
	modified:   nautobot_golden_config/migrations/0025_auto_20230707_0921.py

* modified:   nautobot_golden_config/tests/test_models.py

* tests:   nautobot_golden_config/tests/test_models.py

* modified:   nautobot_golden_config/tests/test_models.py

* peer-review:   .github/workflows/ci.yml
	peer-review:   nautobot_golden_config/models.py

* new file:   docs/images/remediation_custom_function_setup.png
	new file:   docs/images/remediation_enable_compliance_rule_feature.png
	new file:   docs/images/remediation_hier_edit_options.png
	new file:   docs/images/remediation_settings_per_platform.png
	new file:   docs/images/remediation_validate_feature.png
	new file:   docs/user/app_feature_remediation.md
	modified:   nautobot_golden_config/api/serializers.py
	modified:   nautobot_golden_config/filters.py
	modified:   nautobot_golden_config/models.py
	modified:   nautobot_golden_config/tests/conftest.py
	modified:   nautobot_golden_config/tests/test_api.py
	modified:   nautobot_golden_config/tests/test_models.py
	modified:   pyproject.toml

* modified:   nautobot_golden_config/filters.py

* lint:   nautobot_golden_config/filters.py

* new file:   nautobot_golden_config/migrations/0025_remediation_settings_part1.py

* deleted:    nautobot_golden_config/migrations/0025_auto_20230707_0921.py

* lint:   nautobot_golden_config/tests/test_models.py

* modified:   nautobot_golden_config/migrations/0005_json_compliance_rule.py
	modified:   nautobot_golden_config/migrations/0025_remediation_settings_part1.py

* modified:   nautobot_golden_config/migrations/0025_remediation_settings_part1.py

---------

Co-authored-by: pato23arg <patricior_villar@hotmail.com>
Co-authored-by: pvillar_netdev <pato23arg@users.noreply.github.com>
Co-authored-by: Ken Celenza <ken@celenza.org>

* Run Black and update dependencies (nautobot#532)

* Split Migrations (nautobot#534)

* Split Migrations

* Bump min to 1.5.14

* Fixes field name to be singular

* Add Config Set modal to list view, copy button on modal/detail view, … (nautobot#536)

* Add Config Set modal to list view, copy button on modal/detail view, and update bulk edit.

* Update nautobot_golden_config/tables.py

Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com>

* update navigation

---------

Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com>

* Move job and form toggle to JS and add job_result/cm url to model

* Move config create to a javascript process that waits for job to complete and report details into modal. Modal provides
    * Provide progress spinner
    * Provide job status,
    * Job results link
    * Redirect link
    * Error message.
* Separated edit and create templates as they serve different purposes.
* Converted hidden form to uses standard NautobotUIViewSet create method with small amount of JS
* Updated model to link job_result and cm URL
* Updated job to aggregate config to one per job run

Made the JS pieces composable for near future use to kick off job to push configurations.

* Add customer filter, minor updates

* Apply suggestions from code review

Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com>

* just pushing new poetry lock after merge conflicts were fixed

* Fixes device serializer to return names

* Removes unused import

* Fixes working group tests (nautobot#548)

* Removes deprecated pylint options

* Updates CI to run on 1.5.14

* Updates CI to run on 1.5.14

* Adds config deployment job and UI elements (nautobot#545)

* Adds config deployment job and UI elements

* Adds logic to fail if any plans are not approved

* Skips plan deletion if the job failed

* add back locations to form

needed for now, can remove late but some other dependencies

* fix default for control_url

* update js job stat poller to support more job state

* fixes ci testing

* undo a messed up merge conflict resolution and pylint

* config plan fixes

* config plan fixes

* Update nautobot_golden_config/forms.py

Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com>

* Remediation Updates  (nautobot#546)

* Update models.py

* Update pyproject.toml

* Update nautobot_golden_config/models.py

Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com>

* Update models.py

remove try except block again that was accidentally added back during merge conflict resolution.

---------

Co-authored-by: Jeff Kala <48843785+jeffkala@users.noreply.github.com>
Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com>

* Minor changes and fixes (nautobot#554)

* Adds change_control_url to update fields

* Disables clicking outside of the modal to close it

* Fixes checking through the list of statuses

* Replaces append with html

* Changes feature to support multiple links

* Changes Job Results to be singular

* Removes signal to enable job

* Changes the loader image show until job is done

* Removes jr_options variable for consistency

* Removes data-keyboard to enable escape key

* Removes full config plan type

* Changes to improve UX

* Fixes tests

* Disables location options and leaves breadcrumbs

* Adds tests for multiple features

* generate poetry lock

* Apply suggestions from code review

Co-authored-by: Jeff Kala <48843785+jeffkala@users.noreply.github.com>

* rerun migrations to fix name and multifiles (nautobot#559)

* Fixes screenshots and fixes title for config plan edit view (nautobot#561)

* Replaces screenshots with new form fields

* Removes copy pasta title

* Update docs/user/app_feature_config_plans.md

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com>

* Adds message if Job is not enabled (nautobot#562)

* additional pr review updates for remediation feature (nautobot#564)

* additional pr review updates

* fix dunder string method

* fix docstrings and fix filters

* fix api testing for remediation settings

* Update nautobot_golden_config/forms.py

Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com>

* run black after import conflicct

* fix imports again after merge conflict

---------

Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com>
Co-authored-by: Jeff Kala <48843785+jeffkala@users.noreply.github.com>
Co-authored-by: mzb <marek.zbroch@networktocode.com>
Co-authored-by: pato23arg <patricior_villar@hotmail.com>
Co-authored-by: pvillar_netdev <pato23arg@users.noreply.github.com>
Co-authored-by: Jeff Kala <jeff.kala@networktocode.com>
Co-authored-by: Jeff Kala <jeff.l.kala@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants