infrahub-server 1.4.8__py3-none-any.whl → 1.4.10__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/core/diff/query/artifact.py +11 -8
- infrahub/core/node/__init__.py +3 -1
- infrahub/core/node/create.py +12 -3
- infrahub/graphql/mutations/ipam.py +5 -0
- infrahub/proposed_change/tasks.py +0 -3
- {infrahub_server-1.4.8.dist-info → infrahub_server-1.4.10.dist-info}/METADATA +15 -16
- {infrahub_server-1.4.8.dist-info → infrahub_server-1.4.10.dist-info}/RECORD +10 -10
- {infrahub_server-1.4.8.dist-info → infrahub_server-1.4.10.dist-info}/LICENSE.txt +0 -0
- {infrahub_server-1.4.8.dist-info → infrahub_server-1.4.10.dist-info}/WHEEL +0 -0
- {infrahub_server-1.4.8.dist-info → infrahub_server-1.4.10.dist-info}/entry_points.txt +0 -0
|
@@ -44,7 +44,7 @@ CALL (source_artifact) {
|
|
|
44
44
|
MATCH (source_artifact)-[r:IS_PART_OF]->(:Root)
|
|
45
45
|
WHERE %(source_branch_filter)s
|
|
46
46
|
RETURN r AS root_rel
|
|
47
|
-
ORDER BY r.branch_level DESC, r.from DESC
|
|
47
|
+
ORDER BY r.branch_level DESC, r.from DESC, r.status ASC
|
|
48
48
|
LIMIT 1
|
|
49
49
|
}
|
|
50
50
|
WITH source_artifact, root_rel
|
|
@@ -61,7 +61,7 @@ CALL (source_artifact) {
|
|
|
61
61
|
target_node,
|
|
62
62
|
(rrel1.status = "active" AND rrel2.status = "active") AS target_is_active,
|
|
63
63
|
$source_branch_name IN [rrel1.branch, rrel2.branch] AS target_on_source_branch
|
|
64
|
-
ORDER BY rrel1.branch_level DESC,
|
|
64
|
+
ORDER BY rrel1.branch_level DESC, rrel2.branch_level DESC, rrel1.from DESC, rrel2.from DESC, rrel1.status ASC, rrel2.status ASC
|
|
65
65
|
LIMIT 1
|
|
66
66
|
}
|
|
67
67
|
// -----------------------
|
|
@@ -75,7 +75,7 @@ CALL (source_artifact) {
|
|
|
75
75
|
definition_node,
|
|
76
76
|
(rrel1.status = "active" AND rrel2.status = "active") AS definition_is_active,
|
|
77
77
|
$source_branch_name IN [rrel1.branch, rrel2.branch] AS definition_on_source_branch
|
|
78
|
-
ORDER BY rrel1.branch_level DESC,
|
|
78
|
+
ORDER BY rrel1.branch_level DESC, rrel2.branch_level DESC, rrel1.from DESC, rrel2.from DESC, rrel1.status ASC, rrel2.status ASC
|
|
79
79
|
LIMIT 1
|
|
80
80
|
}
|
|
81
81
|
// -----------------------
|
|
@@ -89,7 +89,8 @@ CALL (source_artifact) {
|
|
|
89
89
|
attr_val.value AS checksum,
|
|
90
90
|
(attr_rel.status = "active" AND value_rel.status = "active") AS checksum_is_active,
|
|
91
91
|
$source_branch_name IN [attr_rel.branch, value_rel.branch] AS checksum_on_source_branch
|
|
92
|
-
ORDER BY value_rel.branch_level DESC, attr_rel.branch_level DESC, value_rel.from DESC, attr_rel.from DESC
|
|
92
|
+
ORDER BY value_rel.branch_level DESC, attr_rel.branch_level DESC, value_rel.from DESC, attr_rel.from DESC,
|
|
93
|
+
value_rel.status ASC, attr_rel.status ASC
|
|
93
94
|
LIMIT 1
|
|
94
95
|
}
|
|
95
96
|
// -----------------------
|
|
@@ -103,7 +104,8 @@ CALL (source_artifact) {
|
|
|
103
104
|
attr_val.value AS storage_id,
|
|
104
105
|
(attr_rel.status = "active" AND value_rel.status = "active") AS storage_id_is_active,
|
|
105
106
|
$source_branch_name IN [attr_rel.branch, value_rel.branch] AS storage_id_on_source_branch
|
|
106
|
-
ORDER BY value_rel.branch_level DESC, attr_rel.branch_level DESC, value_rel.from DESC, attr_rel.from DESC
|
|
107
|
+
ORDER BY value_rel.branch_level DESC, attr_rel.branch_level DESC, value_rel.from DESC, attr_rel.from DESC,
|
|
108
|
+
value_rel.status ASC, attr_rel.status ASC
|
|
107
109
|
LIMIT 1
|
|
108
110
|
}
|
|
109
111
|
WITH target_node, target_is_active, target_on_source_branch,
|
|
@@ -147,7 +149,8 @@ CALL (target_node, definition_node){
|
|
|
147
149
|
RETURN
|
|
148
150
|
target_artifact,
|
|
149
151
|
(trel1.status = "active" AND trel2.status = "active" AND drel1.status = "active" AND drel1.status = "active") AS artifact_is_active
|
|
150
|
-
ORDER BY trel1.from DESC, trel2.from DESC, drel1.from DESC, drel2.from DESC
|
|
152
|
+
ORDER BY trel1.from DESC, trel2.from DESC, drel1.from DESC, drel2.from DESC,
|
|
153
|
+
trel1.status ASC, trel2.status ASC, drel1.status ASC, drel2.status ASC
|
|
151
154
|
LIMIT 1
|
|
152
155
|
}
|
|
153
156
|
WITH CASE
|
|
@@ -163,7 +166,7 @@ CALL (target_node, definition_node){
|
|
|
163
166
|
AND attr_rel.branch = $target_branch_name
|
|
164
167
|
AND value_rel.branch = $target_branch_name
|
|
165
168
|
RETURN attr_val.value AS checksum, (attr_rel.status = "active" AND value_rel.status = "active") AS checksum_is_active
|
|
166
|
-
ORDER BY value_rel.from DESC, attr_rel.from DESC
|
|
169
|
+
ORDER BY value_rel.from DESC, attr_rel.from DESC, value_rel.status ASC, attr_rel.status ASC
|
|
167
170
|
LIMIT 1
|
|
168
171
|
}
|
|
169
172
|
// -----------------------
|
|
@@ -175,7 +178,7 @@ CALL (target_node, definition_node){
|
|
|
175
178
|
AND attr_rel.branch = $target_branch_name
|
|
176
179
|
AND value_rel.branch = $target_branch_name
|
|
177
180
|
RETURN attr_val.value AS storage_id, (attr_rel.status = "active" AND value_rel.status = "active") AS storage_id_is_active
|
|
178
|
-
ORDER BY value_rel.from DESC, attr_rel.from DESC
|
|
181
|
+
ORDER BY value_rel.from DESC, attr_rel.from DESC, value_rel.status ASC, attr_rel.status ASC
|
|
179
182
|
LIMIT 1
|
|
180
183
|
}
|
|
181
184
|
RETURN target_artifact,
|
infrahub/core/node/__init__.py
CHANGED
|
@@ -408,7 +408,9 @@ class Node(BaseNode, metaclass=BaseNodeMeta):
|
|
|
408
408
|
for attribute_name in template._attributes:
|
|
409
409
|
if attribute_name in list(fields) + [OBJECT_TEMPLATE_NAME_ATTR]:
|
|
410
410
|
continue
|
|
411
|
-
|
|
411
|
+
attr_value = getattr(template, attribute_name).value
|
|
412
|
+
if attr_value is not None:
|
|
413
|
+
fields[attribute_name] = {"value": attr_value, "source": template.id}
|
|
412
414
|
|
|
413
415
|
for relationship_name in template._relationships:
|
|
414
416
|
relationship_schema = template._schema.get_relationship(name=relationship_name)
|
infrahub/core/node/create.py
CHANGED
|
@@ -41,10 +41,19 @@ async def extract_peer_data(
|
|
|
41
41
|
) -> Mapping[str, Any]:
|
|
42
42
|
obj_peer_data: dict[str, Any] = {}
|
|
43
43
|
|
|
44
|
-
for
|
|
45
|
-
|
|
44
|
+
for attr_name in template_peer.get_schema().attribute_names:
|
|
45
|
+
template_attr = getattr(template_peer, attr_name)
|
|
46
|
+
if template_attr.value is None:
|
|
46
47
|
continue
|
|
47
|
-
|
|
48
|
+
if template_attr.is_default:
|
|
49
|
+
# if template attr is_default and the value matches the object schema, then do not set the source
|
|
50
|
+
try:
|
|
51
|
+
if obj_peer_schema.get_attribute(name=attr_name).default_value == template_attr.value:
|
|
52
|
+
continue
|
|
53
|
+
except ValueError:
|
|
54
|
+
pass
|
|
55
|
+
|
|
56
|
+
obj_peer_data[attr_name] = {"value": template_attr.value, "source": template_peer.id}
|
|
48
57
|
|
|
49
58
|
for rel in template_peer.get_schema().relationship_names:
|
|
50
59
|
rel_manager: RelationshipManager = getattr(template_peer, rel)
|
|
@@ -44,6 +44,11 @@ async def validate_namespace(
|
|
|
44
44
|
db=db, branch=branch, kind=InfrahubKind.IPNAMESPACE, id=data["ip_namespace"]["id"]
|
|
45
45
|
)
|
|
46
46
|
namespace_id = namespace.id
|
|
47
|
+
elif "hfid" in data["ip_namespace"]:
|
|
48
|
+
namespace = await registry.manager.get_one_by_hfid(
|
|
49
|
+
db=db, branch=branch, kind=InfrahubKind.IPNAMESPACE, hfid=data["ip_namespace"]["hfid"]
|
|
50
|
+
)
|
|
51
|
+
namespace_id = namespace.id
|
|
47
52
|
else:
|
|
48
53
|
raise ValidationError(
|
|
49
54
|
"A valid ip_namespace must be provided or ip_namespace should be left empty in order to use the default value."
|
|
@@ -441,9 +441,6 @@ async def run_proposed_change_schema_integrity_check(model: RequestProposedChang
|
|
|
441
441
|
)
|
|
442
442
|
)
|
|
443
443
|
|
|
444
|
-
if not conflicts:
|
|
445
|
-
return
|
|
446
|
-
|
|
447
444
|
database = await get_database()
|
|
448
445
|
async with database.start_transaction() as db:
|
|
449
446
|
object_conflict_validator_recorder = ObjectConflictValidatorRecorder(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: infrahub-server
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.10
|
|
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
|
License: Apache-2.0
|
|
6
6
|
Author: OpsMill
|
|
@@ -66,42 +66,41 @@ Description-Content-Type: text/markdown
|
|
|
66
66
|
<h1 align="center">
|
|
67
67
|
<a href=""><img src="docs/static/img/infrahub-hori.svg" alt="Infrahub" width="350"></a>
|
|
68
68
|
</h1>
|
|
69
|
-
<h3 align="center">Simplify Infrastructure Automation</h2>
|
|
70
69
|
|
|
71
70
|
<p align="center">
|
|
72
71
|
<a href="https://www.linkedin.com/company/opsmill">
|
|
73
|
-
<img src="https://img.shields.io/badge/linkedin-blue?logo=
|
|
72
|
+
<img src="https://img.shields.io/badge/linkedin-blue?logo=LinkedIn"/>
|
|
74
73
|
</a>
|
|
75
74
|
<a href="https://discord.gg/opsmill">
|
|
76
75
|
<img src="https://img.shields.io/badge/Discord-7289DA?&logo=discord&logoColor=white"/>
|
|
77
76
|
</a>
|
|
78
77
|
</p>
|
|
79
78
|
|
|
80
|
-
Infrahub
|
|
79
|
+
Infrahub is a graph-based data management platform with built-in version control, CI workflows, peer review, and API access. It's purpose-built to power network, data center, and cloud automation.
|
|
81
80
|
|
|
82
|
-
|
|
81
|
+
## The data foundation for modern automation
|
|
83
82
|
|
|
84
|
-
|
|
83
|
+
Infrahub provides a single platform that unifies infrastructure data with business logic, enforces consistency, and integrates with automation tools and AI workflows.
|
|
85
84
|
|
|
86
|
-
|
|
85
|
+
With Infrahub as the data foundation in your automation stack, you can move faster, reduce risk, and deliver infrastructure as a reliable service.
|
|
87
86
|
|
|
88
|
-
|
|
87
|
+
## Top ways to use Infrahub
|
|
89
88
|
|
|
90
|
-
|
|
89
|
+
### Unify infrastructure data
|
|
91
90
|
|
|
92
|
-
|
|
91
|
+
Sync network and infrastructure device, service, and policy data into a unified source of truth, with rich metadata and robust UI and API access.
|
|
93
92
|
|
|
94
|
-
|
|
93
|
+
### Automate at scale
|
|
95
94
|
|
|
96
|
-
|
|
95
|
+
Generate, validate, and deploy configurations with unified data. Support full lifecycle management—provisioning, upgrades, decommissioning—across vendors and sites.
|
|
97
96
|
|
|
98
|
-
|
|
97
|
+
### Enable self-service
|
|
99
98
|
|
|
100
|
-
|
|
99
|
+
Expose automation through catalogs and APIs so application, platform, and ops teams can request infrastructure directly. Speed time to delivery, reduce errors, and make infrastructure more responsive to the business.
|
|
101
100
|
|
|
102
|
-
|
|
101
|
+
### Build an AIOps knowledge graph
|
|
103
102
|
|
|
104
|
-
|
|
103
|
+
Model dependencies and relationships across infrastructure. Provide the data foundation for AI-driven reasoning, troubleshooting, and predictive operations.
|
|
105
104
|
|
|
106
105
|
## Quick Start
|
|
107
106
|
|
|
@@ -116,7 +116,7 @@ infrahub/core/diff/parent_node_adder.py,sha256=AFq2KJHGgUVem4WCg-9Qi9h6TTwt-JID1
|
|
|
116
116
|
infrahub/core/diff/payload_builder.py,sha256=5R_QuPM5P_uQONmTDbtpIjhshs_OJCcXLnVYjWw-78Q,2094
|
|
117
117
|
infrahub/core/diff/query/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
118
118
|
infrahub/core/diff/query/all_conflicts.py,sha256=gWLwkCR2AK0IJccnhcE8vkSHu5ugZfKTDhCoFi4yAJo,3058
|
|
119
|
-
infrahub/core/diff/query/artifact.py,sha256=
|
|
119
|
+
infrahub/core/diff/query/artifact.py,sha256=aYoLeFjFsSYkmHBhIlHMBnil2DkHawpxZ2aHokwn6eQ,9098
|
|
120
120
|
infrahub/core/diff/query/delete_query.py,sha256=KMZ-HbSz2RKYqqMZ1Lj0mZBlWvkBYOyOvab2UCki1eo,1021
|
|
121
121
|
infrahub/core/diff/query/diff_get.py,sha256=SzlJAF5DNKcbavgVOxLKJ-o8EsuImTGE2uNPg9hcMq0,7438
|
|
122
122
|
infrahub/core/diff/query/diff_summary.py,sha256=sypXfK4EO_BZBuohlv419AjgL5ZeRwMiwnI7IIlh0KE,3841
|
|
@@ -217,13 +217,13 @@ infrahub/core/migrations/schema/placeholder_dummy.py,sha256=3T3dBwC_ZyehOJr2KRKF
|
|
|
217
217
|
infrahub/core/migrations/schema/tasks.py,sha256=2J8gHGSP-WhxSi4GYhOc9xAJOg_S1ONm3YE4_ukLKxw,4164
|
|
218
218
|
infrahub/core/migrations/shared.py,sha256=G72VIHtH4DOM09UOXZE2zfILGDej7nPKdvdfrPRMp7M,7921
|
|
219
219
|
infrahub/core/models.py,sha256=xwEeXSTD4j13hbyZAjZAlrhXk1hHvWl9I7ve7uUbR7U,26649
|
|
220
|
-
infrahub/core/node/__init__.py,sha256=
|
|
220
|
+
infrahub/core/node/__init__.py,sha256=mFoAxo1SYHmQ3Vp5KaHdsF584mnz75aCJfxzOEGNkn0,42514
|
|
221
221
|
infrahub/core/node/base.py,sha256=BAowVRCK_WC50yXym1kCyUppJDJnrODGU5uoj1s0Yd4,2564
|
|
222
222
|
infrahub/core/node/constraints/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
223
223
|
infrahub/core/node/constraints/attribute_uniqueness.py,sha256=9MThTmuqZ7RgK71ZZARlw1k1x3ARn1U67g2_Gatd6rE,2099
|
|
224
224
|
infrahub/core/node/constraints/grouped_uniqueness.py,sha256=F5pmnXVuQNlVmdZY5FRxSGK4gGi1BK1IRgw4emCTlLw,9506
|
|
225
225
|
infrahub/core/node/constraints/interface.py,sha256=fwB32pRLxteQyKRArqekQ0RXlrDkyzp7Vmq03vSpUEo,291
|
|
226
|
-
infrahub/core/node/create.py,sha256
|
|
226
|
+
infrahub/core/node/create.py,sha256=-Yy81om_gARdeCs1mNNag-WMijVX8S27uBIN08BdEqQ,8138
|
|
227
227
|
infrahub/core/node/delete_validator.py,sha256=mj_HQXkTeP_A3po65-R5bCJnDM9CmFFmcUQIxwPlofc,10559
|
|
228
228
|
infrahub/core/node/ipam.py,sha256=NWb3TUlVQOGAzq1VvDwISLh61HML0jnalsJ7QojqGwQ,2669
|
|
229
229
|
infrahub/core/node/permissions.py,sha256=uQzQ62IHcSly6fzPre0nQzlrkCIKzH4HyQkODKB3ZWM,2207
|
|
@@ -489,7 +489,7 @@ infrahub/graphql/mutations/diff.py,sha256=UfEkgIeKsxr79U0_ih7mhl0986rFITM_GDXevs
|
|
|
489
489
|
infrahub/graphql/mutations/diff_conflict.py,sha256=JngQfyKXCVlmtlqQ_VyabmrOEDOEKYsoWbyYSc9TT5c,3147
|
|
490
490
|
infrahub/graphql/mutations/generator.py,sha256=Ulw4whZm8Gc8lJjwfUFoFSsR0cOUliFKl87Oca4B9O0,3579
|
|
491
491
|
infrahub/graphql/mutations/graphql_query.py,sha256=a8tCTrjJipwIghmxlcUkH1Hx_7tem5QhzrTczcwpuZM,3644
|
|
492
|
-
infrahub/graphql/mutations/ipam.py,sha256=
|
|
492
|
+
infrahub/graphql/mutations/ipam.py,sha256=KnfIq6TD9Q649T8BI-pvUmtH5P7GX4UEsz0P22et0MI,16207
|
|
493
493
|
infrahub/graphql/mutations/main.py,sha256=Zqq2zi24ZR8S8ikZ21F2_3kIqYc8tXtvDyit1Xz27vw,21938
|
|
494
494
|
infrahub/graphql/mutations/menu.py,sha256=NSdtUobZ-5dsQdBFfD1xyoE9dKw9FS62T_6UQM0cEUY,3790
|
|
495
495
|
infrahub/graphql/mutations/models.py,sha256=ilkSLr8OxVO9v3Ra_uDyUTJT9qPOmdPMqQbuWIydJMo,264
|
|
@@ -623,7 +623,7 @@ infrahub/proposed_change/branch_diff.py,sha256=IdMxf5zPmhybQKPPz7AlruNmLCKf5VISP
|
|
|
623
623
|
infrahub/proposed_change/checker.py,sha256=ZhNEVJKsQbHH2UE1O35MfOVa8cK1QGEqGyn6MsOuqSQ,1558
|
|
624
624
|
infrahub/proposed_change/constants.py,sha256=auifG94Oo2cJ4RwZx4P-XDPDpKYPtEVxh013KPfiEdU,2080
|
|
625
625
|
infrahub/proposed_change/models.py,sha256=ivWJmEAihprKmwgaBGDJ4Koq4ETciE5GfDp86KHDnns,5892
|
|
626
|
-
infrahub/proposed_change/tasks.py,sha256
|
|
626
|
+
infrahub/proposed_change/tasks.py,sha256=-jAIhul4RCqx5MRWM1ITHoa1S7CEmQC06vsBKXfvTLk,64037
|
|
627
627
|
infrahub/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
628
628
|
infrahub/pytest_plugin.py,sha256=u3t0WgLMo9XmuQYeb28mccQ3xbnyv2Fv173YWl1zBiM,6678
|
|
629
629
|
infrahub/schema/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -828,8 +828,8 @@ infrahub_testcontainers/models.py,sha256=ASYyvl7d_WQz_i7y8-3iab9hwwmCl3OCJavqVbe
|
|
|
828
828
|
infrahub_testcontainers/performance_test.py,sha256=hvwiy6tc_lWniYqGkqfOXVGAmA_IV15VOZqbiD9ezno,6149
|
|
829
829
|
infrahub_testcontainers/plugin.py,sha256=I3RuZQ0dARyKHuqCf0y1Yj731P2Mwf3BJUehRJKeWrs,5645
|
|
830
830
|
infrahub_testcontainers/prometheus.yml,sha256=610xQEyj3xuVJMzPkC4m1fRnCrjGpiRBrXA2ytCLa54,599
|
|
831
|
-
infrahub_server-1.4.
|
|
832
|
-
infrahub_server-1.4.
|
|
833
|
-
infrahub_server-1.4.
|
|
834
|
-
infrahub_server-1.4.
|
|
835
|
-
infrahub_server-1.4.
|
|
831
|
+
infrahub_server-1.4.10.dist-info/LICENSE.txt,sha256=7GQO7kxVoQYnZtFrjZBKLRXbrGwwwimHPPOJtqXsozQ,11340
|
|
832
|
+
infrahub_server-1.4.10.dist-info/METADATA,sha256=0kkkcbzuPM3vb9EnfBvIQGjm_t9Ow2qHs3pf0O_pCHk,6210
|
|
833
|
+
infrahub_server-1.4.10.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
834
|
+
infrahub_server-1.4.10.dist-info/entry_points.txt,sha256=UXIeFWDsrV-4IllNvUEd6KieYGzQfn9paga2YyABOQI,393
|
|
835
|
+
infrahub_server-1.4.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|