infrahub-server 1.6.3__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.
- infrahub/actions/tasks.py +4 -2
- infrahub/api/exceptions.py +2 -2
- infrahub/api/schema.py +3 -1
- infrahub/artifacts/tasks.py +1 -0
- infrahub/auth.py +2 -2
- infrahub/cli/db.py +54 -28
- infrahub/computed_attribute/gather.py +3 -4
- infrahub/computed_attribute/tasks.py +23 -6
- infrahub/config.py +8 -0
- infrahub/constants/enums.py +12 -0
- infrahub/core/account.py +4 -4
- infrahub/core/attribute.py +106 -108
- infrahub/core/branch/models.py +44 -71
- infrahub/core/branch/tasks.py +5 -3
- infrahub/core/changelog/diff.py +1 -20
- infrahub/core/changelog/models.py +0 -7
- infrahub/core/constants/__init__.py +17 -0
- infrahub/core/constants/database.py +0 -1
- infrahub/core/constants/schema.py +0 -1
- infrahub/core/convert_object_type/repository_conversion.py +3 -4
- infrahub/core/diff/branch_differ.py +1 -1
- infrahub/core/diff/conflict_transferer.py +1 -1
- infrahub/core/diff/data_check_synchronizer.py +4 -3
- infrahub/core/diff/enricher/cardinality_one.py +2 -2
- infrahub/core/diff/enricher/hierarchy.py +1 -1
- infrahub/core/diff/enricher/labels.py +1 -1
- infrahub/core/diff/merger/merger.py +28 -2
- infrahub/core/diff/merger/serializer.py +3 -10
- infrahub/core/diff/model/diff.py +1 -1
- infrahub/core/diff/query/merge.py +376 -135
- infrahub/core/diff/repository/repository.py +3 -1
- infrahub/core/graph/__init__.py +1 -1
- infrahub/core/graph/constraints.py +3 -3
- infrahub/core/graph/schema.py +2 -12
- infrahub/core/ipam/reconciler.py +8 -6
- infrahub/core/ipam/utilization.py +8 -15
- infrahub/core/manager.py +133 -152
- infrahub/core/merge.py +1 -1
- infrahub/core/metadata/__init__.py +0 -0
- infrahub/core/metadata/interface.py +37 -0
- infrahub/core/metadata/model.py +31 -0
- infrahub/core/metadata/query/__init__.py +0 -0
- infrahub/core/metadata/query/node_metadata.py +301 -0
- infrahub/core/migrations/graph/__init__.py +4 -0
- infrahub/core/migrations/graph/m012_convert_account_generic.py +12 -12
- infrahub/core/migrations/graph/m013_convert_git_password_credential.py +7 -12
- infrahub/core/migrations/graph/m017_add_core_profile.py +5 -2
- infrahub/core/migrations/graph/m018_uniqueness_nulls.py +2 -1
- infrahub/core/migrations/graph/m019_restore_rels_to_time.py +0 -10
- infrahub/core/migrations/graph/m020_duplicate_edges.py +0 -8
- infrahub/core/migrations/graph/m025_uniqueness_nulls.py +2 -1
- infrahub/core/migrations/graph/m026_0000_prefix_fix.py +2 -1
- infrahub/core/migrations/graph/m029_duplicates_cleanup.py +0 -1
- infrahub/core/migrations/graph/m031_check_number_attributes.py +2 -2
- infrahub/core/migrations/graph/m038_redo_0000_prefix_fix.py +2 -1
- infrahub/core/migrations/graph/m041_deleted_dup_edges.py +1 -1
- infrahub/core/migrations/graph/m049_remove_is_visible_relationship.py +53 -0
- infrahub/core/migrations/graph/m050_backfill_vertex_metadata.py +168 -0
- infrahub/core/migrations/query/__init__.py +2 -2
- infrahub/core/migrations/query/attribute_add.py +17 -6
- infrahub/core/migrations/query/attribute_remove.py +19 -5
- infrahub/core/migrations/query/attribute_rename.py +21 -5
- infrahub/core/migrations/query/node_duplicate.py +19 -4
- infrahub/core/migrations/query/schema_attribute_update.py +1 -1
- infrahub/core/migrations/schema/attribute_kind_update.py +21 -2
- infrahub/core/migrations/schema/attribute_name_update.py +1 -1
- infrahub/core/migrations/schema/attribute_supports_profile.py +5 -3
- infrahub/core/migrations/schema/models.py +3 -0
- infrahub/core/migrations/schema/node_attribute_add.py +5 -2
- infrahub/core/migrations/schema/node_attribute_remove.py +1 -1
- infrahub/core/migrations/schema/node_kind_update.py +1 -1
- infrahub/core/migrations/schema/node_remove.py +24 -2
- infrahub/core/migrations/schema/tasks.py +4 -1
- infrahub/core/migrations/shared.py +13 -6
- infrahub/core/models.py +6 -6
- infrahub/core/node/__init__.py +157 -58
- infrahub/core/node/base.py +9 -5
- infrahub/core/node/create.py +7 -3
- infrahub/core/node/delete_validator.py +1 -1
- infrahub/core/node/standard.py +100 -14
- infrahub/core/order.py +30 -0
- infrahub/core/property.py +0 -1
- infrahub/core/protocols.py +1 -0
- infrahub/core/protocols_base.py +10 -2
- infrahub/core/query/__init__.py +5 -3
- infrahub/core/query/attribute.py +164 -49
- infrahub/core/query/branch.py +58 -70
- infrahub/core/query/delete.py +1 -1
- infrahub/core/query/diff.py +7 -7
- infrahub/core/query/ipam.py +104 -43
- infrahub/core/query/node.py +1072 -281
- infrahub/core/query/relationship.py +531 -325
- infrahub/core/query/resource_manager.py +107 -18
- infrahub/core/query/standard_node.py +25 -5
- infrahub/core/query/utils.py +2 -4
- infrahub/core/relationship/constraints/count.py +1 -1
- infrahub/core/relationship/constraints/peer_kind.py +1 -1
- infrahub/core/relationship/constraints/peer_parent.py +1 -1
- infrahub/core/relationship/constraints/peer_relatives.py +1 -1
- infrahub/core/relationship/constraints/profiles_kind.py +1 -1
- infrahub/core/relationship/constraints/profiles_removal.py +168 -0
- infrahub/core/relationship/model.py +293 -139
- infrahub/core/schema/attribute_schema.py +2 -2
- infrahub/core/schema/basenode_schema.py +3 -0
- infrahub/core/schema/definitions/core/__init__.py +8 -2
- infrahub/core/schema/definitions/core/account.py +10 -10
- infrahub/core/schema/definitions/core/artifact.py +14 -8
- infrahub/core/schema/definitions/core/check.py +10 -4
- infrahub/core/schema/definitions/core/generator.py +26 -6
- infrahub/core/schema/definitions/core/graphql_query.py +1 -1
- infrahub/core/schema/definitions/core/group.py +9 -2
- infrahub/core/schema/definitions/core/ipam.py +80 -10
- infrahub/core/schema/definitions/core/menu.py +41 -7
- infrahub/core/schema/definitions/core/permission.py +16 -2
- infrahub/core/schema/definitions/core/profile.py +16 -2
- infrahub/core/schema/definitions/core/propose_change.py +24 -4
- infrahub/core/schema/definitions/core/propose_change_comment.py +23 -11
- infrahub/core/schema/definitions/core/propose_change_validator.py +50 -21
- infrahub/core/schema/definitions/core/repository.py +10 -0
- infrahub/core/schema/definitions/core/resource_pool.py +8 -1
- infrahub/core/schema/definitions/core/template.py +19 -2
- infrahub/core/schema/definitions/core/transform.py +11 -5
- infrahub/core/schema/definitions/core/webhook.py +27 -9
- infrahub/core/schema/manager.py +63 -43
- infrahub/core/schema/relationship_schema.py +6 -2
- infrahub/core/schema/schema_branch.py +48 -10
- infrahub/core/task/task.py +4 -2
- infrahub/core/utils.py +3 -25
- infrahub/core/validators/aggregated_checker.py +1 -1
- infrahub/core/validators/attribute/choices.py +1 -1
- infrahub/core/validators/attribute/enum.py +1 -1
- infrahub/core/validators/attribute/kind.py +1 -1
- infrahub/core/validators/attribute/length.py +1 -1
- infrahub/core/validators/attribute/min_max.py +1 -1
- infrahub/core/validators/attribute/number_pool.py +1 -1
- infrahub/core/validators/attribute/optional.py +1 -1
- infrahub/core/validators/attribute/regex.py +1 -1
- infrahub/core/validators/determiner.py +3 -3
- infrahub/core/validators/node/attribute.py +1 -1
- infrahub/core/validators/node/relationship.py +1 -1
- infrahub/core/validators/relationship/peer.py +1 -1
- infrahub/database/__init__.py +4 -4
- infrahub/dependencies/builder/constraint/grouped/node_runner.py +2 -0
- infrahub/dependencies/builder/constraint/relationship_manager/profiles_removal.py +8 -0
- infrahub/dependencies/registry.py +2 -0
- infrahub/display_labels/tasks.py +12 -3
- infrahub/git/integrator.py +18 -18
- infrahub/git/tasks.py +1 -1
- infrahub/git/utils.py +1 -1
- infrahub/graphql/constants.py +3 -0
- infrahub/graphql/context.py +1 -1
- infrahub/graphql/field_extractor.py +1 -1
- infrahub/graphql/initialization.py +11 -0
- infrahub/graphql/loaders/account.py +134 -0
- infrahub/graphql/loaders/node.py +5 -12
- infrahub/graphql/loaders/peers.py +5 -7
- infrahub/graphql/manager.py +175 -21
- infrahub/graphql/metadata.py +91 -0
- infrahub/graphql/mutations/account.py +6 -6
- infrahub/graphql/mutations/attribute.py +0 -2
- infrahub/graphql/mutations/branch.py +9 -5
- infrahub/graphql/mutations/computed_attribute.py +1 -1
- infrahub/graphql/mutations/display_label.py +1 -1
- infrahub/graphql/mutations/hfid.py +1 -1
- infrahub/graphql/mutations/ipam.py +4 -6
- infrahub/graphql/mutations/main.py +9 -4
- infrahub/graphql/mutations/profile.py +16 -22
- infrahub/graphql/mutations/proposed_change.py +4 -4
- infrahub/graphql/mutations/relationship.py +40 -10
- infrahub/graphql/mutations/repository.py +14 -12
- infrahub/graphql/mutations/schema.py +2 -2
- infrahub/graphql/order.py +14 -0
- infrahub/graphql/queries/branch.py +62 -6
- infrahub/graphql/queries/resource_manager.py +25 -24
- infrahub/graphql/resolvers/account_metadata.py +84 -0
- infrahub/graphql/resolvers/ipam.py +6 -8
- infrahub/graphql/resolvers/many_relationship.py +77 -35
- infrahub/graphql/resolvers/resolver.py +59 -14
- infrahub/graphql/resolvers/single_relationship.py +87 -23
- infrahub/graphql/subscription/graphql_query.py +2 -0
- infrahub/graphql/types/__init__.py +0 -1
- infrahub/graphql/types/attribute.py +10 -5
- infrahub/graphql/types/branch.py +40 -53
- infrahub/graphql/types/enums.py +3 -0
- infrahub/graphql/types/metadata.py +28 -0
- infrahub/graphql/types/node.py +22 -2
- infrahub/graphql/types/relationship.py +10 -2
- infrahub/graphql/types/standard_node.py +12 -7
- infrahub/hfid/tasks.py +12 -3
- infrahub/lock.py +7 -0
- infrahub/menu/repository.py +1 -1
- infrahub/patch/queries/base.py +1 -1
- infrahub/pools/number.py +1 -8
- infrahub/profiles/gather.py +56 -0
- infrahub/profiles/mandatory_fields_checker.py +116 -0
- infrahub/profiles/models.py +66 -0
- infrahub/profiles/node_applier.py +154 -13
- infrahub/profiles/queries/get_profile_data.py +143 -31
- infrahub/profiles/tasks.py +79 -27
- infrahub/profiles/triggers.py +22 -0
- infrahub/proposed_change/action_checker.py +1 -1
- infrahub/proposed_change/tasks.py +4 -1
- infrahub/services/__init__.py +1 -1
- infrahub/services/adapters/cache/nats.py +1 -1
- infrahub/services/adapters/cache/redis.py +7 -0
- infrahub/tasks/artifact.py +1 -0
- infrahub/transformations/tasks.py +2 -2
- infrahub/trigger/catalogue.py +2 -0
- infrahub/trigger/models.py +1 -0
- infrahub/trigger/setup.py +3 -3
- infrahub/trigger/tasks.py +3 -0
- infrahub/validators/tasks.py +1 -0
- infrahub/webhook/gather.py +1 -1
- infrahub/webhook/models.py +1 -1
- infrahub/webhook/tasks.py +23 -7
- infrahub/workers/dependencies.py +9 -3
- infrahub/workers/infrahub_async.py +13 -4
- infrahub/workflows/catalogue.py +19 -0
- infrahub_sdk/analyzer.py +2 -2
- infrahub_sdk/branch.py +12 -39
- infrahub_sdk/checks.py +4 -4
- infrahub_sdk/client.py +36 -0
- infrahub_sdk/ctl/cli_commands.py +2 -1
- infrahub_sdk/ctl/graphql.py +15 -4
- infrahub_sdk/ctl/utils.py +2 -2
- infrahub_sdk/enums.py +6 -0
- infrahub_sdk/graphql/renderers.py +21 -0
- infrahub_sdk/graphql/utils.py +85 -0
- infrahub_sdk/node/attribute.py +12 -2
- infrahub_sdk/node/constants.py +12 -0
- infrahub_sdk/node/metadata.py +69 -0
- infrahub_sdk/node/node.py +65 -14
- infrahub_sdk/node/property.py +3 -0
- infrahub_sdk/node/related_node.py +37 -5
- infrahub_sdk/node/relationship.py +18 -1
- infrahub_sdk/operation.py +2 -2
- infrahub_sdk/schema/repository.py +1 -2
- infrahub_sdk/transforms.py +2 -2
- infrahub_sdk/types.py +18 -2
- {infrahub_server-1.6.3.dist-info → infrahub_server-1.7.0.dist-info}/METADATA +17 -16
- {infrahub_server-1.6.3.dist-info → infrahub_server-1.7.0.dist-info}/RECORD +249 -228
- infrahub_testcontainers/container.py +3 -3
- infrahub_testcontainers/docker-compose-cluster.test.yml +7 -7
- infrahub_testcontainers/docker-compose.test.yml +13 -5
- infrahub_testcontainers/models.py +3 -3
- infrahub_testcontainers/performance_test.py +1 -1
- infrahub/graphql/models.py +0 -6
- {infrahub_server-1.6.3.dist-info → infrahub_server-1.7.0.dist-info}/WHEEL +0 -0
- {infrahub_server-1.6.3.dist-info → infrahub_server-1.7.0.dist-info}/entry_points.txt +0 -0
- {infrahub_server-1.6.3.dist-info → infrahub_server-1.7.0.dist-info}/licenses/LICENSE.txt +0 -0
|
@@ -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",
|
|
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(
|
|
248
|
-
|
|
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(
|
|
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(
|
|
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(
|
|
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=[
|
|
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=[
|
|
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(
|
|
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
|
-
|
|
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(
|
|
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(
|
|
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(
|