15
15
from django .dispatch import receiver
16
16
from django .db import models
17
17
from django .urls import reverse
18
+ < << << << HEAD
18
19
from dcim .models import Device
20
+ == == == =
21
+ >> >> >> > 83 ada44 ... NetBox 2.9 support
19
22
from .choices import OnboardingStatusChoices , OnboardingFailChoices
20
23
from .release import NETBOX_RELEASE_CURRENT , NETBOX_RELEASE_29
21
24
@@ -57,6 +60,14 @@ class OnboardingTask(ChangeLoggedModel):
57
60
help_text = "Timeout period in sec to wait while connecting to the device" , default = 30
58
61
)
59
62
63
+ < << << << HEAD
64
+ == == == =
65
+ created_on = models .DateTimeField (auto_now_add = True )
66
+
67
+ class Meta : # noqa: D106 "missing docstring in public nested class"
68
+ ordering = ["created_on" ]
69
+
70
+ >> >> >> > 83 ada44 ... NetBox 2.9 support
60
71
def __str__ (self ):
61
72
"""String representation of an OnboardingTask."""
62
73
return f"{ self .site } : { self .ip_address } "
@@ -69,6 +80,7 @@ def get_absolute_url(self):
69
80
from utilities .querysets import RestrictedQuerySet # pylint: disable=no-name-in-module, import-outside-toplevel
70
81
71
82
objects = RestrictedQuerySet .as_manager ()
83
+ < << << << HEAD
72
84
73
85
74
86
class OnboardingDevice (models .Model ):
@@ -151,3 +163,5 @@ def init_onboarding_for_new_device(sender, instance, created, **kwargs): # pyli
151
163
"""
152
164
if created :
153
165
OnboardingDevice .objects .create (device = instance )
166
+ == == == =
167
+ >> >> >> > 83 ada44 ... NetBox 2.9 support
0 commit comments