Add a Certificate model alongside software licenses with type, common name, SANs, issuer, serial number, fingerprint, validity period, auto renewal, certificate file and storage locations. Certificates can be assigned to software products, installations, devices, virtual machines and tenants. Extract the expiration reminder settings and logic into a shared ExpirationNotificationModel base and a generic notification job, so certificates get the same default/custom reminders, NetBox notifications and optional SMTP emails as licenses (separate event type, log model and email permission). Includes UI views, filters, table, bulk import/edit, REST API endpoint, migration 0015, German translations, tests and README/CHANGELOG updates. Co-Authored-By: Claude Opus 5.5 <[email protected]>
21 lines
681 B
Python
21 lines
681 B
Python
from netbox.api.routers import NetBoxRouter
|
|
from netbox_slm.api.views import (
|
|
NetboxSLMRootView,
|
|
SoftwareProductViewSet,
|
|
SoftwareProductVersionViewSet,
|
|
SoftwareProductInstallationViewSet,
|
|
SoftwareLicenseViewSet,
|
|
CertificateViewSet,
|
|
)
|
|
|
|
router = NetBoxRouter()
|
|
router.APIRootView = NetboxSLMRootView
|
|
|
|
router.register("softwareproducts", SoftwareProductViewSet)
|
|
router.register("softwareproductversions", SoftwareProductVersionViewSet)
|
|
router.register("softwareproductinstallations", SoftwareProductInstallationViewSet)
|
|
router.register("softwarelicenses", SoftwareLicenseViewSet)
|
|
router.register("certificates", CertificateViewSet)
|
|
|
|
urlpatterns = router.urls
|