-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e9599f5
commit 9aa1fc1
Showing
5 changed files
with
18 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
""" | ||
This module is going to contain all duct tape stuff which is required to support | ||
newer versions of NetBox | ||
different versions of NetBox together | ||
""" | ||
from validity import config | ||
|
||
|
||
DEVICE_ROLE_RELATION = "device_role" if config.netbox_version < "3.6.0" else "role" | ||
|
||
|
||
if config.netbox_version < "3.7.0": | ||
from extras.webhooks import enqueue_object | ||
from netbox.context import webhooks_queue as events_queue | ||
from netbox.models.features import WebhooksMixin as EventRulesMixin | ||
else: | ||
from extras.events import enqueue_object | ||
from netbox.context import events_queue | ||
from netbox.models.features import EventRulesMixin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters