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

Initial working version of nautobot-ssot plugin #1

Merged
merged 42 commits into from
Jul 2, 2021
Merged
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
e29a643
Initial content creation
glennmatthews May 17, 2021
04c867c
More progress towards a basic functioning UI
glennmatthews May 24, 2021
8899de3
Create nautobot_data_sync_servicenow
glennmatthews May 28, 2021
3f367f5
Renames
glennmatthews May 28, 2021
e144eea
Add dashboard view, add source/target/start_time fields to Sync model…
glennmatthews Jun 4, 2021
7a47c4a
Extract ServiceNow plugin to its own repository
glennmatthews Jun 7, 2021
c304c6a
Some refactoring and point fixes
glennmatthews Jun 7, 2021
198a7fe
Log traceback if exception occurs during sync
glennmatthews Jun 8, 2021
6c50e2f
Rename changed_object field to synced_object to be more accurate
glennmatthews Jun 10, 2021
697717e
Breadcrumb fixup
glennmatthews Jun 10, 2021
a39a034
Improve datetime rendering in str(Sync)
glennmatthews Jun 10, 2021
9e6f50b
Improve sync detail view
glennmatthews Jun 10, 2021
64f073f
Various content
glennmatthews Jun 14, 2021
8b108c3
Refactor to more closely align with Jobs core functionality
glennmatthews Jun 15, 2021
1bcf8f2
Temporarily add dependency on my PR branch
glennmatthews Jun 15, 2021
3b9a5de
Initial very rough version of data_source_target view
glennmatthews Jun 15, 2021
81b61c9
Refine per-data-source/target detail view
glennmatthews Jun 16, 2021
ec0e365
Fix bug with null object_repr, refine UI
glennmatthews Jun 17, 2021
c1d0ea5
Improved logging; a few UI tweaks in progress
glennmatthews Jun 17, 2021
7e2e03c
Update temporary Nautobot dependency now that nautobot/nautobot#576 i…
glennmatthews Jun 18, 2021
db5bcf3
Combine synced_object and object_repr columns into one
glennmatthews Jun 18, 2021
1ec71ab
Diff rendering, first version
glennmatthews Jun 18, 2021
174d30f
Avoid an error if the related_object doesn't have a class_path
glennmatthews Jun 18, 2021
0a077e7
Blacken
glennmatthews Jun 18, 2021
22dfb43
Linting
glennmatthews Jun 18, 2021
2f2521f
Regenerate migrations and remove ChangeLoggedModel from Sync
glennmatthews Jun 18, 2021
8aba02b
Fix CI?
glennmatthews Jun 18, 2021
3e2f836
Fix sync_logentries view
glennmatthews Jun 18, 2021
c70c89b
Another CI fix?
glennmatthews Jun 18, 2021
d21477d
Another attempt at fixing CI
glennmatthews Jun 18, 2021
0a5b269
Various UI refinements
glennmatthews Jun 23, 2021
97eb871
Update nautobot dependency, add some docs
glennmatthews Jun 24, 2021
658bd72
Review comments
glennmatthews Jun 25, 2021
076b8d5
Rework 'Statistics' table for readability
glennmatthews Jun 25, 2021
1a782f0
Add config toggle to hide example jobs
glennmatthews Jun 28, 2021
6bbc7ec
Update example jobs to be more realistic, using DiffSync
glennmatthews Jun 28, 2021
39a5600
Fix incorrect filtering of data in dashboard view
glennmatthews Jun 28, 2021
f7d04df
Linting
glennmatthews Jun 28, 2021
d105111
Remove ObjectChange linkage from SyncLogEntry and lookup_object() as …
glennmatthews Jun 28, 2021
ec17c25
Add some unit test coverage
glennmatthews Jun 28, 2021
c0f3ee8
Address review comment
glennmatthews Jun 30, 2021
220b6e3
Update docs and add screenshots
glennmatthews Jul 2, 2021
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: 12 additions & 0 deletions development/Dockerfile
Original file line number Diff line number Diff line change
@@ -12,8 +12,20 @@ COPY poetry.lock pyproject.toml /source/
# and the project is copied in and installed after this step
RUN poetry install --no-interaction --no-ansi --no-root

COPY nautobot-plugin-data-sync-servicenow/poetry.lock nautobot-plugin-data-sync-servicenow/pyproject.toml /source/nautobot-plugin-data-sync-servicenow/
WORKDIR /source/nautobot-plugin-data-sync-servicenow
RUN poetry install --no-interaction --no-ansi --no-root

# Copy in the rest of the source code and install local Nautobot plugin
WORKDIR /source
COPY . /source
RUN poetry install --no-interaction --no-ansi

WORKDIR /source/nautobot-plugin-data-sync-servicenow
RUN poetry install --no-interaction --no-ansi

# Work around https://github.com/python-poetry/poetry/issues/3139
RUN pip install colorama

WORKDIR /source
COPY development/nautobot_config.py /opt/nautobot/nautobot_config.py
8 changes: 8 additions & 0 deletions development/nautobot_config.py
Original file line number Diff line number Diff line change
@@ -238,6 +238,14 @@ def is_truthy(arg):
"handlers": ["verbose_console" if DEBUG else "normal_console"],
"level": LOG_LEVEL,
},
"nautobot_data_sync": {
"handlers": ["verbose_console" if DEBUG else "normal_console"],
"level": LOG_LEVEL,
},
"nautobot_data_sync_servicenow": {
"handlers": ["verbose_console" if DEBUG else "normal_console"],
"level": LOG_LEVEL,
},
},
}

5 changes: 5 additions & 0 deletions nautobot-plugin-data-sync-servicenow/.bandit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
skips: []
# No need to check for security issues in the test scripts!
exclude_dirs:
- "./tests/"
20 changes: 20 additions & 0 deletions nautobot-plugin-data-sync-servicenow/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Docker related
development/Dockerfile
development/docker-compose*.yml
development/*.env
*.env

# Python
**/*.pyc
**/*.pyo


# Other
docs/_build
FAQ.md
.git/
.gitignore
.github
tasks.py
LICENSE
**/*.log
4 changes: 4 additions & 0 deletions nautobot-plugin-data-sync-servicenow/.flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
# E501: Line length is enforced by Black, so flake8 doesn't need to check it
# W503: Black disagrees with this rule, as does PEP 8; Black wins
ignore = E501, W503
2 changes: 2 additions & 0 deletions nautobot-plugin-data-sync-servicenow/.github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Default owner(s) of all files in this repository
* @glennmatthews @jathanism @lampwins
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: 🐛 Bug Report
about: Report a reproducible bug in the current release of nautobot-data-sync-servicenow
---

### Environment
* Python version: <!-- Example: 3.7.7 -->
* Nautobot version: <!-- Example: 1.0.0 -->
* nautobot-data-sync-servicenow version: <!-- Example: 0.1.0 -->

<!-- What did you expect to happen? -->
### Expected Behavior


<!-- What happened instead? -->
### Observed Behavior

<!--
Describe in detail the exact steps that someone else can take to reproduce
this bug using the current release.
-->
### Steps to Reproduce
1.
2.
3.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: ✨ Feature Request
about: Propose a new feature or enhancement

---

### Environment
* Nautobot version: <!-- Example: 1.0.0 -->
* nautobot-data-sync-servicenow version: <!-- Example: 0.1.0 -->

<!--
Describe in detail the new functionality you are proposing.
-->
### Proposed Functionality

<!--
Convey an example use case for your proposed feature. Write from the
perspective of a user who would benefit from the proposed
functionality and describe how.
--->
### Use Case

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## New Pull Request

Have you:
- [ ] Updated the README if necessary?
- [ ] Updated any configuration settings?
- [ ] Written a unit test?

## Change Notes

## Justification
Loading