Skip to content

Commit

Permalink
docs: overhaul development docs section
Browse files Browse the repository at this point in the history
  • Loading branch information
Kircheneer committed Jun 13, 2024
1 parent 8ca4f77 commit c4fd5ac
Show file tree
Hide file tree
Showing 10 changed files with 166 additions and 147 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ This Nautobot application framework includes the following integrations:

Read more about integrations [here](https://docs.nautobot.com/projects/ssot/en/latest/user/integrations). To enable and configure integrations follow the instructions from [the install guide](https://docs.nautobot.com/projects/ssot/en/latest/admin/install/#integrations-configuration).

### Building Your Own Integration

If you need an integration that is not supported, you can build your own! Check out the documentation [here](https://docs.nautobot.com/projects/ssot/en/latest/dev/jobs).

### Screenshots

---
Expand Down
1 change: 1 addition & 0 deletions changes/468.documentation
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Overhauled developer documentation structure.
1 change: 1 addition & 0 deletions changes/468.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed SSoT jobs only allowing dry run unless you overwrote the `run` method.
21 changes: 21 additions & 0 deletions docs/dev/issues.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Reference: Common Issues and Solutions

This pages describes common issues when implementing SSoT integrations and their respective solutions.

## Converting Types Between Database and Pydantic

Developers are able to override the default loading of basic parameters to control how that parameter is loaded from Nautobot.

This only works with basic parameters belonging to the model and does not override more complex parameters (foreign keys, custom fields, custom relationships, etc.).

To override a parameter, add a method with the name `load_param_{param_key}` to your adapter class inheriting from `NautobotAdapter`:

```python
from nautobot_ssot.contrib import NautobotAdapter

class YourSSoTNautobotAdapter(NautobotAdapter):
...
def load_param_time_zone(self, parameter_name, database_object):
"""Custom loader for `time_zone` parameter."""
return str(getattr(database_object, parameter_name))
```
220 changes: 92 additions & 128 deletions docs/dev/jobs.md

Large diffs are not rendered by default.

File renamed without changes.
2 changes: 2 additions & 0 deletions docs/user/app_getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ PLUGINS_CONFIG = {
## What are the next steps?

You can check out the [Use Cases](app_use_cases.md) section for more examples.

Alternatively, if you intend to build your own integration, check out [Developing Data Source and Data Target Jobs](../dev/jobs.md).
9 changes: 5 additions & 4 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ nav:
- Infoblox: "user/integrations/infoblox.md"
- IPFabric: "user/integrations/ipfabric.md"
- ServiceNow: "user/integrations/servicenow.md"
- Modeling: "user/modeling.md"
- Performance: "user/performance.md"
- Frequently Asked Questions: "user/faq.md"
- External Interactions: "user/external_interactions.md"
Expand Down Expand Up @@ -147,11 +146,13 @@ nav:
- v1.1: "admin/release_notes/version_1.1.md"
- v1.0: "admin/release_notes/version_1.0.md"
- Developer Guide:
- "Tutorial: Developing Jobs": "dev/jobs.md"
- "How To: Debugging Jobs": "dev/debugging.md"
- "Reference: Issues": "dev/issues.md"
- "Reference: Modeling": "dev/modeling.md"
- Development Environment: "dev/dev_environment.md"
- Extending the App: "dev/extending.md"
- Developing Jobs: "dev/jobs.md"
- Debugging Jobs: "dev/debugging.md"
- Contributing to the App: "dev/contributing.md"
- Development Environment: "dev/dev_environment.md"
- Code Reference:
- "dev/code_reference/index.md"
- Package: "dev/code_reference/package.md"
Expand Down
53 changes: 39 additions & 14 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def is_truthy(arg):
namespace.configure(
{
"nautobot_ssot": {
"nautobot_ver": "2.1.0",
"nautobot_ver": "2.2.5",
"project_name": "nautobot-ssot",
"python_ver": "3.11",
"local": False,
Expand Down

0 comments on commit c4fd5ac

Please sign in to comment.