Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
cdc460b
chore: update diode target (#19)
mfiedorowicz Oct 16, 2024
3919cea
chore: add GitHub issue templates (#20)
mfiedorowicz Oct 21, 2024
65e261a
chore: GHA release - use GITHUB_TOKEN (#27)
mfiedorowicz Nov 27, 2024
f86f90e
chore: GHA release - set permissions (#28)
mfiedorowicz Nov 27, 2024
b44f07b
chore: update grpcio version (#29)
arthanson Dec 12, 2024
5a9fdaf
chore: GHA release - add missing permissions (#30)
mfiedorowicz Dec 12, 2024
4536981
fix: use build semantic version (#32)
mfiedorowicz Dec 13, 2024
0729278
chore: gha - security improvements (#34)
mfiedorowicz Dec 30, 2024
a446fe7
feat: set entity timestamp (at source) if not provided (#36)
mfiedorowicz Jan 24, 2025
75bf078
first pass update datamodel
ltucker Mar 17, 2025
838965f
fix: include several missing many-many references
ltucker Apr 3, 2025
3cdce2b
fix: include several missing many-many references (#38)
ltucker Apr 3, 2025
a0b432e
feat: update protobufs with additional custom field types
ltucker Apr 9, 2025
3bc433a
feat: update protobufs with additional custom field types (#39)
ltucker Apr 10, 2025
d8baa10
adds oauth2 authentication
jajeffries Apr 15, 2025
6b1df25
fixes PR labeller
jajeffries Apr 15, 2025
9907b73
linting
jajeffries Apr 15, 2025
1e0d9c5
adds retries when 401 response
jajeffries Apr 15, 2025
6c1a76e
adds config for auth retries
jajeffries Apr 15, 2025
6b4ceea
add write access to contents for labeller action
jajeffries Apr 15, 2025
24e5c2c
reverts action permissions
jajeffries Apr 15, 2025
0f87d1f
lock pytest-cov to 6.0.0 to avoid output parsing issue
jajeffries Apr 15, 2025
0197fc2
refactors error handling
jajeffries Apr 16, 2025
5f3e93b
expose max auth retries on client constructor
jajeffries Apr 16, 2025
d97975f
fixes linting
jajeffries Apr 16, 2025
f240cb1
Merge remote-tracking branch 'origin/update_datamodel' into oauth2
jajeffries Apr 17, 2025
4b7ff6e
fixes linting
jajeffries Apr 17, 2025
9bc9e0c
handle empty paths and adds tests
jajeffries Apr 17, 2025
90f33a9
linting
jajeffries Apr 17, 2025
210719a
adds better bath handling
jajeffries Apr 17, 2025
a285af3
omits ingester from coverage report
jajeffries Apr 17, 2025
07cccc8
feat: adds oauth2 authentication (#40)
jajeffries Apr 17, 2025
0b20fb0
chore: update dependencies to allow newer versions (#41)
mfiedorowicz Apr 17, 2025
94114e9
wraps exceptions thrown while authenticating
jajeffries Apr 22, 2025
6c374d1
feat: wrap exceptions thrown while authenticating (#42)
jajeffries Apr 22, 2025
5390507
feat: add OAuth2 diode:ingest scope to authentication process (#43)
mfiedorowicz Apr 23, 2025
9c705e9
perf: update supported object types list
mfiedorowicz Apr 23, 2025
ccce825
docs: add Rack Role to supported object types list in README
mfiedorowicz Apr 23, 2025
2dccc83
perf: update supported entities list (#44)
mfiedorowicz Apr 23, 2025
6f7070d
feat: diode-sdk-python 1.0.0-rc (#45)
mfiedorowicz Apr 23, 2025
daad204
Merge branch 'release' into develop-release-resolve-conflict
mfiedorowicz Apr 23, 2025
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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @leoparente @mfiedorowicz
* @leoparente @ltucker @mfiedorowicz
2 changes: 1 addition & 1 deletion .github/workflows/lint-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=netboxlabs.diode.sdk tests/ | tee pytest-coverage.txt

- name: Pytest coverage comment
uses: MishaKav/pytest-coverage-comment@main
uses: MishaKav/pytest-coverage-comment@81882822c5b22af01f91bd3eacb1cefb6ad73dc2 # v1
with:
pytest-coverage-path: ./pytest-coverage.txt
junitxml-path: ./pytest.xml
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
with:
node-version: "lts/*"
- name: Write package.json
uses: DamianReeves/write-file-action@master
uses: DamianReeves/write-file-action@6929a9a6d1807689191dcc8bbe62b54d70a32b42 # v1.3
with:
path: ./package.json
write-mode: overwrite
Expand All @@ -58,7 +58,7 @@ jobs:
}
}
- name: Write .releaserc.json
uses: DamianReeves/write-file-action@master
uses: DamianReeves/write-file-action@6929a9a6d1807689191dcc8bbe62b54d70a32b42 # v1.3
with:
path: ./.releaserc.json
write-mode: overwrite
Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:
retention-days: 30
if-no-files-found: error
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@67339c736fd9354cd4f8cb0b744f2b82a74b5c70 # v.1.12.3
with:
packages-dir: dist

Expand All @@ -183,7 +183,7 @@ jobs:
with:
node-version: "lts/*"
- name: Write package.json
uses: DamianReeves/write-file-action@master
uses: DamianReeves/write-file-action@6929a9a6d1807689191dcc8bbe62b54d70a32b42 # v1.3
with:
path: ./package.json
write-mode: overwrite
Expand All @@ -197,7 +197,7 @@ jobs:
}
}
- name: Write .releaserc.json
uses: DamianReeves/write-file-action@master
uses: DamianReeves/write-file-action@6929a9a6d1807689191dcc8bbe62b54d70a32b42 # v1.3
with:
path: ./.releaserc.json
write-mode: overwrite
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ __pycache__/
build/
dist/
.eggs/
*.egg-info
*.egg-info
poetry.lock
107 changes: 88 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ pip install netboxlabs-diode-sdk

### Environment variables

* `DIODE_API_KEY` - API key for the Diode service
* `DIODE_SDK_LOG_LEVEL` - Log level for the SDK (default: `INFO`)
* `DIODE_SENTRY_DSN` - Optional Sentry DSN for error reporting
* `DIODE_CLIENT_ID` - Client ID for OAuth2 authentication
* `DIODE_CLIENT_SECRET` - Client Secret for OAuth2 authentication

### Example

Expand Down Expand Up @@ -76,26 +77,94 @@ if __name__ == "__main__":

## Supported entities (object types)

* [Device](./docs/entities.md#device)
* [Interface](./docs/entities.md#interface)
* [Device Type](./docs/entities.md#device-type)
* [Platform](./docs/entities.md#platform)
* [Manufacturer](./docs/entities.md#manufacturer)
* [Site](./docs/entities.md#site)
* [Role](./docs/entities.md#role)
* [IP Address](./docs/entities.md#ip-address)
* [Prefix](./docs/entities.md#prefix)
* [Cluster Group](./docs/entities.md#cluster-group)
* [Cluster Type](./docs/entities.md#cluster-type)
* [Cluster](./docs/entities.md#cluster)
* [Virtual Machine](./docs/entities.md#virtual-machine)
* [Virtual Disk](./docs/entities.md#virtual-disk)
* [VM Interface](./docs/entities.md#vm-interface)
* ASN
* ASN Range
* Aggregate
* Circuit
* Circuit Group
* Circuit Group Assignment
* Circuit Termination
* Circuit Type
* Cluster
* Cluster Group
* Cluster Type
* Console Port
* Console Server Port
* Contact
* Contact Assignment
* Contact Group
* Contact Role
* Device
* Device Bay
* Device Role
* Device Type
* FHRP Group
* FHRP Group Assignment
* Front Port
* IKE Policy
* IKE Proposal
* IP Address
* IP Range
* IP Sec Policy
* IP Sec Profile
* IP Sec Proposal
* Interface
* Inventory Item
* Inventory Item Role
* L2VPN
* L2VPN Termination
* Location
* MAC Address
* Manufacturer
* Module
* Module Bay
* Module Type
* Platform
* Power Feed
* Power Outlet
* Power Panel
* Power Port
* Prefix
* Provider
* Provider Account
* Provider Network
* RIR
* Rack
* Rack Role
* Rack Type
* Rear Port
* Region
* Role
* Route Target
* Service
* Site
* Site Group
* Tag
* Tenant
* Tenant Group
* Tunnel
* Tunnel Group
* Tunnel Termination
* VLAN
* VLAN Group
* VLAN Translation Policy
* VLAN Translation Rule
* VM Interface
* VRF
* Virtual Chassis
* Virtual Circuit
* Virtual Circuit Termination
* Virtual Circuit Type
* Virtual Device Context
* Virtual Disk
* Virtual Machine
* Wireless Lan
* Wireless Lan Group
* Wireless Link

## Development notes

Code in `netboxlabs/diode/sdk/diode/*` is generated from Protocol Buffers definitions (will be published and referred
here soon).
Code in `netboxlabs/diode/sdk/diode/*` is generated from Protocol Buffers definitions (will be published and referenced here soon).

#### Linting

Expand All @@ -107,7 +176,7 @@ black netboxlabs/
#### Testing

```shell
pytest tests/
PYTHONPATH=$(pwd) pytest
```

## License
Expand Down
Loading