infrahub-server 1.5.3__py3-none-any.whl → 1.5.4__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.
@@ -1088,7 +1088,7 @@ class Node(BaseNode, metaclass=BaseNodeMeta):
1088
1088
 
1089
1089
  if key in self._relationships:
1090
1090
  rel: RelationshipManager = getattr(self, key)
1091
- changed |= await rel.update(db=db, data=value)
1091
+ changed |= await rel.update(db=db, data=value, process_delete=process_pools)
1092
1092
 
1093
1093
  return changed
1094
1094
 
@@ -1061,7 +1061,12 @@ class RelationshipManager:
1061
1061
 
1062
1062
  return self._relationships.as_list()
1063
1063
 
1064
- async def update(self, data: list[str | Node] | dict[str, Any] | str | Node | None, db: InfrahubDatabase) -> bool:
1064
+ async def update(
1065
+ self,
1066
+ data: list[str | Node] | dict[str, Any] | str | Node | None,
1067
+ db: InfrahubDatabase,
1068
+ process_delete: bool = True,
1069
+ ) -> bool:
1065
1070
  """Replace and Update the list of relationships with this one."""
1066
1071
  if not isinstance(data, list):
1067
1072
  list_data: Sequence[str | Node | dict[str, Any] | None] = [data]
@@ -1087,8 +1092,9 @@ class RelationshipManager:
1087
1092
 
1088
1093
  if item is None:
1089
1094
  if previous_relationships:
1090
- for rel in previous_relationships.values():
1091
- await rel.delete(db=db)
1095
+ if process_delete:
1096
+ for rel in previous_relationships.values():
1097
+ await rel.delete(db=db)
1092
1098
  changed = True
1093
1099
  continue
1094
1100
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: infrahub-server
3
- Version: 1.5.3
3
+ Version: 1.5.4
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
@@ -233,7 +233,7 @@ infrahub/core/migrations/schema/placeholder_dummy.py,sha256=YBGFUVPi57ARbWgAmbtK
233
233
  infrahub/core/migrations/schema/tasks.py,sha256=2J8gHGSP-WhxSi4GYhOc9xAJOg_S1ONm3YE4_ukLKxw,4164
234
234
  infrahub/core/migrations/shared.py,sha256=sQMdbx1gnht2G_-nb1MDbStwUso5YJkyyumjlKAJq3g,9592
235
235
  infrahub/core/models.py,sha256=xoodMSKLaHD5nOtBT35soRQnyHO_OrDlVRNdXuL51Ho,26679
236
- infrahub/core/node/__init__.py,sha256=yr6WFmh7pvL6XeFx6Hou0UoSc0DniZy09YPn84NGipg,50084
236
+ infrahub/core/node/__init__.py,sha256=OihBPaPhEbgvSLKPdBOBBuh0EFWf2wt897LZ_jdWb_g,50114
237
237
  infrahub/core/node/base.py,sha256=BAowVRCK_WC50yXym1kCyUppJDJnrODGU5uoj1s0Yd4,2564
238
238
  infrahub/core/node/constraints/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
239
239
  infrahub/core/node/constraints/attribute_uniqueness.py,sha256=lcHBk4d3bc12sywxRTnQs18VEm_S6pDcUhNnsXnb-uI,2162
@@ -278,7 +278,7 @@ infrahub/core/relationship/constraints/peer_kind.py,sha256=Bropiav4y6r0iU2KfWJ_k
278
278
  infrahub/core/relationship/constraints/peer_parent.py,sha256=z7elpC8xS_ovAF28Haq-RNpFtTEiUehzowiDgYGT68U,2343
279
279
  infrahub/core/relationship/constraints/peer_relatives.py,sha256=Ye79l7njaWxZkU2chTOaptIjvKBIawsNCl0IQxCTDtM,2737
280
280
  infrahub/core/relationship/constraints/profiles_kind.py,sha256=nEZPGtGcmelZ1Nb8EPcQ-7_zCLCNIYwwWbU6C9fLj5E,2464
281
- infrahub/core/relationship/model.py,sha256=ZaR6Rrp1CiS8vjbAcMTILpeI755ORj2_aj-3MYD-Q1E,48978
281
+ infrahub/core/relationship/model.py,sha256=ocow8RLJWaR-DNHh7JqYhA0g0fe_elwNeOmuG9ywzII,49093
282
282
  infrahub/core/root.py,sha256=8ZLSOtnmjQcrjqX2vxNO-AGopEUArmBPo_X5NeZBdP0,416
283
283
  infrahub/core/schema/__init__.py,sha256=U1DWsadfu7Y3FUc51h9DNwXEq4Qa_yZ5w5Bip8pVpmw,6674
284
284
  infrahub/core/schema/attribute_parameters.py,sha256=ABL1GEsOl4_CcDvK9_NucGMaF6LUeOjAxbDQVm_G7eg,6516
@@ -889,8 +889,8 @@ infrahub_testcontainers/models.py,sha256=hT7WEX2o7gxTFPE9uhtP5yigKgP5YSsy2c3tFB-
889
889
  infrahub_testcontainers/performance_test.py,sha256=_nf7Uk15mHwqpN4y7XUfI4JI54-UaXW-Yu4uwMIx21w,6185
890
890
  infrahub_testcontainers/plugin.py,sha256=I3RuZQ0dARyKHuqCf0y1Yj731P2Mwf3BJUehRJKeWrs,5645
891
891
  infrahub_testcontainers/prometheus.yml,sha256=610xQEyj3xuVJMzPkC4m1fRnCrjGpiRBrXA2ytCLa54,599
892
- infrahub_server-1.5.3.dist-info/LICENSE.txt,sha256=7GQO7kxVoQYnZtFrjZBKLRXbrGwwwimHPPOJtqXsozQ,11340
893
- infrahub_server-1.5.3.dist-info/METADATA,sha256=N3mS99_tNsR4YvAunEMv0DeUknxjZJr6yDc_gfZMpQ4,6127
894
- infrahub_server-1.5.3.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
895
- infrahub_server-1.5.3.dist-info/entry_points.txt,sha256=UXIeFWDsrV-4IllNvUEd6KieYGzQfn9paga2YyABOQI,393
896
- infrahub_server-1.5.3.dist-info/RECORD,,
892
+ infrahub_server-1.5.4.dist-info/LICENSE.txt,sha256=7GQO7kxVoQYnZtFrjZBKLRXbrGwwwimHPPOJtqXsozQ,11340
893
+ infrahub_server-1.5.4.dist-info/METADATA,sha256=nX55O3QHheHyTq0Ntl453Hw2Bizx-R_r657PW5T2O8k,6127
894
+ infrahub_server-1.5.4.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
895
+ infrahub_server-1.5.4.dist-info/entry_points.txt,sha256=UXIeFWDsrV-4IllNvUEd6KieYGzQfn9paga2YyABOQI,393
896
+ infrahub_server-1.5.4.dist-info/RECORD,,