Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 6 additions & 2 deletions .github/configuration.testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
'netbox_napalm_plugin': {
'NAPALM_USERNAME': 'xxx',
'NAPALM_PASSWORD': 'yyy',
}
},
}

REDIS = {
Expand All @@ -46,7 +46,11 @@
'PASSWORD': '',
'DATABASE': 1,
'SSL': False,
}
},
}

SECRET_KEY = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'

API_TOKEN_PEPPERS = {
1: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',
}
4 changes: 2 additions & 2 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python 3.12
- name: Set up Python 3.14
uses: actions/setup-python@v5
with:
python-version: 3.12
python-version: 3.14
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
NETBOX_CONFIGURATION: netbox.configuration_testing
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.12', '3.13', '3.14']
services:
redis:
image: redis
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python 3.12
- name: Set up Python 3.14
uses: actions/setup-python@v5
with:
python-version: 3.12
python-version: 3.14
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion netbox_config_backup/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class NetboxConfigBackup(PluginConfig):
author = metadata.get('Author')
author_email = metadata.get('Author-email')
base_url = 'configbackup'
min_version = '4.4.0'
min_version = '4.5.0'
required_settings = [
'repository',
'committer',
Expand Down
11 changes: 5 additions & 6 deletions netbox_config_backup/graphql/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import strawberry_django

# NetBox Imports
from netbox.graphql.filter_mixins import BaseObjectTypeFilterMixin
from netbox.graphql.filters import PrimaryModelFilter

# Plugin Imports
from netbox_config_backup import models
Expand All @@ -18,9 +18,8 @@


@strawberry_django.filter(models.Backup, lookups=True)
class BackupFilter(BaseObjectTypeFilterMixin):
device: (
Annotated['DeviceFilter', strawberry.lazy('dcim.graphql.filters')]
| None # noqa: F821
) = strawberry_django.filter_field() # noqa: F821
class BackupFilter(PrimaryModelFilter):
device: Annotated['DeviceFilter', strawberry.lazy('dcim.graphql.filters')] | None = ( # noqa: F821
strawberry_django.filter_field()
) # noqa: F821
device_id: strawberry.ID | None = strawberry_django.filter_field()
14 changes: 4 additions & 10 deletions netbox_config_backup/graphql/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,16 @@
import strawberry
import strawberry_django

from netbox.graphql.types import NetBoxObjectType
from netbox.graphql.types import PrimaryObjectType
from .filters import *

from netbox_config_backup import models

__all__ = (
'BackupType',
)
__all__ = ('BackupType',)


@strawberry_django.type(
models.Backup,
fields='__all__',
filters=BackupFilter
)
class BackupType(NetBoxObjectType):
@strawberry_django.type(models.Backup, fields='__all__', filters=BackupFilter)
class BackupType(PrimaryObjectType):

name: str
device: Annotated["DeviceType", strawberry.lazy('dcim.graphql.types')] | None
Expand Down
22 changes: 22 additions & 0 deletions netbox_config_backup/migrations/0023_netbox_v040500.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 5.2.5 on 2026-01-07 04:43

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('netbox_config_backup', '0022_model_ordering'),
('users', '0015_owner'),
]

operations = [
migrations.AddField(
model_name='backup',
name='owner',
field=models.ForeignKey(
blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='users.owner'
),
),
]
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ maintainers = [
]
description = "A NetBox Switch Configuration Backup Plugin"
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.12"
keywords = ["netbox-plugin", ]
version = "2.1.9"
version = "2.2.0"
license = {file = "LICENSE"}
classifiers = [
"Programming Language :: Python :: 3",
Expand Down
5 changes: 4 additions & 1 deletion ruff.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
exclude = []
exclude = [
'.github',
]
line-length = 120
target-version = "py310"
output-format = "github"

[lint]
extend-select = ["E1", "E2", "E3", "E501", "W"]
Expand Down
Loading