Skip to content

Commit

Permalink
feat(mongodb): 部署时flow写集群元数据增加disaster_tolerance_level字段 TencentBlueK…
Browse files Browse the repository at this point in the history
  • Loading branch information
yyhenryyy committed Sep 6, 2024
1 parent 12523ef commit 36f7a4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions dbm-ui/backend/flow/utils/mongodb/calculate_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ def calculate_cluster(payload: dict) -> dict:
payload_clusters["cluster_type"] = payload["cluster_type"]
payload_clusters["city"] = payload["city_code"]
payload_clusters["app"] = payload["bk_app_abbr"]
payload_clusters["disaster_tolerance_level"] = payload["disaster_tolerance_level"]
app = payload["bk_app_abbr"]
payload_clusters["db_version"] = payload["db_version"]
cluster_type = payload["cluster_type"]
Expand Down
1 change: 1 addition & 0 deletions dbm-ui/backend/flow/utils/mongodb/mongodb_dataclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ def get_add_relationship_to_meta_kwargs(self, replicaset_info: dict) -> dict:
"creator": self.payload["created_by"],
"region": self.payload["city"],
"db_module_id": 0,
"disaster_tolerance_level": self.payload["disaster_tolerance_level"],
}

if self.payload["cluster_type"] == ClusterType.MongoReplicaSet.value:
Expand Down

0 comments on commit 36f7a4d

Please sign in to comment.