infrahub-server 1.6.2__py3-none-any.whl → 1.7.0__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 (253) hide show
  1. infrahub/actions/tasks.py +4 -2
  2. infrahub/api/exceptions.py +2 -2
  3. infrahub/api/schema.py +3 -1
  4. infrahub/artifacts/tasks.py +1 -0
  5. infrahub/auth.py +2 -2
  6. infrahub/cli/db.py +54 -28
  7. infrahub/computed_attribute/gather.py +3 -4
  8. infrahub/computed_attribute/tasks.py +23 -6
  9. infrahub/config.py +8 -0
  10. infrahub/constants/enums.py +12 -0
  11. infrahub/core/account.py +12 -9
  12. infrahub/core/attribute.py +106 -108
  13. infrahub/core/branch/models.py +44 -71
  14. infrahub/core/branch/tasks.py +5 -3
  15. infrahub/core/changelog/diff.py +1 -20
  16. infrahub/core/changelog/models.py +0 -7
  17. infrahub/core/constants/__init__.py +17 -0
  18. infrahub/core/constants/database.py +0 -1
  19. infrahub/core/constants/schema.py +0 -1
  20. infrahub/core/convert_object_type/repository_conversion.py +3 -4
  21. infrahub/core/diff/branch_differ.py +1 -1
  22. infrahub/core/diff/conflict_transferer.py +1 -1
  23. infrahub/core/diff/data_check_synchronizer.py +4 -3
  24. infrahub/core/diff/enricher/cardinality_one.py +2 -2
  25. infrahub/core/diff/enricher/hierarchy.py +1 -1
  26. infrahub/core/diff/enricher/labels.py +1 -1
  27. infrahub/core/diff/merger/merger.py +28 -2
  28. infrahub/core/diff/merger/serializer.py +3 -10
  29. infrahub/core/diff/model/diff.py +1 -1
  30. infrahub/core/diff/query/merge.py +376 -135
  31. infrahub/core/diff/repository/repository.py +3 -1
  32. infrahub/core/graph/__init__.py +1 -1
  33. infrahub/core/graph/constraints.py +3 -3
  34. infrahub/core/graph/schema.py +2 -12
  35. infrahub/core/ipam/reconciler.py +8 -6
  36. infrahub/core/ipam/utilization.py +8 -15
  37. infrahub/core/manager.py +133 -152
  38. infrahub/core/merge.py +1 -1
  39. infrahub/core/metadata/__init__.py +0 -0
  40. infrahub/core/metadata/interface.py +37 -0
  41. infrahub/core/metadata/model.py +31 -0
  42. infrahub/core/metadata/query/__init__.py +0 -0
  43. infrahub/core/metadata/query/node_metadata.py +301 -0
  44. infrahub/core/migrations/graph/__init__.py +4 -0
  45. infrahub/core/migrations/graph/m012_convert_account_generic.py +12 -12
  46. infrahub/core/migrations/graph/m013_convert_git_password_credential.py +7 -12
  47. infrahub/core/migrations/graph/m017_add_core_profile.py +5 -2
  48. infrahub/core/migrations/graph/m018_uniqueness_nulls.py +2 -1
  49. infrahub/core/migrations/graph/m019_restore_rels_to_time.py +0 -10
  50. infrahub/core/migrations/graph/m020_duplicate_edges.py +0 -8
  51. infrahub/core/migrations/graph/m025_uniqueness_nulls.py +2 -1
  52. infrahub/core/migrations/graph/m026_0000_prefix_fix.py +2 -1
  53. infrahub/core/migrations/graph/m029_duplicates_cleanup.py +0 -1
  54. infrahub/core/migrations/graph/m031_check_number_attributes.py +2 -2
  55. infrahub/core/migrations/graph/m038_redo_0000_prefix_fix.py +2 -1
  56. infrahub/core/migrations/graph/m041_deleted_dup_edges.py +1 -1
  57. infrahub/core/migrations/graph/m049_remove_is_visible_relationship.py +53 -0
  58. infrahub/core/migrations/graph/m050_backfill_vertex_metadata.py +168 -0
  59. infrahub/core/migrations/query/__init__.py +2 -2
  60. infrahub/core/migrations/query/attribute_add.py +17 -6
  61. infrahub/core/migrations/query/attribute_remove.py +19 -5
  62. infrahub/core/migrations/query/attribute_rename.py +21 -5
  63. infrahub/core/migrations/query/node_duplicate.py +19 -4
  64. infrahub/core/migrations/query/schema_attribute_update.py +1 -1
  65. infrahub/core/migrations/schema/attribute_kind_update.py +26 -6
  66. infrahub/core/migrations/schema/attribute_name_update.py +1 -1
  67. infrahub/core/migrations/schema/attribute_supports_profile.py +5 -3
  68. infrahub/core/migrations/schema/models.py +3 -0
  69. infrahub/core/migrations/schema/node_attribute_add.py +5 -2
  70. infrahub/core/migrations/schema/node_attribute_remove.py +1 -1
  71. infrahub/core/migrations/schema/node_kind_update.py +1 -1
  72. infrahub/core/migrations/schema/node_remove.py +24 -2
  73. infrahub/core/migrations/schema/tasks.py +4 -1
  74. infrahub/core/migrations/shared.py +13 -6
  75. infrahub/core/models.py +6 -6
  76. infrahub/core/node/__init__.py +157 -58
  77. infrahub/core/node/base.py +9 -5
  78. infrahub/core/node/create.py +7 -3
  79. infrahub/core/node/delete_validator.py +1 -1
  80. infrahub/core/node/standard.py +100 -14
  81. infrahub/core/order.py +30 -0
  82. infrahub/core/property.py +0 -1
  83. infrahub/core/protocols.py +1 -0
  84. infrahub/core/protocols_base.py +10 -2
  85. infrahub/core/query/__init__.py +11 -6
  86. infrahub/core/query/attribute.py +164 -49
  87. infrahub/core/query/branch.py +58 -70
  88. infrahub/core/query/delete.py +1 -1
  89. infrahub/core/query/diff.py +7 -7
  90. infrahub/core/query/ipam.py +104 -43
  91. infrahub/core/query/node.py +1072 -281
  92. infrahub/core/query/relationship.py +531 -325
  93. infrahub/core/query/resource_manager.py +107 -18
  94. infrahub/core/query/standard_node.py +25 -5
  95. infrahub/core/query/utils.py +2 -4
  96. infrahub/core/relationship/constraints/count.py +1 -1
  97. infrahub/core/relationship/constraints/peer_kind.py +1 -1
  98. infrahub/core/relationship/constraints/peer_parent.py +1 -1
  99. infrahub/core/relationship/constraints/peer_relatives.py +1 -1
  100. infrahub/core/relationship/constraints/profiles_kind.py +1 -1
  101. infrahub/core/relationship/constraints/profiles_removal.py +168 -0
  102. infrahub/core/relationship/model.py +293 -139
  103. infrahub/core/schema/attribute_parameters.py +28 -1
  104. infrahub/core/schema/attribute_schema.py +11 -17
  105. infrahub/core/schema/basenode_schema.py +3 -0
  106. infrahub/core/schema/definitions/core/__init__.py +8 -2
  107. infrahub/core/schema/definitions/core/account.py +10 -10
  108. infrahub/core/schema/definitions/core/artifact.py +14 -8
  109. infrahub/core/schema/definitions/core/check.py +10 -4
  110. infrahub/core/schema/definitions/core/generator.py +26 -6
  111. infrahub/core/schema/definitions/core/graphql_query.py +1 -1
  112. infrahub/core/schema/definitions/core/group.py +9 -2
  113. infrahub/core/schema/definitions/core/ipam.py +80 -10
  114. infrahub/core/schema/definitions/core/menu.py +41 -7
  115. infrahub/core/schema/definitions/core/permission.py +16 -2
  116. infrahub/core/schema/definitions/core/profile.py +16 -2
  117. infrahub/core/schema/definitions/core/propose_change.py +24 -4
  118. infrahub/core/schema/definitions/core/propose_change_comment.py +23 -11
  119. infrahub/core/schema/definitions/core/propose_change_validator.py +50 -21
  120. infrahub/core/schema/definitions/core/repository.py +10 -0
  121. infrahub/core/schema/definitions/core/resource_pool.py +8 -1
  122. infrahub/core/schema/definitions/core/template.py +19 -2
  123. infrahub/core/schema/definitions/core/transform.py +11 -5
  124. infrahub/core/schema/definitions/core/webhook.py +27 -9
  125. infrahub/core/schema/manager.py +63 -43
  126. infrahub/core/schema/relationship_schema.py +6 -2
  127. infrahub/core/schema/schema_branch.py +115 -11
  128. infrahub/core/task/task.py +4 -2
  129. infrahub/core/utils.py +3 -25
  130. infrahub/core/validators/aggregated_checker.py +1 -1
  131. infrahub/core/validators/attribute/choices.py +1 -1
  132. infrahub/core/validators/attribute/enum.py +1 -1
  133. infrahub/core/validators/attribute/kind.py +6 -3
  134. infrahub/core/validators/attribute/length.py +1 -1
  135. infrahub/core/validators/attribute/min_max.py +1 -1
  136. infrahub/core/validators/attribute/number_pool.py +1 -1
  137. infrahub/core/validators/attribute/optional.py +1 -1
  138. infrahub/core/validators/attribute/regex.py +1 -1
  139. infrahub/core/validators/determiner.py +3 -3
  140. infrahub/core/validators/node/attribute.py +1 -1
  141. infrahub/core/validators/node/relationship.py +1 -1
  142. infrahub/core/validators/relationship/peer.py +1 -1
  143. infrahub/database/__init__.py +4 -4
  144. infrahub/dependencies/builder/constraint/grouped/node_runner.py +2 -0
  145. infrahub/dependencies/builder/constraint/relationship_manager/profiles_removal.py +8 -0
  146. infrahub/dependencies/registry.py +2 -0
  147. infrahub/display_labels/tasks.py +12 -3
  148. infrahub/git/integrator.py +18 -18
  149. infrahub/git/tasks.py +1 -1
  150. infrahub/git/utils.py +1 -1
  151. infrahub/graphql/app.py +2 -2
  152. infrahub/graphql/constants.py +3 -0
  153. infrahub/graphql/context.py +1 -1
  154. infrahub/graphql/field_extractor.py +1 -1
  155. infrahub/graphql/initialization.py +11 -0
  156. infrahub/graphql/loaders/account.py +134 -0
  157. infrahub/graphql/loaders/node.py +5 -12
  158. infrahub/graphql/loaders/peers.py +5 -7
  159. infrahub/graphql/manager.py +175 -21
  160. infrahub/graphql/metadata.py +91 -0
  161. infrahub/graphql/mutations/account.py +6 -6
  162. infrahub/graphql/mutations/attribute.py +0 -2
  163. infrahub/graphql/mutations/branch.py +9 -5
  164. infrahub/graphql/mutations/computed_attribute.py +1 -1
  165. infrahub/graphql/mutations/display_label.py +1 -1
  166. infrahub/graphql/mutations/hfid.py +1 -1
  167. infrahub/graphql/mutations/ipam.py +4 -6
  168. infrahub/graphql/mutations/main.py +9 -4
  169. infrahub/graphql/mutations/profile.py +16 -22
  170. infrahub/graphql/mutations/proposed_change.py +4 -4
  171. infrahub/graphql/mutations/relationship.py +40 -10
  172. infrahub/graphql/mutations/repository.py +14 -12
  173. infrahub/graphql/mutations/schema.py +2 -2
  174. infrahub/graphql/order.py +14 -0
  175. infrahub/graphql/queries/branch.py +62 -6
  176. infrahub/graphql/queries/diff/tree.py +5 -5
  177. infrahub/graphql/queries/resource_manager.py +25 -24
  178. infrahub/graphql/resolvers/account_metadata.py +84 -0
  179. infrahub/graphql/resolvers/ipam.py +6 -8
  180. infrahub/graphql/resolvers/many_relationship.py +77 -35
  181. infrahub/graphql/resolvers/resolver.py +59 -14
  182. infrahub/graphql/resolvers/single_relationship.py +87 -23
  183. infrahub/graphql/subscription/graphql_query.py +2 -0
  184. infrahub/graphql/types/__init__.py +0 -1
  185. infrahub/graphql/types/attribute.py +10 -5
  186. infrahub/graphql/types/branch.py +40 -53
  187. infrahub/graphql/types/enums.py +3 -0
  188. infrahub/graphql/types/metadata.py +28 -0
  189. infrahub/graphql/types/node.py +22 -2
  190. infrahub/graphql/types/relationship.py +10 -2
  191. infrahub/graphql/types/standard_node.py +12 -7
  192. infrahub/hfid/tasks.py +12 -3
  193. infrahub/lock.py +7 -0
  194. infrahub/menu/repository.py +1 -1
  195. infrahub/patch/queries/base.py +1 -1
  196. infrahub/pools/number.py +1 -8
  197. infrahub/profiles/gather.py +56 -0
  198. infrahub/profiles/mandatory_fields_checker.py +116 -0
  199. infrahub/profiles/models.py +66 -0
  200. infrahub/profiles/node_applier.py +154 -13
  201. infrahub/profiles/queries/get_profile_data.py +143 -31
  202. infrahub/profiles/tasks.py +79 -27
  203. infrahub/profiles/triggers.py +22 -0
  204. infrahub/proposed_change/action_checker.py +1 -1
  205. infrahub/proposed_change/tasks.py +4 -1
  206. infrahub/services/__init__.py +1 -1
  207. infrahub/services/adapters/cache/nats.py +1 -1
  208. infrahub/services/adapters/cache/redis.py +7 -0
  209. infrahub/tasks/artifact.py +1 -0
  210. infrahub/transformations/tasks.py +2 -2
  211. infrahub/trigger/catalogue.py +2 -0
  212. infrahub/trigger/models.py +1 -0
  213. infrahub/trigger/setup.py +3 -3
  214. infrahub/trigger/tasks.py +3 -0
  215. infrahub/validators/tasks.py +1 -0
  216. infrahub/webhook/gather.py +1 -1
  217. infrahub/webhook/models.py +1 -1
  218. infrahub/webhook/tasks.py +23 -7
  219. infrahub/workers/dependencies.py +9 -3
  220. infrahub/workers/infrahub_async.py +13 -4
  221. infrahub/workflows/catalogue.py +19 -0
  222. infrahub_sdk/analyzer.py +2 -2
  223. infrahub_sdk/branch.py +12 -39
  224. infrahub_sdk/checks.py +4 -4
  225. infrahub_sdk/client.py +36 -0
  226. infrahub_sdk/ctl/cli_commands.py +2 -1
  227. infrahub_sdk/ctl/graphql.py +15 -4
  228. infrahub_sdk/ctl/utils.py +2 -2
  229. infrahub_sdk/enums.py +6 -0
  230. infrahub_sdk/graphql/renderers.py +21 -0
  231. infrahub_sdk/graphql/utils.py +85 -0
  232. infrahub_sdk/node/attribute.py +12 -2
  233. infrahub_sdk/node/constants.py +12 -0
  234. infrahub_sdk/node/metadata.py +69 -0
  235. infrahub_sdk/node/node.py +65 -14
  236. infrahub_sdk/node/property.py +3 -0
  237. infrahub_sdk/node/related_node.py +37 -5
  238. infrahub_sdk/node/relationship.py +18 -1
  239. infrahub_sdk/operation.py +2 -2
  240. infrahub_sdk/schema/repository.py +1 -2
  241. infrahub_sdk/transforms.py +2 -2
  242. infrahub_sdk/types.py +18 -2
  243. {infrahub_server-1.6.2.dist-info → infrahub_server-1.7.0.dist-info}/METADATA +17 -16
  244. {infrahub_server-1.6.2.dist-info → infrahub_server-1.7.0.dist-info}/RECORD +252 -231
  245. infrahub_testcontainers/container.py +3 -3
  246. infrahub_testcontainers/docker-compose-cluster.test.yml +7 -7
  247. infrahub_testcontainers/docker-compose.test.yml +13 -5
  248. infrahub_testcontainers/models.py +3 -3
  249. infrahub_testcontainers/performance_test.py +1 -1
  250. infrahub/graphql/models.py +0 -6
  251. {infrahub_server-1.6.2.dist-info → infrahub_server-1.7.0.dist-info}/WHEEL +0 -0
  252. {infrahub_server-1.6.2.dist-info → infrahub_server-1.7.0.dist-info}/entry_points.txt +0 -0
  253. {infrahub_server-1.6.2.dist-info → infrahub_server-1.7.0.dist-info}/licenses/LICENSE.txt +0 -0
@@ -23,8 +23,8 @@ core_propose_change_comment = GenericSchema(
23
23
  include_in_menu=False,
24
24
  branch=BranchSupportType.AGNOSTIC,
25
25
  attributes=[
26
- Attr(name="text", kind="TextArea", unique=False, optional=False),
27
- Attr(name="created_at", kind="DateTime", optional=True),
26
+ Attr(name="text", kind="TextArea", description="Content of the comment", unique=False, optional=False),
27
+ Attr(name="created_at", kind="DateTime", description="Timestamp when the comment was created", optional=True),
28
28
  ],
29
29
  relationships=[
30
30
  Rel(
@@ -48,8 +48,13 @@ core_thread = GenericSchema(
48
48
  include_in_menu=False,
49
49
  attributes=[
50
50
  Attr(name="label", kind="Text", optional=True),
51
- Attr(name="resolved", kind="Boolean", default_value=False),
52
- Attr(name="created_at", kind="DateTime", optional=True),
51
+ Attr(
52
+ name="resolved",
53
+ kind="Boolean",
54
+ description="Whether the thread has been marked as resolved",
55
+ default_value=False,
56
+ ),
57
+ Attr(name="created_at", kind="DateTime", description="Timestamp when the thread was created", optional=True),
53
58
  ],
54
59
  relationships=[
55
60
  Rel(
@@ -101,9 +106,9 @@ core_file_thread = NodeSchema(
101
106
  inherit_from=[InfrahubKind.THREAD],
102
107
  generate_profile=False,
103
108
  attributes=[
104
- Attr(name="file", kind="Text", optional=True),
105
- Attr(name="commit", kind="Text", optional=True),
106
- Attr(name="line_number", kind="Number", optional=True),
109
+ Attr(name="file", kind="Text", description="Path to the file being discussed", optional=True),
110
+ Attr(name="commit", kind="Text", description="Git commit hash the thread refers to", optional=True),
111
+ Attr(name="line_number", kind="Number", description="Line number in the file being discussed", optional=True),
107
112
  ],
108
113
  relationships=[
109
114
  Rel(
@@ -126,9 +131,16 @@ core_artifact_thread = NodeSchema(
126
131
  inherit_from=[InfrahubKind.THREAD],
127
132
  generate_profile=False,
128
133
  attributes=[
129
- Attr(name="artifact_id", kind="Text", optional=True),
130
- Attr(name="storage_id", kind="Text", optional=True),
131
- Attr(name="line_number", kind="Number", optional=True),
134
+ Attr(
135
+ name="artifact_id",
136
+ kind="Text",
137
+ description="Unique identifier of the artifact being discussed",
138
+ optional=True,
139
+ ),
140
+ Attr(name="storage_id", kind="Text", description="ID of the artifact in the object store", optional=True),
141
+ Attr(
142
+ name="line_number", kind="Number", description="Line number in the artifact being discussed", optional=True
143
+ ),
132
144
  ],
133
145
  )
134
146
 
@@ -142,7 +154,7 @@ core_object_thread = NodeSchema(
142
154
  inherit_from=[InfrahubKind.THREAD],
143
155
  generate_profile=False,
144
156
  attributes=[
145
- Attr(name="object_path", kind="Text", optional=False),
157
+ Attr(name="object_path", kind="Text", description="Path to the object being discussed", optional=False),
146
158
  ],
147
159
  )
148
160
 
@@ -22,7 +22,7 @@ from ...relationship_schema import (
22
22
  core_propose_change_validator = GenericSchema(
23
23
  name="Validator",
24
24
  namespace="Core",
25
- description="",
25
+ description="A validator that runs checks against a proposed change",
26
26
  include_in_menu=False,
27
27
  label="Validator",
28
28
  order_by=["started_at__value"],
@@ -31,16 +31,21 @@ core_propose_change_validator = GenericSchema(
31
31
  attributes=[
32
32
  Attr(name="label", kind="Text", optional=True),
33
33
  Attr(
34
- name="state", kind="Text", enum=ValidatorState.available_types(), default_value=ValidatorState.QUEUED.value
34
+ name="state",
35
+ kind="Text",
36
+ description="Current execution state of the validator",
37
+ enum=ValidatorState.available_types(),
38
+ default_value=ValidatorState.QUEUED.value,
35
39
  ),
36
40
  Attr(
37
41
  name="conclusion",
38
42
  kind="Text",
43
+ description="Final outcome of the validation",
39
44
  enum=ValidatorConclusion.available_types(),
40
45
  default_value=ValidatorConclusion.UNKNOWN.value,
41
46
  ),
42
- Attr(name="completed_at", kind="DateTime", optional=True),
43
- Attr(name="started_at", kind="DateTime", optional=True),
47
+ Attr(name="completed_at", kind="DateTime", description="Timestamp when the validator finished", optional=True),
48
+ Attr(name="started_at", kind="DateTime", description="Timestamp when the validator started", optional=True),
44
49
  ],
45
50
  relationships=[
46
51
  Rel(
@@ -186,7 +191,7 @@ core_generator_validator = NodeSchema(
186
191
  core_check = GenericSchema(
187
192
  name="Check",
188
193
  namespace="Core",
189
- description="",
194
+ description="A check result within a validator that reports on specific validation outcomes",
190
195
  display_labels=["label__value"],
191
196
  include_in_menu=False,
192
197
  label="Check",
@@ -194,19 +199,21 @@ core_check = GenericSchema(
194
199
  attributes=[
195
200
  Attr(name="name", kind="Text", optional=True),
196
201
  Attr(name="label", kind="Text", optional=True),
197
- Attr(name="origin", kind="Text", optional=False),
202
+ Attr(name="origin", kind="Text", description="Source that created this check", optional=False),
198
203
  Attr(
199
204
  name="kind",
200
205
  kind="Text",
206
+ description="Type of check being performed",
201
207
  regex=r"^[A-Z][a-zA-Z0-9]+$",
202
208
  optional=False,
203
209
  min_length=DEFAULT_KIND_MIN_LENGTH,
204
210
  max_length=DEFAULT_KIND_MAX_LENGTH,
205
211
  ),
206
- Attr(name="message", kind="TextArea", optional=True),
212
+ Attr(name="message", kind="TextArea", description="Detailed message about the check result", optional=True),
207
213
  Attr(
208
214
  name="conclusion",
209
215
  kind="Text",
216
+ description="Outcome of the check",
210
217
  enum=ValidatorConclusion.available_types(),
211
218
  default_value=ValidatorConclusion.UNKNOWN.value,
212
219
  optional=True,
@@ -214,11 +221,12 @@ core_check = GenericSchema(
214
221
  Attr(
215
222
  name="severity",
216
223
  kind="Text",
224
+ description="Severity level of any issues found",
217
225
  enum=Severity.available_types(),
218
226
  default_value=Severity.INFO.value,
219
227
  optional=True,
220
228
  ),
221
- Attr(name="created_at", kind="DateTime", optional=True),
229
+ Attr(name="created_at", kind="DateTime", description="Timestamp when the check was created", optional=True),
222
230
  ],
223
231
  relationships=[
224
232
  Rel(
@@ -243,9 +251,20 @@ core_data_check = NodeSchema(
243
251
  generate_profile=False,
244
252
  branch=BranchSupportType.AGNOSTIC,
245
253
  attributes=[
246
- Attr(name="conflicts", kind="JSON"),
247
- Attr(name="keep_branch", kind="Text", enum=BranchConflictKeep.available_types(), optional=True),
248
- Attr(name="enriched_conflict_id", kind="Text", optional=True),
254
+ Attr(name="conflicts", kind="JSON", description="Details of detected data conflicts between branches"),
255
+ Attr(
256
+ name="keep_branch",
257
+ kind="Text",
258
+ description="Which branch data to keep when resolving conflicts",
259
+ enum=BranchConflictKeep.available_types(),
260
+ optional=True,
261
+ ),
262
+ Attr(
263
+ name="enriched_conflict_id",
264
+ kind="Text",
265
+ description="Unique identifier for the enriched conflict",
266
+ optional=True,
267
+ ),
249
268
  ],
250
269
  )
251
270
 
@@ -272,8 +291,13 @@ core_schema_check = NodeSchema(
272
291
  generate_profile=False,
273
292
  branch=BranchSupportType.AGNOSTIC,
274
293
  attributes=[
275
- Attr(name="conflicts", kind="JSON"),
276
- Attr(name="enriched_conflict_id", kind="Text", optional=True),
294
+ Attr(name="conflicts", kind="JSON", description="Details of detected schema conflicts"),
295
+ Attr(
296
+ name="enriched_conflict_id",
297
+ kind="Text",
298
+ description="Unique identifier for the enriched conflict",
299
+ optional=True,
300
+ ),
277
301
  ],
278
302
  )
279
303
 
@@ -288,8 +312,8 @@ core_file_check = NodeSchema(
288
312
  generate_profile=False,
289
313
  branch=BranchSupportType.AGNOSTIC,
290
314
  attributes=[
291
- Attr(name="files", kind="List", optional=True),
292
- Attr(name="commit", kind="Text", optional=True),
315
+ Attr(name="files", kind="List", description="List of files involved in this check", optional=True),
316
+ Attr(name="commit", kind="Text", description="Git commit hash associated with this check", optional=True),
293
317
  ],
294
318
  )
295
319
 
@@ -304,11 +328,11 @@ core_artifact_check = NodeSchema(
304
328
  generate_profile=False,
305
329
  branch=BranchSupportType.AGNOSTIC,
306
330
  attributes=[
307
- Attr(name="changed", kind="Boolean", optional=True),
308
- Attr(name="checksum", kind="Text", optional=True),
309
- Attr(name="artifact_id", kind="Text", optional=True),
310
- Attr(name="storage_id", kind="Text", optional=True),
311
- Attr(name="line_number", kind="Number", optional=True),
331
+ Attr(name="changed", kind="Boolean", description="Whether the artifact content has changed", optional=True),
332
+ Attr(name="checksum", kind="Text", description="Hash checksum of the artifact content", optional=True),
333
+ Attr(name="artifact_id", kind="Text", description="Unique identifier of the artifact", optional=True),
334
+ Attr(name="storage_id", kind="Text", description="ID of the artifact in the object store", optional=True),
335
+ Attr(name="line_number", kind="Number", description="Line number reference for artifact issues", optional=True),
312
336
  ],
313
337
  )
314
338
 
@@ -323,6 +347,11 @@ core_generator_check = NodeSchema(
323
347
  generate_profile=False,
324
348
  branch=BranchSupportType.AGNOSTIC,
325
349
  attributes=[
326
- Attr(name="instance", kind="Text", optional=False),
350
+ Attr(
351
+ name="instance",
352
+ kind="Text",
353
+ description="Identifier of the generator instance being checked",
354
+ optional=False,
355
+ ),
327
356
  ],
328
357
  )
@@ -40,12 +40,14 @@ core_repository = NodeSchema(
40
40
  Attr(
41
41
  name="default_branch",
42
42
  kind="Text",
43
+ description="Default branch name in the Git repository",
43
44
  default_value="main",
44
45
  order_weight=6000,
45
46
  ),
46
47
  Attr(
47
48
  name="commit",
48
49
  kind="Text",
50
+ description="Current commit hash being tracked",
49
51
  optional=True,
50
52
  branch=BranchSupportType.LOCAL,
51
53
  order_weight=7000,
@@ -75,6 +77,7 @@ core_read_only_repository = NodeSchema(
75
77
  Attr(
76
78
  name="ref",
77
79
  kind="Text",
80
+ description="Git reference (branch or tag) to track",
78
81
  default_value="main",
79
82
  branch=BranchSupportType.AWARE,
80
83
  order_weight=6000,
@@ -82,6 +85,7 @@ core_read_only_repository = NodeSchema(
82
85
  Attr(
83
86
  name="commit",
84
87
  kind="Text",
88
+ description="Current commit hash being tracked",
85
89
  optional=True,
86
90
  branch=BranchSupportType.AWARE,
87
91
  order_weight=7000,
@@ -107,6 +111,7 @@ core_generic_repository = GenericSchema(
107
111
  name="name",
108
112
  regex=r"^[^/]*$",
109
113
  kind="Text",
114
+ description="Unique name identifier for the repository",
110
115
  unique=True,
111
116
  branch=BranchSupportType.AGNOSTIC,
112
117
  order_weight=1000,
@@ -115,6 +120,7 @@ core_generic_repository = GenericSchema(
115
120
  Attr(
116
121
  name="description",
117
122
  kind="Text",
123
+ description="Description of the repository",
118
124
  optional=True,
119
125
  branch=BranchSupportType.AGNOSTIC,
120
126
  order_weight=2000,
@@ -123,6 +129,7 @@ core_generic_repository = GenericSchema(
123
129
  Attr(
124
130
  name="location",
125
131
  kind="Text",
132
+ description="URL or path to the Git repository",
126
133
  unique=True,
127
134
  branch=BranchSupportType.AGNOSTIC,
128
135
  order_weight=3000,
@@ -131,6 +138,7 @@ core_generic_repository = GenericSchema(
131
138
  Attr(
132
139
  name="internal_status",
133
140
  kind="Dropdown",
141
+ description="Internal status of the repository on this branch",
134
142
  choices=[
135
143
  DropdownChoice(
136
144
  name=RepositoryInternalStatus.STAGING.value,
@@ -160,6 +168,7 @@ core_generic_repository = GenericSchema(
160
168
  Attr(
161
169
  name="operational_status",
162
170
  kind="Dropdown",
171
+ description="Connectivity status of the repository",
163
172
  choices=[
164
173
  DropdownChoice(
165
174
  name=RepositoryOperationalStatus.UNKNOWN.value,
@@ -200,6 +209,7 @@ core_generic_repository = GenericSchema(
200
209
  Attr(
201
210
  name="sync_status",
202
211
  kind="Dropdown",
212
+ description="Current synchronization status of the repository",
203
213
  choices=[
204
214
  DropdownChoice(
205
215
  name=RepositorySyncStatus.UNKNOWN.value,
@@ -73,12 +73,19 @@ core_ip_prefix_pool = NodeSchema(
73
73
  Attr(
74
74
  name="default_member_type",
75
75
  kind="Text",
76
+ description="Default member type for allocated prefixes",
76
77
  enum=["prefix", "address"],
77
78
  default_value="prefix",
78
79
  optional=True,
79
80
  order_weight=3000,
80
81
  ),
81
- Attr(name="default_prefix_type", kind="Text", optional=True, order_weight=4000),
82
+ Attr(
83
+ name="default_prefix_type",
84
+ kind="Text",
85
+ description="Default prefix type schema to use when allocating",
86
+ optional=True,
87
+ order_weight=4000,
88
+ ),
82
89
  ],
83
90
  relationships=[
84
91
  Rel(
@@ -11,7 +11,16 @@ core_object_template = GenericSchema(
11
11
  display_labels=["template_name__value"],
12
12
  default_filter="template_name__value",
13
13
  uniqueness_constraints=[["template_name__value"]],
14
- attributes=[Attr(name="template_name", kind="Text", optional=False, unique=True, order_weight=1000)],
14
+ attributes=[
15
+ Attr(
16
+ name="template_name",
17
+ kind="Text",
18
+ description="Unique name identifier for the template",
19
+ optional=False,
20
+ unique=True,
21
+ order_weight=1000,
22
+ )
23
+ ],
15
24
  )
16
25
 
17
26
  core_object_component_template = GenericSchema(
@@ -23,5 +32,13 @@ core_object_component_template = GenericSchema(
23
32
  label="Object Component Templates",
24
33
  display_labels=["template_name__value"],
25
34
  default_filter="template_name__value",
26
- attributes=[Attr(name="template_name", kind="Text", optional=False, order_weight=1000)],
35
+ attributes=[
36
+ Attr(
37
+ name="template_name",
38
+ kind="Text",
39
+ description="Name identifier for the component template",
40
+ optional=False,
41
+ order_weight=1000,
42
+ )
43
+ ],
27
44
  )
@@ -29,7 +29,7 @@ core_transform = GenericSchema(
29
29
  Attr(name="name", kind="Text", unique=True),
30
30
  Attr(name="label", kind="Text", optional=True),
31
31
  Attr(name="description", kind="Text", optional=True),
32
- Attr(name="timeout", kind="Number", default_value=60),
32
+ Attr(name="timeout", kind="Number", description="Maximum execution time in seconds", default_value=60),
33
33
  ],
34
34
  relationships=[
35
35
  Rel(
@@ -72,7 +72,7 @@ core_transform_jinja2 = NodeSchema(
72
72
  branch=BranchSupportType.AWARE,
73
73
  documentation="/topics/transformation",
74
74
  attributes=[
75
- Attr(name="template_path", kind="Text"),
75
+ Attr(name="template_path", kind="Text", description="Path to the Jinja2 template file in the repository"),
76
76
  ],
77
77
  )
78
78
 
@@ -90,8 +90,14 @@ core_transform_python = NodeSchema(
90
90
  branch=BranchSupportType.AWARE,
91
91
  documentation="/topics/transformation",
92
92
  attributes=[
93
- Attr(name="file_path", kind="Text"),
94
- Attr(name="class_name", kind="Text"),
95
- Attr(name="convert_query_response", kind="Boolean", optional=True, default_value=False),
93
+ Attr(name="file_path", kind="Text", description="Path to the Python file in the repository"),
94
+ Attr(name="class_name", kind="Text", description="Name of the Python class implementing the transformation"),
95
+ Attr(
96
+ name="convert_query_response",
97
+ kind="Boolean",
98
+ description="Whether to convert the GraphQL response to SDK objects",
99
+ optional=True,
100
+ default_value=False,
101
+ ),
96
102
  ],
97
103
  )
@@ -37,9 +37,18 @@ core_webhook = GenericSchema(
37
37
  order_weight=1500,
38
38
  description="The event type that triggers the webhook",
39
39
  ),
40
+ Attr(
41
+ name="active",
42
+ kind="Boolean",
43
+ description="Indicates if this webhook is enabled",
44
+ optional=False,
45
+ default_value=True,
46
+ order_weight=1750,
47
+ ),
40
48
  Attr(
41
49
  name="branch_scope",
42
50
  kind="Dropdown",
51
+ description="Which branches should trigger this webhook",
43
52
  choices=[
44
53
  DropdownChoice(
45
54
  name="all_branches",
@@ -72,16 +81,12 @@ core_webhook = GenericSchema(
72
81
  description="Only send node mutation events for nodes of this kind",
73
82
  order_weight=2250,
74
83
  ),
75
- Attr(
76
- name="description",
77
- kind="Text",
78
- optional=True,
79
- order_weight=2500,
80
- ),
81
- Attr(name="url", kind="URL", order_weight=3000),
84
+ Attr(name="description", kind="Text", optional=True, order_weight=2500),
85
+ Attr(name="url", kind="URL", description="Target URL to send webhook requests to", order_weight=3000),
82
86
  Attr(
83
87
  name="validate_certificates",
84
88
  kind="Boolean",
89
+ description="Whether to validate SSL/TLS certificates",
85
90
  default_value=True,
86
91
  optional=True,
87
92
  order_weight=5000,
@@ -103,7 +108,13 @@ core_standard_webhook = NodeSchema(
103
108
  generate_profile=False,
104
109
  inherit_from=[InfrahubKind.WEBHOOK, InfrahubKind.TASKTARGET],
105
110
  attributes=[
106
- Attr(name="shared_key", kind="Password", unique=False, order_weight=4000),
111
+ Attr(
112
+ name="shared_key",
113
+ kind="Password",
114
+ description="Shared secret key for webhook authentication",
115
+ unique=False,
116
+ order_weight=4000,
117
+ ),
107
118
  ],
108
119
  )
109
120
 
@@ -121,7 +132,14 @@ core_custom_webhook = NodeSchema(
121
132
  generate_profile=False,
122
133
  inherit_from=[InfrahubKind.WEBHOOK, InfrahubKind.TASKTARGET],
123
134
  attributes=[
124
- Attr(name="shared_key", kind="Password", unique=False, optional=True, order_weight=4000),
135
+ Attr(
136
+ name="shared_key",
137
+ kind="Password",
138
+ description="Shared secret key for webhook authentication",
139
+ unique=False,
140
+ optional=True,
141
+ order_weight=4000,
142
+ ),
125
143
  ],
126
144
  relationships=[
127
145
  Rel(