infrahub-server 1.7.0b0__py3-none-any.whl → 1.7.0rc0__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/api/exceptions.py +2 -2
- infrahub/cli/db.py +48 -22
- infrahub/core/account.py +12 -9
- infrahub/core/diff/branch_differ.py +1 -1
- infrahub/core/diff/conflict_transferer.py +1 -1
- infrahub/core/diff/data_check_synchronizer.py +1 -1
- infrahub/core/diff/enricher/cardinality_one.py +1 -1
- infrahub/core/diff/enricher/hierarchy.py +1 -1
- infrahub/core/diff/enricher/labels.py +1 -1
- infrahub/core/diff/merger/merger.py +1 -1
- infrahub/core/diff/repository/repository.py +3 -1
- infrahub/core/graph/constraints.py +1 -1
- infrahub/core/ipam/reconciler.py +8 -6
- infrahub/core/ipam/utilization.py +8 -15
- infrahub/core/manager.py +1 -26
- infrahub/core/merge.py +1 -1
- infrahub/core/migrations/graph/m012_convert_account_generic.py +12 -12
- infrahub/core/migrations/graph/m013_convert_git_password_credential.py +4 -4
- infrahub/core/migrations/graph/m041_deleted_dup_edges.py +1 -1
- infrahub/core/migrations/graph/m049_remove_is_visible_relationship.py +16 -1
- infrahub/core/migrations/query/__init__.py +2 -2
- infrahub/core/migrations/query/schema_attribute_update.py +1 -1
- infrahub/core/migrations/schema/attribute_name_update.py +1 -1
- infrahub/core/migrations/schema/attribute_supports_profile.py +2 -2
- infrahub/core/migrations/schema/node_attribute_add.py +1 -1
- infrahub/core/migrations/schema/node_attribute_remove.py +1 -1
- infrahub/core/migrations/schema/node_kind_update.py +1 -1
- infrahub/core/node/__init__.py +1 -1
- infrahub/core/node/base.py +9 -5
- infrahub/core/node/delete_validator.py +1 -1
- infrahub/core/order.py +30 -0
- infrahub/core/protocols.py +1 -0
- infrahub/core/protocols_base.py +4 -0
- infrahub/core/query/__init__.py +8 -5
- infrahub/core/query/attribute.py +3 -3
- infrahub/core/query/branch.py +1 -1
- infrahub/core/query/delete.py +1 -1
- infrahub/core/query/diff.py +3 -3
- infrahub/core/query/ipam.py +104 -43
- infrahub/core/query/node.py +454 -101
- infrahub/core/query/relationship.py +83 -26
- infrahub/core/query/resource_manager.py +107 -18
- 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 +1 -1
- infrahub/core/schema/attribute_schema.py +0 -13
- 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/schema_branch.py +68 -2
- infrahub/core/utils.py +3 -3
- 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/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 +1 -1
- infrahub/git/utils.py +1 -1
- infrahub/graphql/app.py +2 -2
- infrahub/graphql/field_extractor.py +1 -1
- infrahub/graphql/manager.py +9 -1
- infrahub/graphql/mutations/account.py +1 -1
- infrahub/graphql/order.py +14 -0
- infrahub/graphql/queries/diff/tree.py +5 -5
- infrahub/graphql/queries/resource_manager.py +25 -24
- infrahub/graphql/resolvers/ipam.py +3 -3
- infrahub/graphql/resolvers/resolver.py +44 -3
- infrahub/graphql/types/standard_node.py +8 -4
- infrahub/menu/repository.py +1 -1
- infrahub/patch/queries/base.py +1 -1
- infrahub/pools/number.py +1 -8
- infrahub/profiles/node_applier.py +1 -1
- infrahub/profiles/queries/get_profile_data.py +1 -1
- infrahub/proposed_change/action_checker.py +1 -1
- infrahub/services/__init__.py +1 -1
- infrahub/services/adapters/cache/nats.py +1 -1
- infrahub/webhook/gather.py +1 -1
- infrahub/webhook/tasks.py +22 -6
- {infrahub_server-1.7.0b0.dist-info → infrahub_server-1.7.0rc0.dist-info}/METADATA +1 -1
- {infrahub_server-1.7.0b0.dist-info → infrahub_server-1.7.0rc0.dist-info}/RECORD +111 -110
- infrahub_testcontainers/models.py +3 -3
- infrahub/graphql/models.py +0 -36
- {infrahub_server-1.7.0b0.dist-info → infrahub_server-1.7.0rc0.dist-info}/WHEEL +0 -0
- {infrahub_server-1.7.0b0.dist-info → infrahub_server-1.7.0rc0.dist-info}/entry_points.txt +0 -0
- {infrahub_server-1.7.0b0.dist-info → infrahub_server-1.7.0rc0.dist-info}/licenses/LICENSE.txt +0 -0
|
@@ -14,6 +14,7 @@ from ...relationship_schema import (
|
|
|
14
14
|
core_check_definition = NodeSchema(
|
|
15
15
|
name="CheckDefinition",
|
|
16
16
|
namespace="Core",
|
|
17
|
+
description="Defines a user-defined check that validates data in a proposed change",
|
|
17
18
|
include_in_menu=False,
|
|
18
19
|
icon="mdi:check-all",
|
|
19
20
|
label="Check Definition",
|
|
@@ -27,10 +28,15 @@ core_check_definition = NodeSchema(
|
|
|
27
28
|
attributes=[
|
|
28
29
|
Attr(name="name", kind="Text", unique=True),
|
|
29
30
|
Attr(name="description", kind="Text", optional=True),
|
|
30
|
-
Attr(name="file_path", kind="Text"),
|
|
31
|
-
Attr(name="class_name", kind="Text"),
|
|
32
|
-
Attr(
|
|
33
|
-
|
|
31
|
+
Attr(name="file_path", kind="Text", description="Path to the Python file containing the check class"),
|
|
32
|
+
Attr(name="class_name", kind="Text", description="Name of the Python class implementing the check"),
|
|
33
|
+
Attr(
|
|
34
|
+
name="timeout",
|
|
35
|
+
kind="Number",
|
|
36
|
+
description="Maximum execution time in seconds before the check times out",
|
|
37
|
+
default_value=60,
|
|
38
|
+
),
|
|
39
|
+
Attr(name="parameters", kind="JSON", description="Additional parameters to pass to the check", optional=True),
|
|
34
40
|
],
|
|
35
41
|
relationships=[
|
|
36
42
|
Rel(
|
|
@@ -15,6 +15,7 @@ from ...relationship_schema import (
|
|
|
15
15
|
core_generator_definition = NodeSchema(
|
|
16
16
|
name="GeneratorDefinition",
|
|
17
17
|
namespace="Core",
|
|
18
|
+
description="Defines a generator that creates or updates objects based on a GraphQL query",
|
|
18
19
|
include_in_menu=False,
|
|
19
20
|
icon="mdi:state-machine",
|
|
20
21
|
label="Generator Definition",
|
|
@@ -29,12 +30,30 @@ core_generator_definition = NodeSchema(
|
|
|
29
30
|
attributes=[
|
|
30
31
|
Attr(name="name", kind="Text", unique=True),
|
|
31
32
|
Attr(name="description", kind="Text", optional=True),
|
|
32
|
-
Attr(name="parameters", kind="JSON"),
|
|
33
|
-
Attr(name="file_path", kind="Text"),
|
|
34
|
-
Attr(name="class_name", kind="Text"),
|
|
35
|
-
Attr(
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
Attr(name="parameters", kind="JSON", description="GraphQL query parameters for the generator"),
|
|
34
|
+
Attr(name="file_path", kind="Text", description="Path to the Python file containing the generator class"),
|
|
35
|
+
Attr(name="class_name", kind="Text", description="Name of the Python class implementing the generator"),
|
|
36
|
+
Attr(
|
|
37
|
+
name="convert_query_response",
|
|
38
|
+
kind="Boolean",
|
|
39
|
+
description="Whether to convert the GraphQL response to SDK objects",
|
|
40
|
+
optional=True,
|
|
41
|
+
default_value=False,
|
|
42
|
+
),
|
|
43
|
+
Attr(
|
|
44
|
+
name="execute_in_proposed_change",
|
|
45
|
+
kind="Boolean",
|
|
46
|
+
description="Whether to run this generator in proposed changes",
|
|
47
|
+
optional=True,
|
|
48
|
+
default_value=True,
|
|
49
|
+
),
|
|
50
|
+
Attr(
|
|
51
|
+
name="execute_after_merge",
|
|
52
|
+
kind="Boolean",
|
|
53
|
+
description="Whether to run this generator after a merge",
|
|
54
|
+
optional=True,
|
|
55
|
+
default_value=True,
|
|
56
|
+
),
|
|
38
57
|
],
|
|
39
58
|
relationships=[
|
|
40
59
|
Rel(
|
|
@@ -67,6 +86,7 @@ core_generator_definition = NodeSchema(
|
|
|
67
86
|
core_generator_instance = NodeSchema(
|
|
68
87
|
name="GeneratorInstance",
|
|
69
88
|
namespace="Core",
|
|
89
|
+
description="An instance of a generator execution for a specific object",
|
|
70
90
|
label="Generator Instance",
|
|
71
91
|
include_in_menu=False,
|
|
72
92
|
icon="mdi:file-document-outline",
|
|
@@ -28,7 +28,7 @@ core_graphql_query = NodeSchema(
|
|
|
28
28
|
attributes=[
|
|
29
29
|
Attr(name="name", kind="Text", unique=True),
|
|
30
30
|
Attr(name="description", kind="Text", optional=True),
|
|
31
|
-
Attr(name="query", kind="TextArea"),
|
|
31
|
+
Attr(name="query", kind="TextArea", description="The GraphQL query string"),
|
|
32
32
|
Attr(name="variables", kind="JSON", description="variables in use in the query", optional=True, read_only=True),
|
|
33
33
|
Attr(
|
|
34
34
|
name="operations",
|
|
@@ -31,7 +31,14 @@ core_group = GenericSchema(
|
|
|
31
31
|
Attr(name="name", kind="Text", unique=True),
|
|
32
32
|
Attr(name="label", kind="Text", optional=True),
|
|
33
33
|
Attr(name="description", kind="Text", optional=True),
|
|
34
|
-
Attr(
|
|
34
|
+
Attr(
|
|
35
|
+
name="group_type",
|
|
36
|
+
kind="Text",
|
|
37
|
+
description="Type of group (default or internal)",
|
|
38
|
+
enum=["default", "internal"],
|
|
39
|
+
default_value="default",
|
|
40
|
+
optional=False,
|
|
41
|
+
),
|
|
35
42
|
],
|
|
36
43
|
relationships=[
|
|
37
44
|
Rel(
|
|
@@ -111,7 +118,7 @@ core_graphql_query_group = NodeSchema(
|
|
|
111
118
|
inherit_from=[InfrahubKind.GENERICGROUP],
|
|
112
119
|
generate_profile=False,
|
|
113
120
|
attributes=[
|
|
114
|
-
Attr(name="parameters", kind="JSON", optional=True),
|
|
121
|
+
Attr(name="parameters", kind="JSON", description="GraphQL query parameters for the group", optional=True),
|
|
115
122
|
],
|
|
116
123
|
relationships=[
|
|
117
124
|
Rel(
|
|
@@ -68,11 +68,18 @@ builtin_ip_prefix = GenericSchema(
|
|
|
68
68
|
branch=BranchSupportType.AWARE,
|
|
69
69
|
hierarchical=True,
|
|
70
70
|
attributes=[
|
|
71
|
-
Attr(
|
|
71
|
+
Attr(
|
|
72
|
+
name="prefix",
|
|
73
|
+
kind="IPNetwork",
|
|
74
|
+
description="The IP prefix in CIDR notation",
|
|
75
|
+
branch=BranchSupportType.AWARE,
|
|
76
|
+
order_weight=1000,
|
|
77
|
+
),
|
|
72
78
|
Attr(name="description", kind="Text", optional=True, branch=BranchSupportType.AWARE, order_weight=2000),
|
|
73
79
|
Attr(
|
|
74
80
|
name="member_type",
|
|
75
81
|
kind="Dropdown",
|
|
82
|
+
description="Whether this prefix contains other prefixes or IP addresses",
|
|
76
83
|
choices=[
|
|
77
84
|
DropdownChoice(
|
|
78
85
|
name="prefix",
|
|
@@ -97,13 +104,53 @@ builtin_ip_prefix = GenericSchema(
|
|
|
97
104
|
order_weight=4000,
|
|
98
105
|
description="All IP addresses within this prefix are considered usable",
|
|
99
106
|
),
|
|
100
|
-
Attr(name="is_top_level", kind="Boolean", read_only=True, optional=True, allow_override=AllowOverrideType.NONE),
|
|
101
|
-
Attr(name="utilization", kind="Number", read_only=True, optional=True, allow_override=AllowOverrideType.NONE),
|
|
102
|
-
Attr(name="netmask", kind="Text", read_only=True, optional=True, allow_override=AllowOverrideType.NONE),
|
|
103
|
-
Attr(name="hostmask", kind="Text", read_only=True, optional=True, allow_override=AllowOverrideType.NONE),
|
|
104
|
-
Attr(name="network_address", kind="Text", read_only=True, optional=True, allow_override=AllowOverrideType.NONE),
|
|
105
107
|
Attr(
|
|
106
|
-
name="
|
|
108
|
+
name="is_top_level",
|
|
109
|
+
kind="Boolean",
|
|
110
|
+
description="Whether this prefix has no parent prefix",
|
|
111
|
+
read_only=True,
|
|
112
|
+
optional=True,
|
|
113
|
+
allow_override=AllowOverrideType.NONE,
|
|
114
|
+
),
|
|
115
|
+
Attr(
|
|
116
|
+
name="utilization",
|
|
117
|
+
kind="Number",
|
|
118
|
+
description="Percentage of the prefix that is allocated",
|
|
119
|
+
read_only=True,
|
|
120
|
+
optional=True,
|
|
121
|
+
allow_override=AllowOverrideType.NONE,
|
|
122
|
+
),
|
|
123
|
+
Attr(
|
|
124
|
+
name="netmask",
|
|
125
|
+
kind="Text",
|
|
126
|
+
description="Subnet mask in dotted decimal notation",
|
|
127
|
+
read_only=True,
|
|
128
|
+
optional=True,
|
|
129
|
+
allow_override=AllowOverrideType.NONE,
|
|
130
|
+
),
|
|
131
|
+
Attr(
|
|
132
|
+
name="hostmask",
|
|
133
|
+
kind="Text",
|
|
134
|
+
description="Wildcard mask in dotted decimal notation",
|
|
135
|
+
read_only=True,
|
|
136
|
+
optional=True,
|
|
137
|
+
allow_override=AllowOverrideType.NONE,
|
|
138
|
+
),
|
|
139
|
+
Attr(
|
|
140
|
+
name="network_address",
|
|
141
|
+
kind="Text",
|
|
142
|
+
description="Network address of the prefix",
|
|
143
|
+
read_only=True,
|
|
144
|
+
optional=True,
|
|
145
|
+
allow_override=AllowOverrideType.NONE,
|
|
146
|
+
),
|
|
147
|
+
Attr(
|
|
148
|
+
name="broadcast_address",
|
|
149
|
+
kind="Text",
|
|
150
|
+
description="Broadcast address of the prefix",
|
|
151
|
+
read_only=True,
|
|
152
|
+
optional=True,
|
|
153
|
+
allow_override=AllowOverrideType.NONE,
|
|
107
154
|
),
|
|
108
155
|
],
|
|
109
156
|
relationships=[
|
|
@@ -150,7 +197,13 @@ builtin_ip_address = GenericSchema(
|
|
|
150
197
|
icon="mdi:ip-outline",
|
|
151
198
|
branch=BranchSupportType.AWARE,
|
|
152
199
|
attributes=[
|
|
153
|
-
Attr(
|
|
200
|
+
Attr(
|
|
201
|
+
name="address",
|
|
202
|
+
kind="IPHost",
|
|
203
|
+
description="The IP address with prefix length",
|
|
204
|
+
branch=BranchSupportType.AWARE,
|
|
205
|
+
order_weight=1000,
|
|
206
|
+
),
|
|
154
207
|
Attr(name="description", kind="Text", optional=True, branch=BranchSupportType.AWARE, order_weight=2000),
|
|
155
208
|
],
|
|
156
209
|
relationships=[
|
|
@@ -186,7 +239,15 @@ internal_ipam_ip_range_available = NodeSchema(
|
|
|
186
239
|
branch=BranchSupportType.AWARE,
|
|
187
240
|
inherit_from=[InfrahubKind.IPADDRESS],
|
|
188
241
|
generate_profile=False,
|
|
189
|
-
attributes=[
|
|
242
|
+
attributes=[
|
|
243
|
+
Attr(
|
|
244
|
+
name="last_address",
|
|
245
|
+
kind="IPHost",
|
|
246
|
+
description="Last IP address in the available range",
|
|
247
|
+
branch=BranchSupportType.AWARE,
|
|
248
|
+
order_weight=2000,
|
|
249
|
+
)
|
|
250
|
+
],
|
|
190
251
|
)
|
|
191
252
|
|
|
192
253
|
internal_ipam_ip_prefix_available = NodeSchema(
|
|
@@ -215,5 +276,14 @@ core_ipam_namespace = NodeSchema(
|
|
|
215
276
|
icon="mdi:format-list-group",
|
|
216
277
|
branch=BranchSupportType.AWARE,
|
|
217
278
|
inherit_from=[InfrahubKind.IPNAMESPACE],
|
|
218
|
-
attributes=[
|
|
279
|
+
attributes=[
|
|
280
|
+
Attr(
|
|
281
|
+
name="default",
|
|
282
|
+
kind="Boolean",
|
|
283
|
+
description="Whether this is the default IPAM namespace",
|
|
284
|
+
optional=True,
|
|
285
|
+
read_only=True,
|
|
286
|
+
order_weight=9000,
|
|
287
|
+
)
|
|
288
|
+
],
|
|
219
289
|
)
|
|
@@ -17,19 +17,53 @@ generic_menu_item = GenericSchema(
|
|
|
17
17
|
display_labels=["label__value"],
|
|
18
18
|
generate_profile=False,
|
|
19
19
|
attributes=[
|
|
20
|
-
Attr(
|
|
20
|
+
Attr(
|
|
21
|
+
name="namespace",
|
|
22
|
+
kind="Text",
|
|
23
|
+
description="Namespace for the menu item",
|
|
24
|
+
regex=NAMESPACE_REGEX,
|
|
25
|
+
order_weight=1000,
|
|
26
|
+
),
|
|
21
27
|
Attr(name="name", kind="Text", order_weight=1000),
|
|
22
28
|
Attr(name="label", kind="Text", optional=True, order_weight=2000),
|
|
23
|
-
Attr(
|
|
24
|
-
|
|
29
|
+
Attr(
|
|
30
|
+
name="kind",
|
|
31
|
+
kind="Text",
|
|
32
|
+
description="Kind of object this menu item links to",
|
|
33
|
+
optional=True,
|
|
34
|
+
order_weight=2500,
|
|
35
|
+
),
|
|
36
|
+
Attr(name="path", kind="Text", description="URL path for the menu item", optional=True, order_weight=2500),
|
|
25
37
|
Attr(name="description", kind="Text", optional=True, order_weight=3000),
|
|
26
|
-
Attr(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
Attr(
|
|
38
|
+
Attr(
|
|
39
|
+
name="icon", kind="Text", description="Icon identifier for the menu item", optional=True, order_weight=4000
|
|
40
|
+
),
|
|
41
|
+
Attr(
|
|
42
|
+
name="protected",
|
|
43
|
+
kind="Boolean",
|
|
44
|
+
description="Whether the menu item is protected from modification",
|
|
45
|
+
default_value=False,
|
|
46
|
+
read_only=True,
|
|
47
|
+
order_weight=5000,
|
|
48
|
+
),
|
|
49
|
+
Attr(
|
|
50
|
+
name="order_weight",
|
|
51
|
+
kind="Number",
|
|
52
|
+
description="Ordering weight for menu item placement",
|
|
53
|
+
default_value=2000,
|
|
54
|
+
order_weight=6000,
|
|
55
|
+
),
|
|
56
|
+
Attr(
|
|
57
|
+
name="required_permissions",
|
|
58
|
+
kind="List",
|
|
59
|
+
description="List of permissions required to view this menu item",
|
|
60
|
+
optional=True,
|
|
61
|
+
order_weight=7000,
|
|
62
|
+
),
|
|
30
63
|
Attr(
|
|
31
64
|
name="section",
|
|
32
65
|
kind="Text",
|
|
66
|
+
description="Section where the menu item appears",
|
|
33
67
|
enum=["object", "internal"],
|
|
34
68
|
default_value="object",
|
|
35
69
|
order_weight=8000,
|
|
@@ -27,7 +27,14 @@ core_base_permission = GenericSchema(
|
|
|
27
27
|
generate_profile=False,
|
|
28
28
|
attributes=[
|
|
29
29
|
Attr(name="description", kind="Text", optional=True),
|
|
30
|
-
Attr(
|
|
30
|
+
Attr(
|
|
31
|
+
name="identifier",
|
|
32
|
+
kind="Text",
|
|
33
|
+
description="Identifier for the permission",
|
|
34
|
+
read_only=True,
|
|
35
|
+
optional=True,
|
|
36
|
+
allow_override=AllowOverrideType.NONE,
|
|
37
|
+
),
|
|
31
38
|
],
|
|
32
39
|
relationships=[
|
|
33
40
|
Rel(
|
|
@@ -54,11 +61,17 @@ core_object_permission = NodeSchema(
|
|
|
54
61
|
generate_profile=False,
|
|
55
62
|
inherit_from=[InfrahubKind.BASEPERMISSION],
|
|
56
63
|
attributes=[
|
|
57
|
-
Attr(
|
|
64
|
+
Attr(
|
|
65
|
+
name="namespace",
|
|
66
|
+
kind="Text",
|
|
67
|
+
description="Namespace of the object type this permission applies to",
|
|
68
|
+
order_weight=2000,
|
|
69
|
+
),
|
|
58
70
|
Attr(name="name", kind="Text", order_weight=3000),
|
|
59
71
|
Attr(
|
|
60
72
|
name="action",
|
|
61
73
|
kind="Text",
|
|
74
|
+
description="The action this permission grants or denies",
|
|
62
75
|
enum=PermissionAction.available_types(),
|
|
63
76
|
default_value=PermissionAction.ANY.value,
|
|
64
77
|
order_weight=4000,
|
|
@@ -91,6 +104,7 @@ core_global_permission = NodeSchema(
|
|
|
91
104
|
Attr(
|
|
92
105
|
name="action",
|
|
93
106
|
kind="Dropdown",
|
|
107
|
+
description="The global action this permission grants or denies",
|
|
94
108
|
choices=[DropdownChoice(name=permission.value) for permission in GlobalPermissions],
|
|
95
109
|
order_weight=2000,
|
|
96
110
|
),
|
|
@@ -12,7 +12,21 @@ core_profile_schema_definition = GenericSchema(
|
|
|
12
12
|
default_filter="profile_name__value",
|
|
13
13
|
uniqueness_constraints=[["profile_name__value"]],
|
|
14
14
|
attributes=[
|
|
15
|
-
Attr(
|
|
16
|
-
|
|
15
|
+
Attr(
|
|
16
|
+
name="profile_name",
|
|
17
|
+
kind="Text",
|
|
18
|
+
description="Unique name identifier for the profile",
|
|
19
|
+
min_length=3,
|
|
20
|
+
max_length=32,
|
|
21
|
+
unique=True,
|
|
22
|
+
optional=False,
|
|
23
|
+
),
|
|
24
|
+
Attr(
|
|
25
|
+
name="profile_priority",
|
|
26
|
+
kind="Number",
|
|
27
|
+
description="Priority level for profile application (lower numbers have higher priority)",
|
|
28
|
+
default_value=1000,
|
|
29
|
+
optional=True,
|
|
30
|
+
),
|
|
17
31
|
],
|
|
18
32
|
)
|
|
@@ -29,18 +29,38 @@ core_proposed_change = NodeSchema(
|
|
|
29
29
|
attributes=[
|
|
30
30
|
Attr(name="name", kind="Text", optional=False),
|
|
31
31
|
Attr(name="description", kind="TextArea", optional=True),
|
|
32
|
-
Attr(
|
|
33
|
-
|
|
32
|
+
Attr(
|
|
33
|
+
name="source_branch", kind="Text", description="Name of the branch containing the changes", optional=False
|
|
34
|
+
),
|
|
35
|
+
Attr(
|
|
36
|
+
name="destination_branch",
|
|
37
|
+
kind="Text",
|
|
38
|
+
description="Name of the branch to merge changes into",
|
|
39
|
+
optional=False,
|
|
40
|
+
),
|
|
34
41
|
Attr(
|
|
35
42
|
name="state",
|
|
36
43
|
kind="Text",
|
|
44
|
+
description="Current state of the proposed change",
|
|
37
45
|
enum=ProposedChangeState.available_types(),
|
|
38
46
|
default_value=ProposedChangeState.OPEN.value,
|
|
39
47
|
optional=True,
|
|
40
48
|
),
|
|
41
|
-
Attr(
|
|
49
|
+
Attr(
|
|
50
|
+
name="is_draft",
|
|
51
|
+
kind="Boolean",
|
|
52
|
+
description="Whether the proposed change is still a draft",
|
|
53
|
+
optional=False,
|
|
54
|
+
default_value=False,
|
|
55
|
+
),
|
|
42
56
|
# Ideally we should support some "runtime-attribute" that could not even be stored in the database.
|
|
43
|
-
Attr(
|
|
57
|
+
Attr(
|
|
58
|
+
name="total_comments",
|
|
59
|
+
kind="Number",
|
|
60
|
+
description="Total number of comments on this proposed change",
|
|
61
|
+
optional=True,
|
|
62
|
+
read_only=True,
|
|
63
|
+
),
|
|
44
64
|
],
|
|
45
65
|
relationships=[
|
|
46
66
|
Rel(
|
|
@@ -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(
|
|
52
|
-
|
|
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(
|
|
130
|
-
|
|
131
|
-
|
|
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",
|
|
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
|
)
|