Skip to content

Commit

Permalink
fix(backend): mongodb 集群启停联调 #4063
Browse files Browse the repository at this point in the history
  • Loading branch information
ygcyao authored and iSecloud committed Apr 19, 2024
1 parent ad56eda commit e6f9302
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions dbm-ui/backend/ticket/builders/mongodb/mongo_disable.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from rest_framework import serializers

from backend.db_meta.enums import ClusterPhase
from backend.db_meta.models import AppCache
from backend.flow.engine.controller.mongodb import MongoDBController
from backend.iam_app.dataclass.actions import ActionEnum
from backend.ticket import builders
Expand All @@ -27,10 +28,11 @@ def validate(self, attrs):


class MongoDBDisableFlowParamBuilder(builders.FlowParamBuilder):
controller = MongoDBController.fake_scene
controller = MongoDBController.disable_cluster

def format_ticket_data(self):
pass
bk_biz_id = self.ticket_data["bk_biz_id"]
self.ticket_data["bk_app_abbr"] = AppCache.objects.get(bk_biz_id=bk_biz_id).db_app_abbr


@builders.BuilderFactory.register(
Expand Down
6 changes: 4 additions & 2 deletions dbm-ui/backend/ticket/builders/mongodb/mongo_enable.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from rest_framework import serializers

from backend.db_meta.enums import ClusterPhase
from backend.db_meta.models import AppCache
from backend.flow.engine.controller.mongodb import MongoDBController
from backend.iam_app.dataclass.actions import ActionEnum
from backend.ticket import builders
Expand All @@ -27,10 +28,11 @@ def validate(self, attrs):


class MongoDBEnableFlowParamBuilder(builders.FlowParamBuilder):
controller = MongoDBController.fake_scene
controller = MongoDBController.enable_cluster

def format_ticket_data(self):
pass
bk_biz_id = self.ticket_data["bk_biz_id"]
self.ticket_data["bk_app_abbr"] = AppCache.objects.get(bk_biz_id=bk_biz_id).db_app_abbr


@builders.BuilderFactory.register(
Expand Down

0 comments on commit e6f9302

Please sign in to comment.