mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-25 01:48:38 -06:00
Add webhook support for additional models
This commit is contained in:
parent
4397d3da02
commit
c072ba088f
@ -231,6 +231,7 @@ class Circuit(PrimaryModel):
|
|||||||
return self._get_termination('Z')
|
return self._get_termination('Z')
|
||||||
|
|
||||||
|
|
||||||
|
@extras_features('webhooks')
|
||||||
class CircuitTermination(ChangeLoggedModel, PathEndpoint, CableTermination):
|
class CircuitTermination(ChangeLoggedModel, PathEndpoint, CableTermination):
|
||||||
circuit = models.ForeignKey(
|
circuit = models.ForeignKey(
|
||||||
to='circuits.Circuit',
|
to='circuits.Circuit',
|
||||||
|
@ -379,6 +379,7 @@ class ImageAttachment(BigIDModel):
|
|||||||
# Config contexts
|
# Config contexts
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@extras_features('webhooks')
|
||||||
class ConfigContext(ChangeLoggedModel):
|
class ConfigContext(ChangeLoggedModel):
|
||||||
"""
|
"""
|
||||||
A ConfigContext represents a set of arbitrary data available to any Device or VirtualMachine matching its assigned
|
A ConfigContext represents a set of arbitrary data available to any Device or VirtualMachine matching its assigned
|
||||||
|
@ -2,6 +2,7 @@ from django.db import models
|
|||||||
from django.utils.text import slugify
|
from django.utils.text import slugify
|
||||||
from taggit.models import TagBase, GenericTaggedItemBase
|
from taggit.models import TagBase, GenericTaggedItemBase
|
||||||
|
|
||||||
|
from extras.utils import extras_features
|
||||||
from netbox.models import BigIDModel, ChangeLoggedModel
|
from netbox.models import BigIDModel, ChangeLoggedModel
|
||||||
from utilities.choices import ColorChoices
|
from utilities.choices import ColorChoices
|
||||||
from utilities.fields import ColorField
|
from utilities.fields import ColorField
|
||||||
@ -12,6 +13,7 @@ from utilities.querysets import RestrictedQuerySet
|
|||||||
# Tags
|
# Tags
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@extras_features('webhooks')
|
||||||
class Tag(ChangeLoggedModel, TagBase):
|
class Tag(ChangeLoggedModel, TagBase):
|
||||||
color = ColorField(
|
color = ColorField(
|
||||||
default=ColorChoices.COLOR_GREY
|
default=ColorChoices.COLOR_GREY
|
||||||
|
Loading…
Reference in New Issue
Block a user