Skip to content

Commit 8ea40dc

Browse files
committed
docs(protect): docstring for device/ipam protection
1 parent 493f08a commit 8ea40dc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

netbox_cmdb/netbox_cmdb/protect.py

+10
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33

44

55
def from_device_name_change(*fields):
6+
"""Protects from Device name changes in NetBox DCIM.
7+
8+
This is useful only to prevent Device name changes when CMDB is linked to it.
9+
"""
10+
611
def decorator(cls):
712
if cls not in MODELS_LINKED_TO_DEVICE:
813
MODELS_LINKED_TO_DEVICE[cls] = set()
@@ -19,6 +24,11 @@ def decorator(cls):
1924

2025

2126
def from_ip_address_change(*fields):
27+
"""Protects from IP Address "address" changes in NetBox IPAM.
28+
29+
This is useful only to prevent IP Address "address" changes when CMDB is linked to it.
30+
"""
31+
2232
def decorator(cls):
2333
if cls not in MODELS_LINKED_TO_IP_ADDRESS:
2434
MODELS_LINKED_TO_IP_ADDRESS[cls] = set()

0 commit comments

Comments
 (0)