From 28e18a74b65af33d08d0641fb1626f253efb18d4 Mon Sep 17 00:00:00 2001 From: yndu13 Date: Fri, 24 May 2024 12:15:08 +0800 Subject: [PATCH] Bump 0.3.3 --- .github/workflows/testPython.yml | 2 +- ChangeLog.md | 4 ++++ README-CN.md | 3 ++- README.md | 3 ++- alibabacloud_credentials/__init__.py | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testPython.yml b/.github/workflows/testPython.yml index 9f9f2e0..207d829 100644 --- a/.github/workflows/testPython.yml +++ b/.github/workflows/testPython.yml @@ -23,7 +23,7 @@ jobs: run: pip install alibabacloud-tea coverage pytest - name: Test with unittest run: | - coverage run --source="./alibabcloud_credentials" -m pytest tests/ + coverage run -m unittest discover env: SUB_ALIBABA_CLOUD_ACCESS_KEY: ${{ secrets.SUB_ALIBABA_CLOUD_ACCESS_KEY }} SUB_ALIBABA_CLOUD_SECRET_KEY: ${{ secrets.SUB_ALIBABA_CLOUD_SECRET_KEY }} diff --git a/ChangeLog.md b/ChangeLog.md index 87d1bbd..9d0e54a 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,7 @@ +### 2024-05-24 Version 0.3.3 +* Support IMDSv2 for ecs ram role. +* Support env ALIBABA_CLOUD_ECS_IMDSV2_ENABLE. + ### 2023-02-28 Version 0.3.2 * Support credentials.ini under $HOME. diff --git a/README-CN.md b/README-CN.md index 1d15155..e2afb4c 100644 --- a/README-CN.md +++ b/README-CN.md @@ -128,7 +128,8 @@ from alibabacloud_credentials.models import Config config = Config( type='ecs_ram_role', # 凭证类型 - role_name='roleName' # 账户RoleName,非必填,不填则自动获取,建议设置,可以减少请求 + role_name='roleName', # 账户RoleName,非必填,不填则自动获取,建议设置,可以减少请求 + enable_imds_v2=True # 开启 V2 安全访问,非必填,可以设置环境变量来开启:ALIBABA_CLOUD_ECS_IMDSV2_ENABLE=true ) cred = Client(config) diff --git a/README.md b/README.md index 18456cb..a3b3fd2 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,8 @@ from alibabacloud_credentials.models import Config config = Config( type='ecs_ram_role', # credential type - role_name='roleName' # `roleName` is optional. It will be retrieved automatically if not set. It is highly recommended to set it up to reduce requests. + role_name='roleName', # `role_name` is optional. It will be retrieved automatically if not set. It is highly recommended to set it up to reduce requests. + enable_imds_v2=True # `enable_imds_v2` is optional and is recommended to be turned on. It can be replaced by setting environment variable: ALIBABA_CLOUD_ECS_IMDSV2_ENABLE ) cred = Client(config) diff --git a/alibabacloud_credentials/__init__.py b/alibabacloud_credentials/__init__.py index 39a2139..d02d8b6 100644 --- a/alibabacloud_credentials/__init__.py +++ b/alibabacloud_credentials/__init__.py @@ -1 +1 @@ -__version__ = "0.3.2" +__version__ = "0.3.3"