Skip to content

Commit

Permalink
feat(backend): mangodb 集群下架联调 #3586
Browse files Browse the repository at this point in the history
  • Loading branch information
ygcyao authored and iSecloud committed Mar 19, 2024
1 parent 6649c1a commit d52d164
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 4 additions & 2 deletions dbm-ui/backend/ticket/builders/mongodb/mongo_destroy.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.ticket import builders
from backend.ticket.builders.mongodb.base import BaseMongoDBOperateDetailSerializer, BaseMongoDBTicketFlowBuilder
Expand All @@ -26,10 +27,11 @@ def validate(self, attrs):


class MongoDBDestroyFlowParamBuilder(builders.FlowParamBuilder):
controller = MongoDBController.fake_scene
controller = MongoDBController.deinstall_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(TicketType.MONGODB_DESTROY, phase=ClusterPhase.DESTROY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from django.utils.translation import ugettext as _
from rest_framework import serializers

from backend.db_meta.models import AppCache
from backend.flow.engine.controller.mongodb import MongoDBController
from backend.ticket import builders
from backend.ticket.builders.common.base import CommonValidate
Expand All @@ -33,7 +34,11 @@ class MongoDBTemporaryDisableFlowParamBuilder(builders.FlowParamBuilder):


class MongoDBTemporaryDestroyFlowParamBuilder(builders.FlowParamBuilder):
controller = MongoDBController.fake_scene
controller = MongoDBController.deinstall_cluster

def format_ticket_data(self):
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(TicketType.MONGODB_TEMPORARY_DESTROY)
Expand Down

0 comments on commit d52d164

Please sign in to comment.