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": []}, # 副本集的亲和性要求至少跨两个机房