infrahub-server 1.2.6__py3-none-any.whl → 1.2.7__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/cli/db.py +2 -0
- infrahub/cli/patch.py +153 -0
- infrahub/computed_attribute/models.py +81 -1
- infrahub/computed_attribute/tasks.py +34 -53
- infrahub/core/node/__init__.py +4 -1
- infrahub/core/query/ipam.py +7 -5
- infrahub/patch/__init__.py +0 -0
- infrahub/patch/constants.py +13 -0
- infrahub/patch/edge_adder.py +64 -0
- infrahub/patch/edge_deleter.py +33 -0
- infrahub/patch/edge_updater.py +28 -0
- infrahub/patch/models.py +98 -0
- infrahub/patch/plan_reader.py +107 -0
- infrahub/patch/plan_writer.py +92 -0
- infrahub/patch/queries/__init__.py +0 -0
- infrahub/patch/queries/base.py +17 -0
- infrahub/patch/runner.py +254 -0
- infrahub/patch/vertex_adder.py +61 -0
- infrahub/patch/vertex_deleter.py +33 -0
- infrahub/patch/vertex_updater.py +28 -0
- infrahub_sdk/checks.py +1 -1
- infrahub_sdk/ctl/cli_commands.py +2 -2
- infrahub_sdk/ctl/menu.py +56 -13
- infrahub_sdk/ctl/object.py +55 -5
- infrahub_sdk/ctl/utils.py +22 -1
- infrahub_sdk/exceptions.py +19 -1
- infrahub_sdk/node.py +42 -26
- infrahub_sdk/protocols_generator/__init__.py +0 -0
- infrahub_sdk/protocols_generator/constants.py +28 -0
- infrahub_sdk/{code_generator.py → protocols_generator/generator.py} +47 -34
- infrahub_sdk/protocols_generator/template.j2 +114 -0
- infrahub_sdk/schema/__init__.py +110 -74
- infrahub_sdk/schema/main.py +36 -2
- infrahub_sdk/schema/repository.py +2 -0
- infrahub_sdk/spec/menu.py +3 -3
- infrahub_sdk/spec/object.py +522 -41
- infrahub_sdk/testing/docker.py +4 -5
- infrahub_sdk/testing/schemas/animal.py +7 -0
- infrahub_sdk/yaml.py +63 -7
- {infrahub_server-1.2.6.dist-info → infrahub_server-1.2.7.dist-info}/METADATA +1 -1
- {infrahub_server-1.2.6.dist-info → infrahub_server-1.2.7.dist-info}/RECORD +44 -27
- infrahub_sdk/ctl/constants.py +0 -115
- {infrahub_server-1.2.6.dist-info → infrahub_server-1.2.7.dist-info}/LICENSE.txt +0 -0
- {infrahub_server-1.2.6.dist-info → infrahub_server-1.2.7.dist-info}/WHEEL +0 -0
- {infrahub_server-1.2.6.dist-info → infrahub_server-1.2.7.dist-info}/entry_points.txt +0 -0
infrahub_sdk/yaml.py
CHANGED
|
@@ -7,6 +7,7 @@ from typing import Any
|
|
|
7
7
|
import yaml
|
|
8
8
|
from pydantic import BaseModel, Field
|
|
9
9
|
from typing_extensions import Self
|
|
10
|
+
from yaml.parser import ParserError
|
|
10
11
|
|
|
11
12
|
from .exceptions import FileNotValidError
|
|
12
13
|
from .utils import find_files, read_file
|
|
@@ -25,12 +26,14 @@ class InfrahubFileData(BaseModel):
|
|
|
25
26
|
api_version: InfrahubFileApiVersion = Field(InfrahubFileApiVersion.V1, alias="apiVersion")
|
|
26
27
|
kind: InfrahubFileKind
|
|
27
28
|
spec: dict
|
|
28
|
-
metadata: dict
|
|
29
|
+
metadata: dict = Field(default_factory=dict)
|
|
29
30
|
|
|
30
31
|
|
|
31
32
|
class LocalFile(BaseModel):
|
|
32
33
|
identifier: str | None = None
|
|
33
34
|
location: Path
|
|
35
|
+
multiple_documents: bool = False
|
|
36
|
+
document_position: int | None = None
|
|
34
37
|
content: dict | None = None
|
|
35
38
|
valid: bool = True
|
|
36
39
|
error_message: str | None = None
|
|
@@ -57,20 +60,73 @@ class YamlFile(LocalFile):
|
|
|
57
60
|
def validate_content(self) -> None:
|
|
58
61
|
pass
|
|
59
62
|
|
|
63
|
+
@classmethod
|
|
64
|
+
def init(cls, location: Path, multiple_documents: bool, content: dict | None) -> Self:
|
|
65
|
+
if not content:
|
|
66
|
+
return cls._file_is_empty(path=location, has_multiple_document=multiple_documents)
|
|
67
|
+
|
|
68
|
+
return cls(location=location, multiple_documents=multiple_documents, content=content)
|
|
69
|
+
|
|
70
|
+
@classmethod
|
|
71
|
+
def _file_is_empty(cls, path: Path, has_multiple_document: bool) -> Self:
|
|
72
|
+
return cls(
|
|
73
|
+
location=path, multiple_documents=has_multiple_document, error_message="Invalid YAML/JSON file", valid=False
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
@classmethod
|
|
77
|
+
def _file_is_invalid(cls, path: Path, has_multiple_document: bool) -> Self:
|
|
78
|
+
return cls(
|
|
79
|
+
location=path,
|
|
80
|
+
multiple_documents=has_multiple_document,
|
|
81
|
+
error_message="Invalid YAML/JSON file",
|
|
82
|
+
valid=False,
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def load_file_from_disk(cls, path: Path) -> list[Self]:
|
|
87
|
+
yaml_files: list[Self] = []
|
|
88
|
+
|
|
89
|
+
try:
|
|
90
|
+
file_content = read_file(path)
|
|
91
|
+
|
|
92
|
+
has_multiple_document = bool(file_content.count("---") > 1)
|
|
93
|
+
|
|
94
|
+
if has_multiple_document:
|
|
95
|
+
for content in yaml.safe_load_all(file_content):
|
|
96
|
+
yaml_files.append(
|
|
97
|
+
cls.init(location=path, multiple_documents=has_multiple_document, content=content)
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
else:
|
|
101
|
+
yaml_files.append(
|
|
102
|
+
cls.init(
|
|
103
|
+
location=path, multiple_documents=has_multiple_document, content=yaml.safe_load(file_content)
|
|
104
|
+
)
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
except FileNotValidError as exc:
|
|
108
|
+
yaml_files.append(
|
|
109
|
+
cls(location=path, multiple_documents=has_multiple_document, error_message=exc.message, valid=False)
|
|
110
|
+
)
|
|
111
|
+
except (yaml.YAMLError, ParserError):
|
|
112
|
+
yaml_files.append(cls._file_is_invalid(path, has_multiple_document))
|
|
113
|
+
|
|
114
|
+
if has_multiple_document:
|
|
115
|
+
for idx, file in enumerate(yaml_files):
|
|
116
|
+
file.document_position = idx + 1
|
|
117
|
+
|
|
118
|
+
return yaml_files
|
|
119
|
+
|
|
60
120
|
@classmethod
|
|
61
121
|
def load_from_disk(cls, paths: list[Path]) -> list[Self]:
|
|
62
122
|
yaml_files: list[Self] = []
|
|
63
123
|
for file_path in paths:
|
|
64
124
|
if file_path.is_file():
|
|
65
|
-
|
|
66
|
-
yaml_file.load_content()
|
|
67
|
-
yaml_files.append(yaml_file)
|
|
125
|
+
yaml_files.extend(cls.load_file_from_disk(path=file_path))
|
|
68
126
|
elif file_path.is_dir():
|
|
69
127
|
files = find_files(extension=["yaml", "yml", "json"], directory=file_path)
|
|
70
128
|
for item in files:
|
|
71
|
-
|
|
72
|
-
yaml_file.load_content()
|
|
73
|
-
yaml_files.append(yaml_file)
|
|
129
|
+
yaml_files.extend(cls.load_file_from_disk(path=item))
|
|
74
130
|
else:
|
|
75
131
|
raise FileNotValidError(name=str(file_path), message=f"{file_path} does not exist!")
|
|
76
132
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: infrahub-server
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.7
|
|
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
5
|
Home-page: https://opsmill.com
|
|
6
6
|
License: AGPL-3.0-only
|
|
@@ -27,9 +27,10 @@ infrahub/auth.py,sha256=g4pQX4kI1k-iWIQNduXODhpeZXIjY3XqLslh7QFRBq4,9194
|
|
|
27
27
|
infrahub/cli/__init__.py,sha256=zQjE9zMrwAmk_4qb5mbUgNi06g3HKvrPwQvJLQmv9JY,1814
|
|
28
28
|
infrahub/cli/constants.py,sha256=CoCeTMnfsA3j7ArdLKLZK4VPxOM7ls17qpxGJmND0m8,129
|
|
29
29
|
infrahub/cli/context.py,sha256=20CJj_D1VhigR9uhTDPHiVHnV7vzsgK8v-uLKs06kzA,398
|
|
30
|
-
infrahub/cli/db.py,sha256=
|
|
30
|
+
infrahub/cli/db.py,sha256=W0_46WSljyO_-Df73ochDz-ZKdN8uwqypRuRi_4SSDc,27919
|
|
31
31
|
infrahub/cli/events.py,sha256=nJmowQgTxRs6qaT41A71Ei9jm6qtYaL2amAT5TA1H_k,1726
|
|
32
32
|
infrahub/cli/git_agent.py,sha256=ajT9-kdd3xLIysOPe8GqZyCDMkpNyhqfWjBg9HPWVcg,5240
|
|
33
|
+
infrahub/cli/patch.py,sha256=ztOkWyo0l_Wo0WX10bvSqGZibKzowrwx82oi69cjwkY,6018
|
|
33
34
|
infrahub/cli/server.py,sha256=zeKgJE9V0usSMVBwye0sRNNh6Ctj-nSZHqHbNskqyz4,2248
|
|
34
35
|
infrahub/cli/tasks.py,sha256=uVtMuUbcXwb6H3hnunUl9JJh99XShpWn2pwryVrR7hg,1952
|
|
35
36
|
infrahub/cli/upgrade.py,sha256=GQWzga8AFTvfS_VY6s1Nmf_J1UJb533IUVQiF_FC9r0,5031
|
|
@@ -37,8 +38,8 @@ infrahub/components.py,sha256=lSLDCDwIZoakZ2iBrfHi9c3BxzugMiuiZO6V7Egt6tk,107
|
|
|
37
38
|
infrahub/computed_attribute/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
39
|
infrahub/computed_attribute/constants.py,sha256=oTMPEfRuf2mcfCkBpRLWRALO6nsLHpFm9jJGu0lowS4,446
|
|
39
40
|
infrahub/computed_attribute/gather.py,sha256=TSv6_CWZH1DYRv430jzyJpFJWKzwPGka5wFiL1jJ9rM,8096
|
|
40
|
-
infrahub/computed_attribute/models.py,sha256
|
|
41
|
-
infrahub/computed_attribute/tasks.py,sha256=
|
|
41
|
+
infrahub/computed_attribute/models.py,sha256=xAzLfZ8teEiJrfa8JOc3EAjikOMakj0LCvWmwGh9miQ,16789
|
|
42
|
+
infrahub/computed_attribute/tasks.py,sha256=IwsBqTS5rgCNgPzCLw6X7m9SZAJRCfiE06ZpObJGXmE,16775
|
|
42
43
|
infrahub/computed_attribute/triggers.py,sha256=ve1cUj0CZ7dU1VtZkxET9LD8StszKIL9mCkTZpCeUaI,2304
|
|
43
44
|
infrahub/config.py,sha256=J3R-k2I5WHNAHZaCJWRFSNOhCn_T4Is1E8WeQqDaPYI,35222
|
|
44
45
|
infrahub/context.py,sha256=8SZRKSECkkcsNNzDaKEUJ7Nyr0EzUfToAy969LXjQVk,1554
|
|
@@ -178,7 +179,7 @@ infrahub/core/migrations/schema/placeholder_dummy.py,sha256=3T3dBwC_ZyehOJr2KRKF
|
|
|
178
179
|
infrahub/core/migrations/schema/tasks.py,sha256=x6c_5N0pcQ_lTH5Vaqg2_MwlQ08I35BdX-8NhRDozBE,4165
|
|
179
180
|
infrahub/core/migrations/shared.py,sha256=e7HEBijWhG46UN8ODjSmxvGeK8KAQ3Twnj2q1dvb2m0,6983
|
|
180
181
|
infrahub/core/models.py,sha256=43iDtUwlsJ5G_F8IP4XoxLeoilfgjudhN3ZfS7esyh8,24840
|
|
181
|
-
infrahub/core/node/__init__.py,sha256=
|
|
182
|
+
infrahub/core/node/__init__.py,sha256=y9-9QIenn6MtY7MdOMz72hUSWueAx6KJ6507pelgeyw,36770
|
|
182
183
|
infrahub/core/node/base.py,sha256=5HfcA2d3GPjEDqJAEHGF_eHh6RV3-QlNpAsTr499ZmI,2578
|
|
183
184
|
infrahub/core/node/constraints/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
184
185
|
infrahub/core/node/constraints/attribute_uniqueness.py,sha256=9MThTmuqZ7RgK71ZZARlw1k1x3ARn1U67g2_Gatd6rE,2099
|
|
@@ -201,7 +202,7 @@ infrahub/core/query/attribute.py,sha256=DzwbElgTaZs6-nBYGmnDpBr9n0lmUPK3p7eyI30S
|
|
|
201
202
|
infrahub/core/query/branch.py,sha256=5U0YRAcJUnWYwJWRJVhUG0_VRa18_NtDhp02VLKotM0,4641
|
|
202
203
|
infrahub/core/query/delete.py,sha256=_PL97nz-ybF0JqDSYlTPhIa4oCxwPiFerwd8Wjw-x-8,1918
|
|
203
204
|
infrahub/core/query/diff.py,sha256=-hMyXsKfsBmxmSnboF-hN8IYa0aTPXJRUocMtOyyRs4,31987
|
|
204
|
-
infrahub/core/query/ipam.py,sha256=
|
|
205
|
+
infrahub/core/query/ipam.py,sha256=66snB2ANAUcGk-Ke88Y1CIoXO7CCBOsOx8JZTFXnPfA,28384
|
|
205
206
|
infrahub/core/query/node.py,sha256=-gpEaJHND7MjpNT33EkMArEDoVGkienMa4E5QJT6Hgg,61784
|
|
206
207
|
infrahub/core/query/relationship.py,sha256=b6_kfwzttfVHJ0_Ej3dRUg62cWs3wwZvp-YLlSubnQE,42567
|
|
207
208
|
infrahub/core/query/resource_manager.py,sha256=rVksmyFSTGwiq0ZFp2I8kGuMI_F2__c9wE7LgYYeqow,12728
|
|
@@ -537,6 +538,20 @@ infrahub/message_bus/operations/send/echo.py,sha256=m2z_ij7Bucl8u1E1rLAfL3fsrhKZ
|
|
|
537
538
|
infrahub/message_bus/types.py,sha256=suudCrwuYXqoRVN6J9dbshRtK22BPxk0cdaCG8QKaxM,4258
|
|
538
539
|
infrahub/middleware.py,sha256=g6lPpXewWNcLjyzRsr7FjdTIbdc5H2HitGQX-L7itgI,657
|
|
539
540
|
infrahub/models.py,sha256=QmwJwo3hNCta8BXM7eLsD9qv1S73Rj0cC_crLpadHTc,715
|
|
541
|
+
infrahub/patch/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
542
|
+
infrahub/patch/constants.py,sha256=dhJ9XGujYq_t3RL6PC3wvP47UPvf3MvMPrU-hISOv1U,479
|
|
543
|
+
infrahub/patch/edge_adder.py,sha256=zBy_y3K7oBFxtmtzaKXczwvFMjaRRzfemyvmKcp-B6w,2723
|
|
544
|
+
infrahub/patch/edge_deleter.py,sha256=sks0Pyec-ItAI5QT2MDL0PQN7g0iYWj6z8IxMnfd1r8,1286
|
|
545
|
+
infrahub/patch/edge_updater.py,sha256=SJ1bbVT6S_vKhtkIpwPBOWgheLbT3KYIjZhumIpneZs,1104
|
|
546
|
+
infrahub/patch/models.py,sha256=F7RC0WF2GjaLNVwqJNik3k8NSgV-ai0d6vHJ3qIdmMM,2952
|
|
547
|
+
infrahub/patch/plan_reader.py,sha256=uqHNYVBBkpmVIGwaxl2tlMNJd2tPVedNZoSmFSjTdow,5460
|
|
548
|
+
infrahub/patch/plan_writer.py,sha256=x2u5Oe3ME3zXTdkz5hRnvp2EaQwt-r4LyuSATc2LkKs,4822
|
|
549
|
+
infrahub/patch/queries/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
550
|
+
infrahub/patch/queries/base.py,sha256=wXtv4I-7l_u0kXJFbmFZZJ0_2_5yvuAJwmwiLqRq7AY,338
|
|
551
|
+
infrahub/patch/runner.py,sha256=ZB4aOqlG77hJNtDyQtIXmi-2WgM07WSEFtWV2NItIqk,12594
|
|
552
|
+
infrahub/patch/vertex_adder.py,sha256=lhWELYWlHwkopGOECSHRfj1mb0-COheibsu95r2Hwzs,2796
|
|
553
|
+
infrahub/patch/vertex_deleter.py,sha256=czdb8T30k_-WSbcZUVS2-DvaN3Dp4j9ss2lAz8KN0mo,1302
|
|
554
|
+
infrahub/patch/vertex_updater.py,sha256=FxQJEnwXdvj2WtwLorRbRAyocWUG9z_RDowflVKqPoU,1136
|
|
540
555
|
infrahub/permissions/__init__.py,sha256=WAtFhyaQj8dFkZJGnIbBaVbSMttGZGgK18V-QbMNVNU,538
|
|
541
556
|
infrahub/permissions/backend.py,sha256=azvyFOTne0Zy1yrc4t9u3GCkHI_x_OPSDV65yxmVPDQ,529
|
|
542
557
|
infrahub/permissions/constants.py,sha256=2sGj9caif_aH2XtD3s35BU4HRONOjRHCyCJ3gbT5kZs,1221
|
|
@@ -641,9 +656,8 @@ infrahub_sdk/analyzer.py,sha256=UDJN372vdAiuAv2TEyPUlsSVoUfZN6obWkIokNNaHbA,4148
|
|
|
641
656
|
infrahub_sdk/async_typer.py,sha256=Gj7E8EGdjA-XF404vr9cBt20mmbroQh7N68HXhWYx00,892
|
|
642
657
|
infrahub_sdk/batch.py,sha256=LRZ_04ic56ll9FBjgXCYrJRDJcwB3wR1yX4grrQutDQ,3795
|
|
643
658
|
infrahub_sdk/branch.py,sha256=hmtoIekQ1uusoJ6yEKlw6vrFMTAHJrXu-YsqqCQC_kc,12716
|
|
644
|
-
infrahub_sdk/checks.py,sha256=
|
|
659
|
+
infrahub_sdk/checks.py,sha256=rFHlEY8XEYcjpLCg6gd9a0R8vPnkxNp0OnXk-odsZKY,5707
|
|
645
660
|
infrahub_sdk/client.py,sha256=j3ZiAB_8UN-kDd7CGMUSbFWFcdPrYGwkZmJBbvi4o1U,100721
|
|
646
|
-
infrahub_sdk/code_generator.py,sha256=UJoqofjO7WSHygORhok0RRUv7HG4aTcl6htczaKNBjc,4411
|
|
647
661
|
infrahub_sdk/config.py,sha256=irv7a1YRBGA8L9eMak6J7GG9dzG3sOQeKsyEOkJHw-s,7302
|
|
648
662
|
infrahub_sdk/constants.py,sha256=Ca66r09eDzpmMhfFAspKFSehSxOmoflVongP-UuBDc4,138
|
|
649
663
|
infrahub_sdk/context.py,sha256=QgXZvtUrKolp6ML8TguVK87Wuu-3KyizZVV_N2F4oCw,400
|
|
@@ -651,35 +665,38 @@ infrahub_sdk/ctl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
|
|
|
651
665
|
infrahub_sdk/ctl/branch.py,sha256=GeGDNGNpew93MZblqhG0r45wqSz_p8CcQ9R8zuj_jmg,4742
|
|
652
666
|
infrahub_sdk/ctl/check.py,sha256=HWsK1rTpGF2VvRBiS5KZrRxXrsAHDXoFS3wJkmq8pik,7895
|
|
653
667
|
infrahub_sdk/ctl/cli.py,sha256=A9jJKYBo5opzIIyWYf6niyAHhy49V59g6biueMDFbpE,328
|
|
654
|
-
infrahub_sdk/ctl/cli_commands.py,sha256=
|
|
668
|
+
infrahub_sdk/ctl/cli_commands.py,sha256=2ucEJjPFWlLTD89d3A-u0yVt0_qEuoVmXLLTE6PnrYw,18397
|
|
655
669
|
infrahub_sdk/ctl/client.py,sha256=6bmXmQta9qQCJ8HybQwt2uSF2X1Em91xNFpwiKFujxs,2083
|
|
656
670
|
infrahub_sdk/ctl/config.py,sha256=y3kTvfxDO2FKzgvaIXKPKOES7BqXT-s9Kuww7ROfs-4,3039
|
|
657
|
-
infrahub_sdk/ctl/constants.py,sha256=owzqZB_xkTzxsYvX3NyuSwATzA0rIABmbKiWzuqz3aw,3229
|
|
658
671
|
infrahub_sdk/ctl/exceptions.py,sha256=RPdBtIj5qVvNqNR9Y-mPNF7kDUxXUUCac5msyitrBXo,272
|
|
659
672
|
infrahub_sdk/ctl/exporter.py,sha256=CmqyKpf7q5Pu5Wfo_2HktiF12iD_3rJ9Ifb48BIoJdU,1876
|
|
660
673
|
infrahub_sdk/ctl/generator.py,sha256=sj_QcuUIy0Sd3jKXAP5Y-DZ6iuwWGwacegjYiCx0CPg,4166
|
|
661
674
|
infrahub_sdk/ctl/importer.py,sha256=0QSKzkynI4eeQHHsTIWlEaj7mPrTdscQeXrrOzqtyig,1908
|
|
662
|
-
infrahub_sdk/ctl/menu.py,sha256=
|
|
663
|
-
infrahub_sdk/ctl/object.py,sha256=
|
|
675
|
+
infrahub_sdk/ctl/menu.py,sha256=A0NHvu48qbo9aWYNc3nGMNMeXr4LnOr_HNKL5arBWNA,2690
|
|
676
|
+
infrahub_sdk/ctl/object.py,sha256=OEbAx0Yb0zbXxS2ZnXedZRZDHITQd3iAk_cWUlTHLvg,2706
|
|
664
677
|
infrahub_sdk/ctl/parameters.py,sha256=aU2H41svfG309m2WdH6R9H5xgQ4gevn3ItOu5ltuVas,413
|
|
665
678
|
infrahub_sdk/ctl/render.py,sha256=zrIz_KXq3QafgNiqqNeYt2JtD2PGOa0D5ujW6NqZdz8,1948
|
|
666
679
|
infrahub_sdk/ctl/repository.py,sha256=JUyrV_oOayP1SHOb7Y35eZI_pwjtH69iH6lh8TsnmRs,4900
|
|
667
680
|
infrahub_sdk/ctl/schema.py,sha256=791JU9ZylqeXQTy7xBMN_4WKnVQgbStvFvEZ8nAkOY8,7056
|
|
668
681
|
infrahub_sdk/ctl/transform.py,sha256=5qRqiKeEefs0rda6RAFAAj1jkCKdbPYE_t8O-n436LQ,414
|
|
669
|
-
infrahub_sdk/ctl/utils.py,sha256=
|
|
682
|
+
infrahub_sdk/ctl/utils.py,sha256=p40VlEcVrMiFLcB9S5tMV8F0vpf1Ay6LkCeOLXhXQ04,7314
|
|
670
683
|
infrahub_sdk/ctl/validate.py,sha256=dknc4kMBIdysZNtEBYyvhlFPyUYyLmc2a4OI4cjGj2c,3910
|
|
671
684
|
infrahub_sdk/data.py,sha256=4d8Fd1s7lTeOu8JWXsK2m2BM8t_5HG0Z73fnCZGc7Pc,841
|
|
672
685
|
infrahub_sdk/diff.py,sha256=Ms-3YyXo-DoF1feV9qP7GKakBYUNFsULZdy-yMEG71w,4258
|
|
673
|
-
infrahub_sdk/exceptions.py,sha256=
|
|
686
|
+
infrahub_sdk/exceptions.py,sha256=gZLfZhyDd0M-w5WMzzfPkFwha-aZirJ739N_OMN7Ujs,5728
|
|
674
687
|
infrahub_sdk/generator.py,sha256=9Je9mCfS6madP2WMD6gp9l8IkWhW_eIl5elnt9h7rvc,5592
|
|
675
688
|
infrahub_sdk/graphql.py,sha256=zrxRveg8-t0FbLtOEMDiiW0vqtBHc2qaFRkiHF9Bp6g,7019
|
|
676
689
|
infrahub_sdk/groups.py,sha256=GL14ByW4GHrkqOLJ-_vGhu6bkYDxljqPtkErcQVehv0,711
|
|
677
690
|
infrahub_sdk/jinja2.py,sha256=lTfV9E_P5gApaX6RW9M8U8oixQi-0H3U8wcs8fdGVaU,1150
|
|
678
|
-
infrahub_sdk/node.py,sha256=
|
|
691
|
+
infrahub_sdk/node.py,sha256=XLkm3Fe39URXc_pigmJcb7JAWTgZoNrKTP7zMuwjfhw,91966
|
|
679
692
|
infrahub_sdk/object_store.py,sha256=d-EDnxPpw_7BsbjbGbH50rjt-1-Ojj2zNrhFansP5hA,4299
|
|
680
693
|
infrahub_sdk/playback.py,sha256=ubkY1LiW_wFwm4auerdQ0zFJcFJZ1SYQT6-d4bxzaLg,1906
|
|
681
694
|
infrahub_sdk/protocols.py,sha256=LyiZcUvcT-ibgWYyYELjAPyAv42kxdhAPyFfac-RIZo,21569
|
|
682
695
|
infrahub_sdk/protocols_base.py,sha256=J7eW8LO0MO19BiMPvYmyhSs6Es14Xk1xUolb0vWaFjo,4889
|
|
696
|
+
infrahub_sdk/protocols_generator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
697
|
+
infrahub_sdk/protocols_generator/constants.py,sha256=wEqe9XGe1mTYBXSmJ8rjQs82dQ4jM50qb8uS2ZGcriI,791
|
|
698
|
+
infrahub_sdk/protocols_generator/generator.py,sha256=hhBxxMw0Pgbih6GiC81xjb9R9TBT8I4y-O2cIdcbChs,5264
|
|
699
|
+
infrahub_sdk/protocols_generator/template.j2,sha256=cm2wsKXHXOiW7N_byxnE2vLnn8gHQ99rs56qVquTTDw,3722
|
|
683
700
|
infrahub_sdk/pytest_plugin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
684
701
|
infrahub_sdk/pytest_plugin/exceptions.py,sha256=ek2WyTBPuZdxhJClOhLo4EcFdvgE4BP0q26OiAr-Sec,2185
|
|
685
702
|
infrahub_sdk/pytest_plugin/items/__init__.py,sha256=Au90dLk6lbSgRAoqrZOdYJ6m0lwFJYHFiAQHrcc6_rI,1026
|
|
@@ -696,12 +713,12 @@ infrahub_sdk/queries.py,sha256=s4gnx67e-MNg-3jP4Vx1jreO9uiW3uYPllFQgaTODdQ,2308
|
|
|
696
713
|
infrahub_sdk/query_groups.py,sha256=vcN67jWvDcVacXbgITOMt-UI_6T5eGrG4WJfb8LqUi4,10069
|
|
697
714
|
infrahub_sdk/recorder.py,sha256=G134AfAwE5efSqArVJneurF2JIEuhvSJWWI3woPczgI,2194
|
|
698
715
|
infrahub_sdk/repository.py,sha256=PbSHHl6ajIeZu1t4pH1j7qzR-DPOkGuzubcNM02NuV0,1011
|
|
699
|
-
infrahub_sdk/schema/__init__.py,sha256=
|
|
700
|
-
infrahub_sdk/schema/main.py,sha256=
|
|
701
|
-
infrahub_sdk/schema/repository.py,sha256=
|
|
716
|
+
infrahub_sdk/schema/__init__.py,sha256=26pGrfI5fiz5nq9uYxNYuTGWw6zYJCGuWaqJhSPsAiQ,28928
|
|
717
|
+
infrahub_sdk/schema/main.py,sha256=KSYYauatsRWI3EbI2lPff51n5dO2uUdcT-BmAo1D24A,12152
|
|
718
|
+
infrahub_sdk/schema/repository.py,sha256=LJYqYRgeow_1oBgPl47yP4nmPzmkJpnr-J0xrh0gFAA,11301
|
|
702
719
|
infrahub_sdk/spec/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
703
|
-
infrahub_sdk/spec/menu.py,sha256=
|
|
704
|
-
infrahub_sdk/spec/object.py,sha256=
|
|
720
|
+
infrahub_sdk/spec/menu.py,sha256=KG8KpDYqlVWsCQXCUlAX7P7Jbw3bB60hlTMRs0cohOk,1078
|
|
721
|
+
infrahub_sdk/spec/object.py,sha256=mip9OUezkA6YHxSFolsZt9eN_CjIxZE9-PGY2H7mKNM,24589
|
|
705
722
|
infrahub_sdk/store.py,sha256=7AV5_ckBdYBQZMe6Cm5nTLRaRkaaF0hivpd3Ed-MKW4,14083
|
|
706
723
|
infrahub_sdk/task/__init__.py,sha256=6MTui97_uymZ9BBQGC9xRrT6qpzHc0YxkkKWIdW0FdM,210
|
|
707
724
|
infrahub_sdk/task/constants.py,sha256=gj0Cx_0RV0G5KAjx9XvUsf4LfEDMjvGqxEg0qL0LknI,126
|
|
@@ -713,10 +730,10 @@ infrahub_sdk/template/exceptions.py,sha256=mpO09MUZpEhb8OcYGb9MstyAQ16v2f5WA8MzH
|
|
|
713
730
|
infrahub_sdk/template/filters.py,sha256=YfNkeJnbBz6Qvi6VmEjctVVifk2cYZPqswrDAEAKhA8,10179
|
|
714
731
|
infrahub_sdk/template/models.py,sha256=azSXHtKB7qL7m9Z1ckjC99ezwdkxOd-HK_9Cid8SBnM,176
|
|
715
732
|
infrahub_sdk/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
716
|
-
infrahub_sdk/testing/docker.py,sha256=
|
|
733
|
+
infrahub_sdk/testing/docker.py,sha256=o9MzPjp0bkS-9sUFX1hFEypnSodxbckqoUgYwYFPjwQ,1808
|
|
717
734
|
infrahub_sdk/testing/repository.py,sha256=9s4MMaMljbJe97Ua4bJgc64giQ2UMC0bD5qIqYd4YNk,3571
|
|
718
735
|
infrahub_sdk/testing/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
719
|
-
infrahub_sdk/testing/schemas/animal.py,sha256=
|
|
736
|
+
infrahub_sdk/testing/schemas/animal.py,sha256=a1vydXPttoPvsGbSHY5H89AEoi7AWE2JiCGRBE9LJS8,7403
|
|
720
737
|
infrahub_sdk/testing/schemas/car_person.py,sha256=1VwgJMJvVggsQyRdSqDjiLrPzysz8cXFSFzSghVSVms,8940
|
|
721
738
|
infrahub_sdk/timestamp.py,sha256=hRJdqH_4jfaTkXdxQqBGXNErHqvXX-SuoeKpguOCFjk,6101
|
|
722
739
|
infrahub_sdk/topological_sort.py,sha256=RqIGYxHlqOUHvMSAxbq6658TYLaEIdrFP4wyK3Hva5w,2456
|
|
@@ -734,7 +751,7 @@ infrahub_sdk/transforms.py,sha256=5fmoBBKWGhFCu0NLKlSF95GAbbCi2k25zWiWjtsd2dA,25
|
|
|
734
751
|
infrahub_sdk/types.py,sha256=UeZ1rDp4eyH12ApTcUD9a1OOtCp3IL1YZUeeZ06qF-I,1726
|
|
735
752
|
infrahub_sdk/utils.py,sha256=xBl-9yIxeil-7fbNgsAUzZSa178UYjsvLbeLNUHzYj0,12638
|
|
736
753
|
infrahub_sdk/uuidt.py,sha256=Tz-4nHkJwbi39UT3gaIe2wJeZNAoBqf6tm3sw7LZbXc,2155
|
|
737
|
-
infrahub_sdk/yaml.py,sha256=
|
|
754
|
+
infrahub_sdk/yaml.py,sha256=512OKgxAYPt4QLBFlucUB4GgwKJ09dzgC86pO57YFFw,5018
|
|
738
755
|
infrahub_testcontainers/__init__.py,sha256=oPpmesGgYBSdKTg1L37FGwYBeao1EHury5SJGul-CT8,216
|
|
739
756
|
infrahub_testcontainers/constants.py,sha256=mZ4hLvcf4rKk9wC7EId4MQxAY0sk4V99deB04N0J2bg,85
|
|
740
757
|
infrahub_testcontainers/container.py,sha256=HMWCwQpXgNnUYhGDNr1yEdfAO-t-TDzG2RgkZ1ye4tc,12257
|
|
@@ -747,8 +764,8 @@ infrahub_testcontainers/models.py,sha256=ASYyvl7d_WQz_i7y8-3iab9hwwmCl3OCJavqVbe
|
|
|
747
764
|
infrahub_testcontainers/performance_test.py,sha256=CZ0YeGqnc9RCEPPk5-jFh0b0zFz-DYweOBF-Lfo0bc8,6037
|
|
748
765
|
infrahub_testcontainers/plugin.py,sha256=g24SMg4EAqVe2N8i9F66EV34cNqIdDU4mRP7OeOJO1w,5381
|
|
749
766
|
infrahub_testcontainers/prometheus.yml,sha256=610xQEyj3xuVJMzPkC4m1fRnCrjGpiRBrXA2ytCLa54,599
|
|
750
|
-
infrahub_server-1.2.
|
|
751
|
-
infrahub_server-1.2.
|
|
752
|
-
infrahub_server-1.2.
|
|
753
|
-
infrahub_server-1.2.
|
|
754
|
-
infrahub_server-1.2.
|
|
767
|
+
infrahub_server-1.2.7.dist-info/LICENSE.txt,sha256=TfPDBt3ar0uv_f9cqCDMZ5rIzW3CY8anRRd4PkL6ejs,34522
|
|
768
|
+
infrahub_server-1.2.7.dist-info/METADATA,sha256=qt7S0mGiT7u4_-i-SSKcTFe2AaZubGIAMsJFCPdF740,8189
|
|
769
|
+
infrahub_server-1.2.7.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
770
|
+
infrahub_server-1.2.7.dist-info/entry_points.txt,sha256=UXIeFWDsrV-4IllNvUEd6KieYGzQfn9paga2YyABOQI,393
|
|
771
|
+
infrahub_server-1.2.7.dist-info/RECORD,,
|
infrahub_sdk/ctl/constants.py
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
PROTOCOLS_TEMPLATE = """#
|
|
2
|
-
# Generated by "infrahubctl protocols"
|
|
3
|
-
#
|
|
4
|
-
|
|
5
|
-
from __future__ import annotations
|
|
6
|
-
|
|
7
|
-
from typing import TYPE_CHECKING, Optional
|
|
8
|
-
|
|
9
|
-
from infrahub_sdk.protocols import CoreNode, {{ base_protocols | join(', ') }}
|
|
10
|
-
|
|
11
|
-
if TYPE_CHECKING:
|
|
12
|
-
{% if sync %}
|
|
13
|
-
from infrahub_sdk.node import RelatedNodeSync, RelationshipManagerSync
|
|
14
|
-
{% else %}
|
|
15
|
-
from infrahub_sdk.node import RelatedNode, RelationshipManager
|
|
16
|
-
{% endif %}
|
|
17
|
-
from infrahub_sdk.protocols_base import (
|
|
18
|
-
AnyAttribute,
|
|
19
|
-
AnyAttributeOptional,
|
|
20
|
-
String,
|
|
21
|
-
StringOptional,
|
|
22
|
-
Integer,
|
|
23
|
-
IntegerOptional,
|
|
24
|
-
Boolean,
|
|
25
|
-
BooleanOptional,
|
|
26
|
-
DateTime,
|
|
27
|
-
DateTimeOptional,
|
|
28
|
-
Dropdown,
|
|
29
|
-
DropdownOptional,
|
|
30
|
-
HashedPassword,
|
|
31
|
-
HashedPasswordOptional,
|
|
32
|
-
MacAddress,
|
|
33
|
-
MacAddressOptional,
|
|
34
|
-
IPHost,
|
|
35
|
-
IPHostOptional,
|
|
36
|
-
IPNetwork,
|
|
37
|
-
IPNetworkOptional,
|
|
38
|
-
JSONAttribute,
|
|
39
|
-
JSONAttributeOptional,
|
|
40
|
-
ListAttribute,
|
|
41
|
-
ListAttributeOptional,
|
|
42
|
-
URL,
|
|
43
|
-
URLOptional,
|
|
44
|
-
)
|
|
45
|
-
{% for generic in generics %}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
class {{ generic.namespace + generic.name }}(CoreNode):
|
|
49
|
-
{% if not generic.attributes|default([]) and not generic.relationships|default([]) %}
|
|
50
|
-
pass
|
|
51
|
-
{% endif %}
|
|
52
|
-
{% for attribute in generic.attributes|default([]) %}
|
|
53
|
-
{{ attribute | render_attribute }}
|
|
54
|
-
{% endfor %}
|
|
55
|
-
{% for relationship in generic.relationships|default([]) %}
|
|
56
|
-
{{ relationship | render_relationship(sync) }}
|
|
57
|
-
{% endfor %}
|
|
58
|
-
{% if generic.hierarchical | default(false) %}
|
|
59
|
-
{% if sync %}
|
|
60
|
-
parent: RelatedNodeSync
|
|
61
|
-
children: RelationshipManagerSync
|
|
62
|
-
{% else %}
|
|
63
|
-
parent: RelatedNode
|
|
64
|
-
children: RelationshipManager
|
|
65
|
-
{% endif %}
|
|
66
|
-
{% endif %}
|
|
67
|
-
{% endfor %}
|
|
68
|
-
{% for node in nodes %}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
class {{ node.namespace + node.name }}({{ node.inherit_from | join(", ") or "CoreNode" }}):
|
|
72
|
-
{% if not node.attributes|default([]) and not node.relationships|default([]) %}
|
|
73
|
-
pass
|
|
74
|
-
{% endif %}
|
|
75
|
-
{% for attribute in node.attributes|default([]) %}
|
|
76
|
-
{{ attribute | render_attribute }}
|
|
77
|
-
{% endfor %}
|
|
78
|
-
{% for relationship in node.relationships|default([]) %}
|
|
79
|
-
{{ relationship | render_relationship(sync) }}
|
|
80
|
-
{% endfor %}
|
|
81
|
-
{% if node.hierarchical | default(false) %}
|
|
82
|
-
{% if sync %}
|
|
83
|
-
parent: RelatedNodeSync
|
|
84
|
-
children: RelationshipManagerSync
|
|
85
|
-
{% else %}
|
|
86
|
-
parent: RelatedNode
|
|
87
|
-
children: RelationshipManager
|
|
88
|
-
{% endif %}
|
|
89
|
-
{% endif %}
|
|
90
|
-
{% endfor %}
|
|
91
|
-
{% for node in profiles %}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
class {{ node.namespace + node.name }}({{ node.inherit_from | join(", ") or "CoreNode" }}):
|
|
95
|
-
{% if not node.attributes|default([]) and not node.relationships|default([]) %}
|
|
96
|
-
pass
|
|
97
|
-
{% endif %}
|
|
98
|
-
{% for attribute in node.attributes|default([]) %}
|
|
99
|
-
{{ attribute | render_attribute }}
|
|
100
|
-
{% endfor %}
|
|
101
|
-
{% for relationship in node.relationships|default([]) %}
|
|
102
|
-
{{ relationship | render_relationship(sync) }}
|
|
103
|
-
{% endfor %}
|
|
104
|
-
{% if node.hierarchical | default(false) %}
|
|
105
|
-
{% if sync %}
|
|
106
|
-
parent: RelatedNodeSync
|
|
107
|
-
children: RelationshipManagerSync
|
|
108
|
-
{% else %}
|
|
109
|
-
parent: RelatedNode
|
|
110
|
-
children: RelationshipManager
|
|
111
|
-
{% endif %}
|
|
112
|
-
{% endif %}
|
|
113
|
-
{% endfor %}
|
|
114
|
-
|
|
115
|
-
"""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|