Files
NetBox-SLM/netbox_slm/__init__.py
T
MrBlakeandClaude Opus 5.5 02d965a77b feat: add certificate management with expiration reminders
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]>
2026-10-21 14:02:53 +02:00

52 lines
1.6 KiB
Python

"""
Copyright 2022-2025 ICTU
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from netbox.plugins import PluginConfig
from django.utils.translation import gettext, gettext_lazy as _
__version__ = "1.14.0"
class SLMConfig(PluginConfig):
name = "netbox_slm"
verbose_name = _("Licences")
version = __version__
description = _("Licence Management NetBox Plugin.")
author = "ICTU"
author_email = "[email protected]"
base_url = "slm"
required_settings = []
default_settings = {
"top_level_menu": True,
"link_cluster_installations": "right",
"link_device_installations": "right",
"link_virtualmachine_installations": "right",
}
def ready(self):
super().ready()
from netbox.events import EVENT_TYPE_KIND_WARNING, EventType
from netbox_slm.events import CERTIFICATE_EXPIRING, LICENSE_EXPIRING
EventType(LICENSE_EXPIRING, gettext("License expiring"), kind=EVENT_TYPE_KIND_WARNING).register()
EventType(CERTIFICATE_EXPIRING, gettext("Certificate expiring"), kind=EVENT_TYPE_KIND_WARNING).register()
from netbox_slm import jobs # noqa: F401
config = SLMConfig