forked from TencentBlueKing/bk-nodeman
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 权限中心英文名标准化 (closed TencentBlueKing#2380)
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
apps/iam_migration/migrations/0009_bk_nodeman_202408091509.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-节点管理(BlueKing-BK-NODEMAN) available. | ||
Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved. | ||
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at https://opensource.org/licenses/MIT | ||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations under the License. | ||
""" | ||
from django.db import migrations | ||
from iam.contrib.iam_migration.migrator import IAMMigrator | ||
|
||
|
||
def forward_func(apps, schema_editor): | ||
|
||
migrator = IAMMigrator(Migration.migration_json) | ||
migrator.migrate() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
migration_json = "0009_bk_nodeman_20240809_1509_iam.json" | ||
|
||
dependencies = [("iam_migration", "0008_bk_nodeman_202305121500")] | ||
|
||
operations = [migrations.RunPython(forward_func)] |
17 changes: 17 additions & 0 deletions
17
support-files/bkiam/0009_bk_nodeman_20240809_1509_iam.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"system_id":"bk_nodeman", | ||
"operations":[ | ||
{ | ||
"operation": "upsert_system", | ||
"data": { | ||
"id": "bk_nodeman", | ||
"name": "节点管理", | ||
"name_en": "NodeMan", | ||
"description": "", | ||
"description_en": "", | ||
"clients": "bk_nodeman,bk_bknodeman", | ||
"provider_config": {"host": "http://__BK_NODEMAN_API_ADDR__", "auth": "basic"} | ||
} | ||
} | ||
] | ||
} |