Skip to content

Commit 188504c

Browse files
committed
Update readme to match other examples
1 parent a512f9b commit 188504c

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

examples/05-nautobot-peeringdb/README.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
1-
# playground-diffsync
2-
3-
## Description
4-
5-
This repository is just a set of examples around [diffsync](https://github.com/networktocode/diffsync) in order to understand how it works and how you could use it.
6-
7-
## Install dependencies
8-
9-
```bash
10-
python3 -m venv .venv
11-
source .venv/bin/activate
12-
pip3 install -r requirements.txt
13-
```
1+
# Example 5 - PeeringDB to Nautobot synchronisation
142

153
## Context
164

@@ -20,14 +8,24 @@ In Peering DB there is a model that defines a `Facility` and you can get informa
208

219
Because of the nature of the demo, we will focus on syncing from PeeringDB to Nautobot (we can assume that PeeringDB is the authoritative System of Record) and we will skip the `delete` part of the `diffsync` library.
2210

23-
## Show me the code
24-
2511
We have 3 files:
2612

2713
- `models.py`: defines the reference models that we will use: `RegionMode` and `SiteModel`
2814
- `adapter_peeringdb.py`: defines the PeeringDB adapter to translate via `load()` the data from PeeringDB into the reference models commented above. Notice that we don't define CRUD methods because we will sync from it (no to it)
2915
- `adapter_nautobot.py`: deifnes the Nautobot adapter with the `load()` and the CRUD methods
3016

17+
> The source code for this example is in Github in the [examples/05-nautobot-peeringdb/](https://github.com/networktocode/diffsync/tree/main/examples/05-nautobot-peeringdb) directory.
18+
19+
## Install dependencies
20+
21+
```bash
22+
python3 -m venv .venv
23+
source .venv/bin/activate
24+
pip3 install -r requirements.txt
25+
```
26+
27+
## Run it interactivelly
28+
3129
```python
3230
from IPython import embed
3331
embed(colors="neutral")

0 commit comments

Comments
 (0)