Skip to content

Commit

Permalink
Fix iam migrator app (#85)
Browse files Browse the repository at this point in the history
* set require cachetools>=3.1.1,<6.0 in setup.py

* 将 bk_app_code/bk_app_secret 设置为 IAMMigrator 的实例属性

* 更新 release 信息及版本号
  • Loading branch information
alex-smile authored Jul 1, 2023
1 parent 5295f94 commit 450e616
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion iam/__version__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-

__version__ = "1.3.3"
__version__ = "1.3.4"
7 changes: 3 additions & 4 deletions iam/contrib/iam_migration/migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ def upsert_system_render(data):
class IAMMigrator(object):
def __init__(self, migration_json):
self.migration_json = migration_json
self._bk_app_code = getattr(settings, "APP_CODE", "")
self._bk_app_secret = settings.SECRET_KEY

def migrate(self):
app_code = settings.APP_CODE
app_secret = settings.SECRET_KEY

iam_host = ""
USE_APIGATEWAY = getattr(settings, "BK_IAM_USE_APIGATEWAY", False)
if USE_APIGATEWAY:
Expand Down Expand Up @@ -71,6 +70,6 @@ def migrate(self):
if not ok:
raise exceptions.NetworkUnreachableError("bk iam ping error")

ok = do_migrate.do_migrate(data, iam_host, app_code, app_secret)
ok = do_migrate.do_migrate(data, iam_host, self._bk_app_code, self._bk_app_secret)
if not ok:
raise exceptions.MigrationFailError("iam migrate fail")
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![](docs/resource/img/bk_iam_zh.png)
---

[![license](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](https://github.com/TencentBlueKing/iam-python-sdk/blob/master/LICENSE.txt) [![Release Version](https://img.shields.io/badge/release-1.3.2-brightgreen.svg)](https://github.com/TencentBlueKing/iam-python-sdk/releases) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/TencentBlueKing/iam-python-sdk/pulls) [![BK Pipelines Status](https://api.bkdevops.qq.com/process/api/external/pipelines/projects/iam/p-5c359e750bb9457984ab84656651d843/badge?X-DEVOPS-PROJECT-ID=iam)](http://devops.oa.com/process/api-html/user/builds/projects/iam/pipelines/p-5c359e750bb9457984ab84656651d843/latestFinished?X-DEVOPS-PROJECT-ID=iam)
[![license](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](https://github.com/TencentBlueKing/iam-python-sdk/blob/master/LICENSE.txt) [![Release Version](https://img.shields.io/badge/release-1.3.4-brightgreen.svg)](https://github.com/TencentBlueKing/iam-python-sdk/releases) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/TencentBlueKing/iam-python-sdk/pulls) [![BK Pipelines Status](https://api.bkdevops.qq.com/process/api/external/pipelines/projects/iam/p-5c359e750bb9457984ab84656651d843/badge?X-DEVOPS-PROJECT-ID=iam)](http://devops.oa.com/process/api-html/user/builds/projects/iam/pipelines/p-5c359e750bb9457984ab84656651d843/latestFinished?X-DEVOPS-PROJECT-ID=iam)

[(English Documents Available)](readme_en.md)

Expand Down
2 changes: 1 addition & 1 deletion readme_en.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![](docs/resource/img/bk_iam_en.png)
---

[![license](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](https://github.com/TencentBlueKing/iam-python-sdk/blob/master/LICENSE.txt) [![Release Version](https://img.shields.io/badge/release-1.3.2-brightgreen.svg)](https://github.com/TencentBlueKing/iam-python-sdk/releases) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/TencentBlueKing/iam-python-sdk/pulls) [![BK Pipelines Status](https://api.bkdevops.qq.com/process/api/external/pipelines/projects/iam/p-5c359e750bb9457984ab84656651d843/badge?X-DEVOPS-PROJECT-ID=iam)](http://devops.oa.com/process/api-html/user/builds/projects/iam/pipelines/p-5c359e750bb9457984ab84656651d843/latestFinished?X-DEVOPS-PROJECT-ID=iam)
[![license](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](https://github.com/TencentBlueKing/iam-python-sdk/blob/master/LICENSE.txt) [![Release Version](https://img.shields.io/badge/release-1.3.4-brightgreen.svg)](https://github.com/TencentBlueKing/iam-python-sdk/releases) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/TencentBlueKing/iam-python-sdk/pulls) [![BK Pipelines Status](https://api.bkdevops.qq.com/process/api/external/pipelines/projects/iam/p-5c359e750bb9457984ab84656651d843/badge?X-DEVOPS-PROJECT-ID=iam)](http://devops.oa.com/process/api-html/user/builds/projects/iam/pipelines/p-5c359e750bb9457984ab84656651d843/latestFinished?X-DEVOPS-PROJECT-ID=iam)

## Overview

Expand Down
5 changes: 5 additions & 0 deletions release.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
版本日志
===============

# v1.3.4

- IAMMigrator 将 bk_app_code/bk_app_secret 设置为类实例属性
- cachetools 依赖版本号调整为:cachetools>=3.1.1,<6.0

# v1.3.3

- add: list_instance、search_instance 新增 action 返回
Expand Down

0 comments on commit 450e616

Please sign in to comment.