From 770899e3707ca7977488236eb42a430809e4ff78 Mon Sep 17 00:00:00 2001 From: iSecloud <869820505@qq.com> Date: Mon, 2 Dec 2024 16:31:49 +0800 Subject: [PATCH] =?UTF-8?q?fix(backend):=20=E5=A2=9E=E5=8A=A0=E8=81=9A?= =?UTF-8?q?=E5=90=88=E5=90=AF=E7=94=A8=E8=A7=84=E6=A0=BC=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E5=8F=82=E6=95=B0=20#8348?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-ui/backend/db_services/dbresource/serializers.py | 1 + dbm-ui/backend/ticket/builders/mongodb/mongo_replicaset_apply.py | 1 + 2 files changed, 2 insertions(+) diff --git a/dbm-ui/backend/db_services/dbresource/serializers.py b/dbm-ui/backend/db_services/dbresource/serializers.py index b37bd30464..c391fc9219 100644 --- a/dbm-ui/backend/db_services/dbresource/serializers.py +++ b/dbm-ui/backend/db_services/dbresource/serializers.py @@ -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) diff --git a/dbm-ui/backend/ticket/builders/mongodb/mongo_replicaset_apply.py b/dbm-ui/backend/ticket/builders/mongodb/mongo_replicaset_apply.py index be2a658296..8be1cfb979 100644 --- a/dbm-ui/backend/ticket/builders/mongodb/mongo_replicaset_apply.py +++ b/dbm-ui/backend/ticket/builders/mongodb/mongo_replicaset_apply.py @@ -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": []}, # 副本集的亲和性要求至少跨两个机房