feat: add license expiration notifications

This commit is contained in:
2026-07-29 11:01:00 +02:00
parent 9f3bddfbb1
commit 294e20b891
16 changed files with 514 additions and 7 deletions
+13 -3
View File
@@ -17,14 +17,14 @@ limitations under the License.
from netbox.plugins import PluginConfig
from django.utils.translation import gettext_lazy as _
__version__ = "1.11.2"
__version__ = "1.12.0"
class SLMConfig(PluginConfig):
name = "netbox_slm"
verbose_name = _("Software Lifecycle Management")
verbose_name = _("Licences")
version = __version__
description = _("Software Lifecycle Management NetBox Plugin.")
description = _("Licence Management NetBox Plugin.")
author = "ICTU"
author_email = "open-source-projects@ictu.nl"
base_url = "slm"
@@ -36,5 +36,15 @@ class SLMConfig(PluginConfig):
"link_virtualmachine_installations": "right",
}
def ready(self):
super().ready()
from netbox.events import EVENT_TYPE_KIND_WARNING, EventType
from netbox_slm.events import LICENSE_EXPIRING
EventType(LICENSE_EXPIRING, _("License expiring"), kind=EVENT_TYPE_KIND_WARNING).register()
from netbox_slm import jobs # noqa: F401
config = SLMConfig