Skip to content

Commit

Permalink
fix(backend): 增加聚合启用规格过滤参数 #8348
Browse files Browse the repository at this point in the history
  • Loading branch information
iSecloud committed Dec 2, 2024
1 parent 5616b20 commit 770899e
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/db_services/dbresource/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ class ResourceSummarySerializer(serializers.Serializer):
help_text=_("集群类型"), choices=SpecClusterType.get_choices(), required=False, default=""
)
spec_id_list = serializers.CharField(help_text=_("规格ID"), required=False, default="")
enable_spec = serializers.BooleanField(help_text=_("仅聚合启用规格"), required=False, default=False)

for_biz = serializers.IntegerField(help_text=_("专用业务ID"), required=False, default=0)
city = serializers.CharField(help_text=_("城市名"), required=False, allow_blank=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def get_replicaset_resource_spec(cls, ticket_data):
"resource_spec": {
"mongo_machine_set": {
**spec.get_spec_info(),
"spec_name": spec.spec_name,
"affinity": ticket_data["disaster_tolerance_level"],
"location_spec": {"city": ticket_data["city_code"], "sub_zone_ids": []},
# 副本集的亲和性要求至少跨两个机房
Expand Down

0 comments on commit 770899e

Please sign in to comment.