From f9f634cc2c4ee8e3396e8182c63c075e793f37d5 Mon Sep 17 00:00:00 2001 From: "zhen.chen" Date: Fri, 3 Sep 2021 10:30:05 +0800 Subject: [PATCH] feat(client): add "accoutType" to create_azure_storage_config PR Closed: https://github.com/Graviti-AI/tensorbay-python-sdk/pull/989 --- tensorbay/client/gas.py | 3 +++ tensorbay/client/tests/test_gas.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/tensorbay/client/gas.py b/tensorbay/client/gas.py index 7a61ed34d..133d2797c 100644 --- a/tensorbay/client/gas.py +++ b/tensorbay/client/gas.py @@ -276,6 +276,7 @@ def create_azure_storage_config( name: str, file_path: str, *, + account_type: str, account_name: str, account_key: str, container_name: str, @@ -285,6 +286,7 @@ def create_azure_storage_config( Arguments: name: The required auth storage config name. file_path: dataset storage path of the bucket. + account_type: account type of azure, only support "China" and "Global". account_name: account name of the azure. account_key: account key of the azure. container_name: container name of the azure. @@ -299,6 +301,7 @@ def create_azure_storage_config( "accesskeyId": account_name, "accesskeySecret": account_key, "containerName": container_name, + "accountType": account_type, } self._client.open_api_do("POST", "storage-configs/azure", json=post_data) diff --git a/tensorbay/client/tests/test_gas.py b/tensorbay/client/tests/test_gas.py index 55baf86d2..5a4b9617a 100644 --- a/tensorbay/client/tests/test_gas.py +++ b/tensorbay/client/tests/test_gas.py @@ -279,6 +279,7 @@ def test_create_azure_storage_config(self, mocker): self.gas_client.create_azure_storage_config( "azure_config", "tests", + account_type="China", account_name="accountName", account_key="accountKey", container_name="containerName", @@ -289,6 +290,7 @@ def test_create_azure_storage_config(self, mocker): "accesskeyId": "accountName", "accesskeySecret": "accountKey", "containerName": "containerName", + "accountType": "China", } open_api_do("POST", "storage-configs/azure", json=post_data)