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

Update Ansible Command #51

Merged
merged 23 commits into from
Dec 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
12af1a8
Initial Commit
PhillSimonds Nov 20, 2020
33ccecd
Refactor ansible.py functions
PhillSimonds Nov 21, 2020
b26f0ef
Update schema-enforcer ansible command
PhillSimonds Nov 21, 2020
0e61e21
Update code to make linting tests pass
PhillSimonds Nov 23, 2020
0bb9248
Add documentation for ansible command
PhillSimonds Nov 23, 2020
0371929
Update documentation
PhillSimonds Nov 23, 2020
21d210f
Updates per peer review
PhillSimonds Nov 24, 2020
fa8e627
update doc strings
itdependsnetworks Nov 28, 2020
0a97328
fix tests
itdependsnetworks Nov 28, 2020
83900bd
update ansible example to folder of static and inventory plugin
itdependsnetworks Nov 28, 2020
5f2f6f1
fix tests
itdependsnetworks Nov 28, 2020
a03e39b
remove jsonschema-testing
itdependsnetworks Nov 29, 2020
017499c
Updates per peer review
PhillSimonds Nov 29, 2020
bddd2c5
ps updates
itdependsnetworks Nov 29, 2020
b00571b
Update README.md with reference to ansible command
PhillSimonds Nov 29, 2020
532ca2d
Merge pull request #54 from networktocode-llc/psi/issue-44-kc-doc-str…
itdependsnetworks Nov 30, 2020
e154323
Update examples
PhillSimonds Nov 30, 2020
8d1fb96
Update files to pass YAMLLint
PhillSimonds Nov 30, 2020
08137c2
Update doc strings
PhillSimonds Nov 30, 2020
da448cf
Fix typos per peer review
PhillSimonds Nov 30, 2020
c123f07
Update ansible readme per peer review
PhillSimonds Nov 30, 2020
5b529b8
Fix typos in readme.md
PhillSimonds Nov 30, 2020
3d51c5b
Update documentation per peer review
PhillSimonds Nov 30, 2020
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
163 changes: 162 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Linux
.*.swp

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -127,4 +130,162 @@ dmypy.json

# Pyre type checker
.pyre/
jsonschema_testing.egg-info

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

### PyCharm ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### PyCharm Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/

# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml

# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/

# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$

# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml

### vscode ###
.vscode/*

*.code-workspace
3 changes: 1 addition & 2 deletions .pydocstyle.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[pydocstyle]
convention = google
inherit = false
match = (?!__init__).*\.py
match-dir = (?!tests)[^\.].*
match-dir = (?!tests)[^\.].*
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ python -m pip install schema-enforcer
Schema Enforcer requires that two different elements be defined by the user:

- Schema Definition Files: These are files which define the schema to which a given set of data should adhere.
- Structured Data Files: These are files which contain data that should adhere to the schema defined in one (or multiple) of the schema definition files
- Structured Data Files: These are files which contain data that should adhere to the schema defined in one (or multiple) of the schema definition files.

> Note: Data which needs to be validated against a schema definition can come in the form of Structured Data Files or Ansible host vars. In the interest of brevity and simplicity, this README.md contains discussion only of Structured Data Files -- for more information on how to use `schema-enforcer` with ansible host vars, see [the ansible_command README](docs/ansible_command.md)
When `schema-enforcer` runs, it assumes directory hierarchy which should be in place from the folder in which the tool is run.

Expand Down Expand Up @@ -65,7 +67,7 @@ dns_servers:
- address: "10.1.1.1"
- address: "10.2.2.2"
```
> Note: The line `# jsonschema: schemas/dns_servers` tells `schema-enforcer` the ID of the schema which the structured data defined in the file should be validated against. More information on how the structured data is mapped to a schema ID to which it should adhere can be found in the [docs/mapping_schemas.md README](https://github.com/networktocode-llc/jsonschema_testing/tree/master/docs/mapping_schemas.md)
> Note: The line `# jsonschema: schemas/dns_servers` tells `schema-enforcer` the ID of the schema which the structured data defined in the file should be validated against. More information on how the structured data is mapped to a schema ID to which it should adhere can be found in the [docs/mapping_schemas.md README](./docs/mapping_schemas.md)

The file `schema/schemas/dns.yml` is a schema definition file. It contains a schema definition for ntp servers written in JSONSchema. The data in `chi-beijing-rt1/dns.yml` and `eng-london-rt1/dns.yml` should adhere to the schema defined in this schema definition file.

Expand Down
2 changes: 0 additions & 2 deletions ansible.cfg

This file was deleted.

Loading