nautobot 2.2.2__py3-none-any.whl → 2.2.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. nautobot/apps/jobs.py +2 -0
  2. nautobot/core/api/utils.py +12 -9
  3. nautobot/core/apps/__init__.py +2 -2
  4. nautobot/core/celery/__init__.py +79 -68
  5. nautobot/core/celery/backends.py +9 -1
  6. nautobot/core/celery/control.py +4 -7
  7. nautobot/core/celery/schedulers.py +4 -2
  8. nautobot/core/celery/task.py +78 -5
  9. nautobot/core/graphql/schema.py +2 -1
  10. nautobot/core/jobs/__init__.py +2 -1
  11. nautobot/core/templates/generic/object_list.html +3 -3
  12. nautobot/core/templatetags/helpers.py +66 -9
  13. nautobot/core/testing/__init__.py +6 -1
  14. nautobot/core/testing/api.py +12 -13
  15. nautobot/core/testing/mixins.py +2 -2
  16. nautobot/core/testing/views.py +50 -51
  17. nautobot/core/tests/test_api.py +23 -2
  18. nautobot/core/tests/test_templatetags_helpers.py +32 -0
  19. nautobot/core/tests/test_views.py +19 -0
  20. nautobot/core/tests/test_views_utils.py +22 -1
  21. nautobot/core/utils/module_loading.py +89 -0
  22. nautobot/core/views/utils.py +3 -2
  23. nautobot/dcim/choices.py +14 -0
  24. nautobot/dcim/forms.py +51 -1
  25. nautobot/dcim/models/device_components.py +9 -5
  26. nautobot/dcim/templates/dcim/location.html +32 -13
  27. nautobot/dcim/templates/dcim/location_migrate_data_to_contact.html +102 -0
  28. nautobot/dcim/tests/test_views.py +137 -0
  29. nautobot/dcim/urls.py +5 -0
  30. nautobot/dcim/views.py +149 -1
  31. nautobot/extras/api/views.py +21 -10
  32. nautobot/extras/constants.py +3 -3
  33. nautobot/extras/datasources/git.py +47 -58
  34. nautobot/extras/forms/forms.py +3 -1
  35. nautobot/extras/jobs.py +79 -146
  36. nautobot/extras/models/datasources.py +0 -2
  37. nautobot/extras/models/jobs.py +36 -18
  38. nautobot/extras/plugins/__init__.py +1 -20
  39. nautobot/extras/signals.py +6 -9
  40. nautobot/extras/test_jobs/__init__.py +8 -0
  41. nautobot/extras/test_jobs/dry_run.py +3 -2
  42. nautobot/extras/test_jobs/fail.py +43 -0
  43. nautobot/extras/test_jobs/ipaddress_vars.py +40 -1
  44. nautobot/extras/test_jobs/jobs_module/__init__.py +5 -0
  45. nautobot/extras/test_jobs/jobs_module/jobs_submodule/__init__.py +1 -0
  46. nautobot/extras/test_jobs/jobs_module/jobs_submodule/jobs.py +6 -0
  47. nautobot/extras/test_jobs/pass.py +40 -0
  48. nautobot/extras/test_jobs/relative_import.py +11 -0
  49. nautobot/extras/tests/test_api.py +3 -0
  50. nautobot/extras/tests/test_datasources.py +125 -118
  51. nautobot/extras/tests/test_job_variables.py +57 -15
  52. nautobot/extras/tests/test_jobs.py +135 -1
  53. nautobot/extras/tests/test_models.py +26 -19
  54. nautobot/extras/tests/test_plugins.py +1 -3
  55. nautobot/extras/tests/test_views.py +2 -4
  56. nautobot/extras/views.py +47 -95
  57. nautobot/ipam/api/views.py +8 -1
  58. nautobot/ipam/graphql/types.py +11 -0
  59. nautobot/ipam/mixins.py +32 -0
  60. nautobot/ipam/models.py +2 -1
  61. nautobot/ipam/querysets.py +6 -1
  62. nautobot/ipam/tests/test_models.py +82 -0
  63. nautobot/project-static/docs/assets/extra.css +4 -0
  64. nautobot/project-static/docs/code-reference/nautobot/apps/api.html +1 -1
  65. nautobot/project-static/docs/code-reference/nautobot/apps/jobs.html +180 -211
  66. nautobot/project-static/docs/development/apps/api/platform-features/jobs.html +1 -1
  67. nautobot/project-static/docs/development/core/application-registry.html +126 -84
  68. nautobot/project-static/docs/development/core/model-checklist.html +49 -1
  69. nautobot/project-static/docs/development/core/model-features.html +1 -1
  70. nautobot/project-static/docs/development/jobs/index.html +334 -58
  71. nautobot/project-static/docs/development/jobs/migration/from-v1.html +1 -1
  72. nautobot/project-static/docs/objects.inv +0 -0
  73. nautobot/project-static/docs/release-notes/version-2.2.html +237 -55
  74. nautobot/project-static/docs/search/search_index.json +1 -1
  75. nautobot/project-static/docs/sitemap.xml +254 -254
  76. nautobot/project-static/docs/sitemap.xml.gz +0 -0
  77. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/upgrading-from-nautobot-v1.html +7 -4
  78. nautobot/project-static/docs/user-guide/core-data-model/ipam/vlan.html +111 -0
  79. nautobot/project-static/docs/user-guide/platform-functionality/jobs/index.html +15 -28
  80. nautobot/project-static/docs/user-guide/platform-functionality/jobs/models.html +4 -4
  81. nautobot/project-static/js/forms.js +18 -11
  82. {nautobot-2.2.2.dist-info → nautobot-2.2.3.dist-info}/METADATA +3 -3
  83. {nautobot-2.2.2.dist-info → nautobot-2.2.3.dist-info}/RECORD +87 -81
  84. nautobot/extras/test_jobs/job_variables.py +0 -93
  85. {nautobot-2.2.2.dist-info → nautobot-2.2.3.dist-info}/LICENSE.txt +0 -0
  86. {nautobot-2.2.2.dist-info → nautobot-2.2.3.dist-info}/NOTICE +0 -0
  87. {nautobot-2.2.2.dist-info → nautobot-2.2.3.dist-info}/WHEEL +0 -0
  88. {nautobot-2.2.2.dist-info → nautobot-2.2.3.dist-info}/entry_points.txt +0 -0
@@ -1,93 +0,0 @@
1
- from nautobot.core.celery import register_jobs
2
- from nautobot.extras.jobs import (
3
- BooleanVar,
4
- ChoiceVar,
5
- FileVar,
6
- IntegerVar,
7
- IPAddressVar,
8
- IPAddressWithMaskVar,
9
- IPNetworkVar,
10
- Job,
11
- JSONVar,
12
- MultiChoiceVar,
13
- MultiObjectVar,
14
- ObjectVar,
15
- StringVar,
16
- TextVar,
17
- )
18
- from nautobot.extras.models import Role
19
-
20
- CHOICES = (("ff0000", "Red"), ("00ff00", "Green"), ("0000ff", "Blue"))
21
-
22
-
23
- class BooleanVarJob(Job):
24
- var1 = BooleanVar()
25
-
26
-
27
- class ChoiceVarJob(Job):
28
- var1 = ChoiceVar(choices=CHOICES)
29
-
30
-
31
- class FileVarJob(Job):
32
- var1 = FileVar()
33
-
34
-
35
- class IntegerVarJob(Job):
36
- var1 = IntegerVar(min_value=5, max_value=10)
37
-
38
-
39
- class IPAddressVarJob(Job):
40
- var1 = IPAddressVar()
41
-
42
-
43
- class IPAddressWithMaskVarJob(Job):
44
- var1 = IPAddressWithMaskVar()
45
-
46
-
47
- class IPNetworkVarJob(Job):
48
- var1 = IPNetworkVar()
49
-
50
-
51
- class MultiChoiceVarJob(Job):
52
- var1 = MultiChoiceVar(choices=CHOICES)
53
-
54
-
55
- class MultiObjectVarJob(Job):
56
- var1 = MultiObjectVar(model=Role)
57
-
58
-
59
- class ObjectVarJob(Job):
60
- var1 = ObjectVar(model=Role)
61
-
62
-
63
- class StringVarJob(Job):
64
- var1 = StringVar(min_length=3, max_length=3, regex=r"[a-z]+")
65
-
66
-
67
- class TextVarJob(Job):
68
- var1 = TextVar()
69
-
70
-
71
- class JSONVarJob(Job):
72
- var1 = JSONVar()
73
-
74
-
75
- job_list = [
76
- BooleanVarJob,
77
- ChoiceVarJob,
78
- FileVarJob,
79
- IntegerVarJob,
80
- IPAddressVarJob,
81
- IPAddressWithMaskVarJob,
82
- IPNetworkVarJob,
83
- JSONVarJob,
84
- MultiChoiceVarJob,
85
- MultiObjectVarJob,
86
- ObjectVarJob,
87
- StringVarJob,
88
- TextVarJob,
89
- ]
90
-
91
- # Avoid registering the jobs with Celery when this is imported directly as a file
92
- if __name__ == "test_job_variables":
93
- register_jobs(*job_list)