|
9 | 9 | specific language governing permissions and limitations under the License. |
10 | 10 | """ |
11 | 11 |
|
| 12 | +import copy |
12 | 13 | import logging |
13 | 14 | from typing import Dict, List, Optional, Set |
14 | 15 |
|
|
17 | 18 | from backend.db_meta.enums import ClusterEntryRole, ClusterEntryType |
18 | 19 | from backend.db_meta.models import Cluster, ClusterEntry |
19 | 20 | from backend.flow.engine.bamboo.scene.common.builder import Builder |
| 21 | +from backend.flow.engine.bamboo.scene.mysql.deploy_peripheraltools.departs import ALLDEPARTS |
| 22 | +from backend.flow.engine.bamboo.scene.mysql.deploy_peripheraltools.subflow import ( |
| 23 | + standardize_mysql_cluster_by_cluster_subflow, |
| 24 | +) |
20 | 25 | from backend.flow.plugins.components.collections.common.clone_priv_rules_to_other_biz import ( |
21 | 26 | ClonePrivRulesToOtherComponent, |
22 | 27 | ) |
23 | 28 | from backend.flow.plugins.components.collections.common.generate_config_version import GenerateConfigVersionComponent |
24 | | -from backend.flow.plugins.components.collections.common.pause import PauseComponent |
25 | 29 | from backend.flow.plugins.components.collections.common.transfer_cluster_meta_to_other_biz import ( |
26 | 30 | TransferClusterMetaToOtherBizComponent, |
27 | 31 | UpdateClusterDnsBelongAppComponent, |
@@ -140,9 +144,27 @@ def transfer_to_other_biz_flow(self): |
140 | 144 | "method": "GenerateAndPublish", |
141 | 145 | }, |
142 | 146 | ) |
143 | | - |
144 | | - p.add_act(act_name=_("请先跑一下集群标准化,完成之后确认"), act_component_code=PauseComponent.code, kwargs={}) |
145 | | - |
| 147 | + # 标准化集群 |
| 148 | + cloud_cluster_ids = [cluster.id for cluster in clusters] |
| 149 | + p.add_sub_pipeline( |
| 150 | + sub_flow=standardize_mysql_cluster_by_cluster_subflow( |
| 151 | + root_id=self.root_id, |
| 152 | + data=copy.deepcopy(self.data), |
| 153 | + bk_cloud_id=bk_cloud_id, |
| 154 | + bk_biz_id=self.target_biz_id, |
| 155 | + cluster_ids=list(set(cloud_cluster_ids)), |
| 156 | + departs=ALLDEPARTS, |
| 157 | + with_deploy_binary=self.data.get("with_deploy_binary", True), |
| 158 | + with_push_config=self.data.get("with_push_config", True), |
| 159 | + with_collect_sysinfo=False, |
| 160 | + with_actuator=True, |
| 161 | + with_bk_plugin=self.data.get("with_deploy_binary", True), |
| 162 | + with_cc_standardize=self.data.get("with_cc_standardize", False), |
| 163 | + with_instance_standardize=self.data.get("with_instance_standardize", False), |
| 164 | + with_backup_client=self.data.get("with_deploy_binary", True), |
| 165 | + with_exporter_config=self.data.get("with_push_config", True), |
| 166 | + ) |
| 167 | + ) |
146 | 168 | p.add_act( |
147 | 169 | act_name=_("更新dns记录归属业务"), |
148 | 170 | act_component_code=UpdateClusterDnsBelongAppComponent.code, |
|
0 commit comments