infrahub-server 1.3.0a0__py3-none-any.whl → 1.3.0b2__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 -11
- infrahub/branch/__init__.py +0 -0
- infrahub/branch/tasks.py +29 -0
- infrahub/branch/triggers.py +22 -0
- infrahub/cli/db.py +2 -2
- infrahub/computed_attribute/gather.py +3 -1
- infrahub/computed_attribute/tasks.py +23 -29
- infrahub/core/attribute.py +3 -3
- infrahub/core/constants/__init__.py +10 -0
- infrahub/core/constants/database.py +1 -0
- infrahub/core/constants/infrahubkind.py +2 -0
- infrahub/core/convert_object_type/conversion.py +1 -1
- infrahub/core/diff/query/save.py +67 -40
- infrahub/core/diff/query/time_range_query.py +0 -1
- infrahub/core/graph/__init__.py +1 -1
- infrahub/core/migrations/graph/__init__.py +6 -0
- infrahub/core/migrations/graph/m013_convert_git_password_credential.py +0 -2
- infrahub/core/migrations/graph/m029_duplicates_cleanup.py +662 -0
- infrahub/core/migrations/graph/m030_illegal_edges.py +82 -0
- infrahub/core/migrations/query/attribute_add.py +13 -9
- infrahub/core/migrations/query/attribute_rename.py +2 -4
- infrahub/core/migrations/query/delete_element_in_schema.py +16 -11
- infrahub/core/migrations/query/node_duplicate.py +16 -15
- infrahub/core/migrations/query/relationship_duplicate.py +16 -12
- infrahub/core/migrations/schema/node_attribute_remove.py +1 -2
- infrahub/core/migrations/schema/node_remove.py +16 -14
- infrahub/core/node/__init__.py +74 -14
- infrahub/core/node/base.py +1 -1
- infrahub/core/node/resource_manager/ip_address_pool.py +6 -2
- infrahub/core/node/resource_manager/ip_prefix_pool.py +6 -2
- infrahub/core/node/resource_manager/number_pool.py +31 -5
- infrahub/core/node/standard.py +6 -1
- infrahub/core/path.py +1 -1
- infrahub/core/protocols.py +10 -0
- infrahub/core/query/node.py +1 -1
- infrahub/core/query/relationship.py +4 -6
- infrahub/core/query/standard_node.py +19 -5
- infrahub/core/relationship/constraints/peer_relatives.py +72 -0
- infrahub/core/relationship/model.py +1 -1
- infrahub/core/schema/attribute_parameters.py +129 -5
- infrahub/core/schema/attribute_schema.py +62 -14
- infrahub/core/schema/basenode_schema.py +2 -2
- infrahub/core/schema/definitions/core/__init__.py +16 -2
- infrahub/core/schema/definitions/core/group.py +45 -0
- infrahub/core/schema/definitions/core/resource_pool.py +29 -0
- infrahub/core/schema/definitions/internal.py +25 -4
- infrahub/core/schema/generated/attribute_schema.py +12 -5
- infrahub/core/schema/generated/relationship_schema.py +6 -1
- infrahub/core/schema/manager.py +7 -2
- infrahub/core/schema/schema_branch.py +69 -5
- infrahub/core/validators/__init__.py +8 -0
- infrahub/core/validators/attribute/choices.py +0 -1
- infrahub/core/validators/attribute/enum.py +0 -1
- infrahub/core/validators/attribute/kind.py +0 -1
- infrahub/core/validators/attribute/length.py +0 -1
- infrahub/core/validators/attribute/min_max.py +118 -0
- infrahub/core/validators/attribute/number_pool.py +106 -0
- infrahub/core/validators/attribute/optional.py +0 -2
- infrahub/core/validators/attribute/regex.py +0 -1
- infrahub/core/validators/enum.py +5 -0
- infrahub/core/validators/tasks.py +1 -1
- infrahub/database/__init__.py +16 -4
- infrahub/database/validation.py +100 -0
- infrahub/dependencies/builder/constraint/grouped/node_runner.py +2 -0
- infrahub/dependencies/builder/constraint/relationship_manager/peer_relatives.py +8 -0
- infrahub/dependencies/builder/diff/deserializer.py +1 -1
- infrahub/dependencies/registry.py +2 -0
- infrahub/events/models.py +1 -1
- infrahub/git/base.py +5 -3
- infrahub/git/integrator.py +102 -3
- infrahub/graphql/mutations/main.py +1 -1
- infrahub/graphql/mutations/resource_manager.py +54 -6
- infrahub/graphql/queries/resource_manager.py +7 -1
- infrahub/graphql/queries/task.py +10 -0
- infrahub/graphql/resolvers/many_relationship.py +1 -1
- infrahub/graphql/resolvers/resolver.py +2 -2
- infrahub/graphql/resolvers/single_relationship.py +1 -1
- infrahub/graphql/types/task_log.py +3 -2
- infrahub/menu/menu.py +8 -7
- infrahub/message_bus/operations/refresh/registry.py +3 -3
- infrahub/patch/queries/delete_duplicated_edges.py +40 -29
- infrahub/pools/number.py +5 -3
- infrahub/pools/registration.py +22 -0
- infrahub/pools/tasks.py +56 -0
- infrahub/schema/__init__.py +0 -0
- infrahub/schema/tasks.py +27 -0
- infrahub/schema/triggers.py +23 -0
- infrahub/task_manager/task.py +44 -4
- infrahub/trigger/catalogue.py +4 -0
- infrahub/trigger/models.py +5 -4
- infrahub/trigger/setup.py +26 -2
- infrahub/trigger/tasks.py +1 -1
- infrahub/types.py +6 -0
- infrahub/webhook/tasks.py +6 -9
- infrahub/workflows/catalogue.py +27 -1
- infrahub_sdk/client.py +43 -10
- infrahub_sdk/node/__init__.py +39 -0
- infrahub_sdk/node/attribute.py +122 -0
- infrahub_sdk/node/constants.py +21 -0
- infrahub_sdk/{node.py → node/node.py} +50 -749
- infrahub_sdk/node/parsers.py +15 -0
- infrahub_sdk/node/property.py +24 -0
- infrahub_sdk/node/related_node.py +266 -0
- infrahub_sdk/node/relationship.py +302 -0
- infrahub_sdk/protocols.py +112 -0
- infrahub_sdk/protocols_base.py +34 -2
- infrahub_sdk/query_groups.py +13 -2
- infrahub_sdk/schema/main.py +1 -0
- infrahub_sdk/schema/repository.py +16 -0
- infrahub_sdk/spec/object.py +1 -1
- infrahub_sdk/store.py +1 -1
- infrahub_sdk/testing/schemas/car_person.py +1 -0
- {infrahub_server-1.3.0a0.dist-info → infrahub_server-1.3.0b2.dist-info}/METADATA +3 -3
- {infrahub_server-1.3.0a0.dist-info → infrahub_server-1.3.0b2.dist-info}/RECORD +122 -100
- {infrahub_server-1.3.0a0.dist-info → infrahub_server-1.3.0b2.dist-info}/WHEEL +1 -1
- infrahub_testcontainers/container.py +239 -64
- infrahub_testcontainers/docker-compose-cluster.test.yml +321 -0
- infrahub_testcontainers/docker-compose.test.yml +1 -0
- infrahub_testcontainers/helpers.py +15 -1
- infrahub_testcontainers/plugin.py +9 -0
- infrahub/patch/queries/consolidate_duplicated_nodes.py +0 -106
- {infrahub_server-1.3.0a0.dist-info → infrahub_server-1.3.0b2.dist-info}/LICENSE.txt +0 -0
- {infrahub_server-1.3.0a0.dist-info → infrahub_server-1.3.0b2.dist-info}/entry_points.txt +0 -0
infrahub_sdk/protocols.py
CHANGED
|
@@ -68,6 +68,12 @@ class BuiltinIPPrefix(CoreNode):
|
|
|
68
68
|
children: RelationshipManager
|
|
69
69
|
|
|
70
70
|
|
|
71
|
+
class CoreAction(CoreNode):
|
|
72
|
+
name: String
|
|
73
|
+
description: StringOptional
|
|
74
|
+
triggers: RelationshipManager
|
|
75
|
+
|
|
76
|
+
|
|
71
77
|
class CoreArtifactTarget(CoreNode):
|
|
72
78
|
artifacts: RelationshipManager
|
|
73
79
|
|
|
@@ -154,6 +160,10 @@ class CoreMenu(CoreNode):
|
|
|
154
160
|
children: RelationshipManager
|
|
155
161
|
|
|
156
162
|
|
|
163
|
+
class CoreNodeTriggerMatch(CoreNode):
|
|
164
|
+
trigger: RelatedNode
|
|
165
|
+
|
|
166
|
+
|
|
157
167
|
class CoreObjectComponentTemplate(CoreNode):
|
|
158
168
|
template_name: String
|
|
159
169
|
|
|
@@ -195,6 +205,14 @@ class CoreTransformation(CoreNode):
|
|
|
195
205
|
tags: RelationshipManager
|
|
196
206
|
|
|
197
207
|
|
|
208
|
+
class CoreTriggerRule(CoreNode):
|
|
209
|
+
name: String
|
|
210
|
+
description: StringOptional
|
|
211
|
+
active: Boolean
|
|
212
|
+
branch_scope: Dropdown
|
|
213
|
+
action: RelatedNode
|
|
214
|
+
|
|
215
|
+
|
|
198
216
|
class CoreValidator(CoreNode):
|
|
199
217
|
label: StringOptional
|
|
200
218
|
state: Enum
|
|
@@ -328,6 +346,10 @@ class CoreFileThread(CoreThread):
|
|
|
328
346
|
repository: RelatedNode
|
|
329
347
|
|
|
330
348
|
|
|
349
|
+
class CoreGeneratorAction(CoreAction):
|
|
350
|
+
generator: RelatedNode
|
|
351
|
+
|
|
352
|
+
|
|
331
353
|
class CoreGeneratorCheck(CoreCheck):
|
|
332
354
|
instance: String
|
|
333
355
|
|
|
@@ -382,6 +404,16 @@ class CoreGraphQLQueryGroup(CoreGroup):
|
|
|
382
404
|
query: RelatedNode
|
|
383
405
|
|
|
384
406
|
|
|
407
|
+
class CoreGroupAction(CoreAction):
|
|
408
|
+
add_members: Boolean
|
|
409
|
+
group: RelatedNode
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
class CoreGroupTriggerRule(CoreTriggerRule):
|
|
413
|
+
members_added: Boolean
|
|
414
|
+
group: RelatedNode
|
|
415
|
+
|
|
416
|
+
|
|
385
417
|
class CoreIPAddressPool(CoreResourcePool, LineageSource):
|
|
386
418
|
default_address_type: String
|
|
387
419
|
default_prefix_length: IntegerOptional
|
|
@@ -401,6 +433,25 @@ class CoreMenuItem(CoreMenu):
|
|
|
401
433
|
pass
|
|
402
434
|
|
|
403
435
|
|
|
436
|
+
class CoreNodeTriggerAttributeMatch(CoreNodeTriggerMatch):
|
|
437
|
+
attribute_name: String
|
|
438
|
+
value: StringOptional
|
|
439
|
+
value_previous: StringOptional
|
|
440
|
+
value_match: Dropdown
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
class CoreNodeTriggerRelationshipMatch(CoreNodeTriggerMatch):
|
|
444
|
+
relationship_name: String
|
|
445
|
+
added: Boolean
|
|
446
|
+
peer: StringOptional
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
class CoreNodeTriggerRule(CoreTriggerRule):
|
|
450
|
+
node_kind: String
|
|
451
|
+
mutation_action: Enum
|
|
452
|
+
matches: RelationshipManager
|
|
453
|
+
|
|
454
|
+
|
|
404
455
|
class CoreNumberPool(CoreResourcePool, LineageSource):
|
|
405
456
|
node: String
|
|
406
457
|
node_attribute: String
|
|
@@ -448,6 +499,11 @@ class CoreRepository(LineageOwner, LineageSource, CoreGenericRepository, CoreTas
|
|
|
448
499
|
commit: StringOptional
|
|
449
500
|
|
|
450
501
|
|
|
502
|
+
class CoreRepositoryGroup(CoreGroup):
|
|
503
|
+
content: Dropdown
|
|
504
|
+
repository: RelatedNode
|
|
505
|
+
|
|
506
|
+
|
|
451
507
|
class CoreRepositoryValidator(CoreValidator):
|
|
452
508
|
repository: RelatedNode
|
|
453
509
|
|
|
@@ -545,6 +601,12 @@ class BuiltinIPPrefixSync(CoreNodeSync):
|
|
|
545
601
|
children: RelationshipManagerSync
|
|
546
602
|
|
|
547
603
|
|
|
604
|
+
class CoreActionSync(CoreNodeSync):
|
|
605
|
+
name: String
|
|
606
|
+
description: StringOptional
|
|
607
|
+
triggers: RelationshipManagerSync
|
|
608
|
+
|
|
609
|
+
|
|
548
610
|
class CoreArtifactTargetSync(CoreNodeSync):
|
|
549
611
|
artifacts: RelationshipManagerSync
|
|
550
612
|
|
|
@@ -631,6 +693,10 @@ class CoreMenuSync(CoreNodeSync):
|
|
|
631
693
|
children: RelationshipManagerSync
|
|
632
694
|
|
|
633
695
|
|
|
696
|
+
class CoreNodeTriggerMatchSync(CoreNodeSync):
|
|
697
|
+
trigger: RelatedNodeSync
|
|
698
|
+
|
|
699
|
+
|
|
634
700
|
class CoreObjectComponentTemplateSync(CoreNodeSync):
|
|
635
701
|
template_name: String
|
|
636
702
|
|
|
@@ -672,6 +738,14 @@ class CoreTransformationSync(CoreNodeSync):
|
|
|
672
738
|
tags: RelationshipManagerSync
|
|
673
739
|
|
|
674
740
|
|
|
741
|
+
class CoreTriggerRuleSync(CoreNodeSync):
|
|
742
|
+
name: String
|
|
743
|
+
description: StringOptional
|
|
744
|
+
active: Boolean
|
|
745
|
+
branch_scope: Dropdown
|
|
746
|
+
action: RelatedNodeSync
|
|
747
|
+
|
|
748
|
+
|
|
675
749
|
class CoreValidatorSync(CoreNodeSync):
|
|
676
750
|
label: StringOptional
|
|
677
751
|
state: Enum
|
|
@@ -805,6 +879,10 @@ class CoreFileThreadSync(CoreThreadSync):
|
|
|
805
879
|
repository: RelatedNodeSync
|
|
806
880
|
|
|
807
881
|
|
|
882
|
+
class CoreGeneratorActionSync(CoreActionSync):
|
|
883
|
+
generator: RelatedNodeSync
|
|
884
|
+
|
|
885
|
+
|
|
808
886
|
class CoreGeneratorCheckSync(CoreCheckSync):
|
|
809
887
|
instance: String
|
|
810
888
|
|
|
@@ -859,6 +937,16 @@ class CoreGraphQLQueryGroupSync(CoreGroupSync):
|
|
|
859
937
|
query: RelatedNodeSync
|
|
860
938
|
|
|
861
939
|
|
|
940
|
+
class CoreGroupActionSync(CoreActionSync):
|
|
941
|
+
add_members: Boolean
|
|
942
|
+
group: RelatedNodeSync
|
|
943
|
+
|
|
944
|
+
|
|
945
|
+
class CoreGroupTriggerRuleSync(CoreTriggerRuleSync):
|
|
946
|
+
members_added: Boolean
|
|
947
|
+
group: RelatedNodeSync
|
|
948
|
+
|
|
949
|
+
|
|
862
950
|
class CoreIPAddressPoolSync(CoreResourcePoolSync, LineageSourceSync):
|
|
863
951
|
default_address_type: String
|
|
864
952
|
default_prefix_length: IntegerOptional
|
|
@@ -878,6 +966,25 @@ class CoreMenuItemSync(CoreMenuSync):
|
|
|
878
966
|
pass
|
|
879
967
|
|
|
880
968
|
|
|
969
|
+
class CoreNodeTriggerAttributeMatchSync(CoreNodeTriggerMatchSync):
|
|
970
|
+
attribute_name: String
|
|
971
|
+
value: StringOptional
|
|
972
|
+
value_previous: StringOptional
|
|
973
|
+
value_match: Dropdown
|
|
974
|
+
|
|
975
|
+
|
|
976
|
+
class CoreNodeTriggerRelationshipMatchSync(CoreNodeTriggerMatchSync):
|
|
977
|
+
relationship_name: String
|
|
978
|
+
added: Boolean
|
|
979
|
+
peer: StringOptional
|
|
980
|
+
|
|
981
|
+
|
|
982
|
+
class CoreNodeTriggerRuleSync(CoreTriggerRuleSync):
|
|
983
|
+
node_kind: String
|
|
984
|
+
mutation_action: Enum
|
|
985
|
+
matches: RelationshipManagerSync
|
|
986
|
+
|
|
987
|
+
|
|
881
988
|
class CoreNumberPoolSync(CoreResourcePoolSync, LineageSourceSync):
|
|
882
989
|
node: String
|
|
883
990
|
node_attribute: String
|
|
@@ -925,6 +1032,11 @@ class CoreRepositorySync(LineageOwnerSync, LineageSourceSync, CoreGenericReposit
|
|
|
925
1032
|
commit: StringOptional
|
|
926
1033
|
|
|
927
1034
|
|
|
1035
|
+
class CoreRepositoryGroupSync(CoreGroupSync):
|
|
1036
|
+
content: Dropdown
|
|
1037
|
+
repository: RelatedNodeSync
|
|
1038
|
+
|
|
1039
|
+
|
|
928
1040
|
class CoreRepositoryValidatorSync(CoreValidatorSync):
|
|
929
1041
|
repository: RelatedNodeSync
|
|
930
1042
|
|
infrahub_sdk/protocols_base.py
CHANGED
|
@@ -10,11 +10,42 @@ if TYPE_CHECKING:
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
@runtime_checkable
|
|
13
|
-
class
|
|
13
|
+
class RelatedNodeBase(Protocol):
|
|
14
|
+
@property
|
|
15
|
+
def id(self) -> str | None: ...
|
|
16
|
+
|
|
17
|
+
@property
|
|
18
|
+
def hfid(self) -> list[Any] | None: ...
|
|
19
|
+
|
|
20
|
+
@property
|
|
21
|
+
def hfid_str(self) -> str | None: ...
|
|
22
|
+
|
|
23
|
+
@property
|
|
24
|
+
def is_resource_pool(self) -> bool: ...
|
|
25
|
+
|
|
26
|
+
@property
|
|
27
|
+
def initialized(self) -> bool: ...
|
|
28
|
+
|
|
29
|
+
@property
|
|
30
|
+
def display_label(self) -> str | None: ...
|
|
31
|
+
|
|
32
|
+
@property
|
|
33
|
+
def typename(self) -> str | None: ...
|
|
34
|
+
|
|
35
|
+
def _generate_input_data(self, allocate_from_pool: bool = False) -> dict[str, Any]: ...
|
|
36
|
+
|
|
37
|
+
def _generate_mutation_query(self) -> dict[str, Any]: ...
|
|
38
|
+
|
|
39
|
+
@classmethod
|
|
40
|
+
def _generate_query_data(cls, peer_data: dict[str, Any] | None = None, property: bool = False) -> dict: ...
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@runtime_checkable
|
|
44
|
+
class RelatedNode(RelatedNodeBase, Protocol): ...
|
|
14
45
|
|
|
15
46
|
|
|
16
47
|
@runtime_checkable
|
|
17
|
-
class RelatedNodeSync(Protocol): ...
|
|
48
|
+
class RelatedNodeSync(RelatedNodeBase, Protocol): ...
|
|
18
49
|
|
|
19
50
|
|
|
20
51
|
@runtime_checkable
|
|
@@ -147,6 +178,7 @@ class CoreNodeBase(Protocol):
|
|
|
147
178
|
_internal_id: str
|
|
148
179
|
id: str # NOTE this is incorrect, should be str | None
|
|
149
180
|
display_label: str | None
|
|
181
|
+
typename: str | None
|
|
150
182
|
|
|
151
183
|
@property
|
|
152
184
|
def hfid(self) -> list[str] | None: ...
|
infrahub_sdk/query_groups.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from typing import TYPE_CHECKING
|
|
3
|
+
from typing import TYPE_CHECKING, Any
|
|
4
4
|
|
|
5
5
|
from .constants import InfrahubClientMode
|
|
6
6
|
from .exceptions import NodeNotFoundError
|
|
@@ -25,6 +25,7 @@ class InfrahubGroupContextBase:
|
|
|
25
25
|
self.params: dict[str, str] = {}
|
|
26
26
|
self.delete_unused_nodes: bool = False
|
|
27
27
|
self.group_type: str = "CoreStandardGroup"
|
|
28
|
+
self.group_params: dict[str, Any] = {}
|
|
28
29
|
|
|
29
30
|
def set_properties(
|
|
30
31
|
self,
|
|
@@ -32,6 +33,8 @@ class InfrahubGroupContextBase:
|
|
|
32
33
|
params: dict[str, str] | None = None,
|
|
33
34
|
delete_unused_nodes: bool = False,
|
|
34
35
|
group_type: str | None = None,
|
|
36
|
+
group_params: dict[str, Any] | None = None,
|
|
37
|
+
branch: str | None = None,
|
|
35
38
|
) -> None:
|
|
36
39
|
"""Setter method to set the values of identifier and params.
|
|
37
40
|
|
|
@@ -43,6 +46,8 @@ class InfrahubGroupContextBase:
|
|
|
43
46
|
self.params = params or {}
|
|
44
47
|
self.delete_unused_nodes = delete_unused_nodes
|
|
45
48
|
self.group_type = group_type or self.group_type
|
|
49
|
+
self.group_params = group_params or {}
|
|
50
|
+
self.branch = branch
|
|
46
51
|
|
|
47
52
|
def _get_params_as_str(self) -> str:
|
|
48
53
|
"""Convert the params in dict format, into a string"""
|
|
@@ -87,7 +92,9 @@ class InfrahubGroupContext(InfrahubGroupContextBase):
|
|
|
87
92
|
async def get_group(self, store_peers: bool = False) -> InfrahubNode | None:
|
|
88
93
|
group_name = self._generate_group_name()
|
|
89
94
|
try:
|
|
90
|
-
group = await self.client.get(
|
|
95
|
+
group = await self.client.get(
|
|
96
|
+
kind=self.group_type, name__value=group_name, include=["members"], branch=self.branch
|
|
97
|
+
)
|
|
91
98
|
except NodeNotFoundError:
|
|
92
99
|
return None
|
|
93
100
|
|
|
@@ -151,6 +158,8 @@ class InfrahubGroupContext(InfrahubGroupContextBase):
|
|
|
151
158
|
name=group_name,
|
|
152
159
|
description=description,
|
|
153
160
|
members=members,
|
|
161
|
+
branch=self.branch,
|
|
162
|
+
**self.group_params,
|
|
154
163
|
)
|
|
155
164
|
await group.save(allow_upsert=True, update_group_context=False)
|
|
156
165
|
|
|
@@ -243,6 +252,8 @@ class InfrahubGroupContextSync(InfrahubGroupContextBase):
|
|
|
243
252
|
name=group_name,
|
|
244
253
|
description=description,
|
|
245
254
|
members=members,
|
|
255
|
+
branch=self.branch,
|
|
256
|
+
**self.group_params,
|
|
246
257
|
)
|
|
247
258
|
group.save(allow_upsert=True, update_group_context=False)
|
|
248
259
|
|
infrahub_sdk/schema/main.py
CHANGED
|
@@ -147,6 +147,18 @@ class InfrahubRepositoryGraphQLConfig(InfrahubRepositoryConfigElement):
|
|
|
147
147
|
return file.read()
|
|
148
148
|
|
|
149
149
|
|
|
150
|
+
class InfrahubObjectConfig(InfrahubRepositoryConfigElement):
|
|
151
|
+
model_config = ConfigDict(extra="forbid")
|
|
152
|
+
name: str = Field(..., description="The name associated to the object file")
|
|
153
|
+
file_path: Path = Field(..., description="The file within the repository containing object data.")
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
class InfrahubMenuConfig(InfrahubRepositoryConfigElement):
|
|
157
|
+
model_config = ConfigDict(extra="forbid")
|
|
158
|
+
name: str = Field(..., description="The name of the menu")
|
|
159
|
+
file_path: Path = Field(..., description="The file within the repository containing menu data.")
|
|
160
|
+
|
|
161
|
+
|
|
150
162
|
RESOURCE_MAP: dict[Any, str] = {
|
|
151
163
|
InfrahubJinja2TransformConfig: "jinja2_transforms",
|
|
152
164
|
InfrahubCheckDefinitionConfig: "check_definitions",
|
|
@@ -154,6 +166,8 @@ RESOURCE_MAP: dict[Any, str] = {
|
|
|
154
166
|
InfrahubPythonTransformConfig: "python_transforms",
|
|
155
167
|
InfrahubGeneratorDefinitionConfig: "generator_definitions",
|
|
156
168
|
InfrahubRepositoryGraphQLConfig: "queries",
|
|
169
|
+
InfrahubObjectConfig: "objects",
|
|
170
|
+
InfrahubMenuConfig: "menus",
|
|
157
171
|
}
|
|
158
172
|
|
|
159
173
|
|
|
@@ -176,6 +190,8 @@ class InfrahubRepositoryConfig(BaseModel):
|
|
|
176
190
|
default_factory=list, description="Generator definitions"
|
|
177
191
|
)
|
|
178
192
|
queries: list[InfrahubRepositoryGraphQLConfig] = Field(default_factory=list, description="GraphQL Queries")
|
|
193
|
+
objects: list[Path] = Field(default_factory=list, description="Objects")
|
|
194
|
+
menus: list[Path] = Field(default_factory=list, description="Menus")
|
|
179
195
|
|
|
180
196
|
@field_validator(
|
|
181
197
|
"check_definitions",
|
infrahub_sdk/spec/object.py
CHANGED
|
@@ -459,7 +459,7 @@ class InfrahubObjectFileData(BaseModel):
|
|
|
459
459
|
await node.save(allow_upsert=True)
|
|
460
460
|
|
|
461
461
|
display_label = node.get_human_friendly_id_as_string() or f"{node.get_kind()} : {node.id}"
|
|
462
|
-
client.log.info(f"
|
|
462
|
+
client.log.info(f"Created node: {display_label}")
|
|
463
463
|
|
|
464
464
|
for rel in remaining_rels:
|
|
465
465
|
context = {}
|
infrahub_sdk/store.py
CHANGED
|
@@ -4,7 +4,7 @@ import warnings
|
|
|
4
4
|
from typing import TYPE_CHECKING, Literal, overload
|
|
5
5
|
|
|
6
6
|
from .exceptions import NodeInvalidError, NodeNotFoundError
|
|
7
|
-
from .node import parse_human_friendly_id
|
|
7
|
+
from .node.parsers import parse_human_friendly_id
|
|
8
8
|
|
|
9
9
|
if TYPE_CHECKING:
|
|
10
10
|
from .client import SchemaType, SchemaTypeSync
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: infrahub-server
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.0b2
|
|
4
4
|
Summary: Infrahub is taking a new approach to Infrastructure Management by providing a new generation of datastore to organize and control all the data that defines how an infrastructure should run.
|
|
5
|
-
Home-page: https://opsmill.com
|
|
6
5
|
License: AGPL-3.0-only
|
|
7
6
|
Author: OpsMill
|
|
8
7
|
Author-email: info@opsmill.com
|
|
@@ -58,6 +57,7 @@ Requires-Dist: ujson (>=5,<6)
|
|
|
58
57
|
Requires-Dist: uvicorn[standard] (>=0.32,<0.33)
|
|
59
58
|
Requires-Dist: whenever (==0.7.2)
|
|
60
59
|
Project-URL: Documentation, https://docs.infrahub.app/
|
|
60
|
+
Project-URL: Homepage, https://opsmill.com
|
|
61
61
|
Project-URL: Repository, https://github.com/opsmill/infrahub
|
|
62
62
|
Description-Content-Type: text/markdown
|
|
63
63
|
|