Skip to content

Add second type of JSON compliance using Jdiff#920

Draft
jeffkala wants to merge 17 commits intodevelopfrom
jlk-new-json-compliance
Draft

Add second type of JSON compliance using Jdiff#920
jeffkala wants to merge 17 commits intodevelopfrom
jlk-new-json-compliance

Conversation

@jeffkala
Copy link
Copy Markdown
Contributor

@jeffkala jeffkala commented Apr 5, 2025

Closes: #

What's Changed

To Do

  • Explanation of Change(s)
  • Attached Screenshots, Payload Example
  • Unit, Integration Tests
  • Documentation Updates (when adding/changing features)
  • Outline Remaining Work, Constraints from Design

@jeffkala jeffkala marked this pull request as draft April 7, 2025 17:53
Comment thread nautobot_golden_config/choices.py Outdated
@jeffkala jeffkala marked this pull request as ready for review August 27, 2025 02:33
@jeffkala jeffkala changed the title Add v2 of JSON compliance using Jdiff Add second type of JSON compliance using Jdiff Aug 27, 2025
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 27, 2025

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  nautobot_golden_config
  choices.py
  models.py
  nautobot_golden_config/nornir_plays
  config_compliance.py
Project Total  

This report was generated by python-coverage-comment-action

@jeffkala jeffkala marked this pull request as draft August 27, 2025 13:41
@jeffkala jeffkala marked this pull request as ready for review August 30, 2025 13:21

TYPE_CLI = "cli"
TYPE_JSON = "json"
TYPE_JSON_DEEPDIFF = "json-deepdiff"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for backwards compat, we will need to keep json as an option that maps to deepdiff

{% if item.rule.config_type == "xml" %}
<span id="{{ item.rule|slugify }}_actual"><pre><code class="language-xml">{{ item.actual|placeholder }}</code></pre></span>
{% elif item.rule.config_type == "json" %}
{% elif "json" in item.rule.config_type %}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{% elif "json" in item.rule.config_type %}
{% elif item.rule.config_type in ["json", "json-deepdiff", "json-jdiff"] %}

@jeffkala
Copy link
Copy Markdown
Contributor Author

jeffkala commented Sep 26, 2025

@itdependsnetworks here's an example of nested version you wanted.
Screenshot 2025-09-26 at 2 43 46 PM

needless to say, I don't think this is what anybody would want.

@jeffkala jeffkala marked this pull request as draft October 1, 2025 14:11
@jeffkala
Copy link
Copy Markdown
Contributor Author

jeffkala commented Oct 1, 2025

Converting back to DRAFT , will need to do additional work on JDIFF for the missing and extra to keep the root/parent key structure.

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.

3 participants