Skip to content

Commit

Permalink
feat(client): add "accoutType" to create_azure_storage_config
Browse files Browse the repository at this point in the history
PR Closed: #989
  • Loading branch information
zhen.chen authored and AChenQ committed Sep 3, 2021
1 parent 9f49ca7 commit a52c416
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tensorbay/client/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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.
Expand All @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions tensorbay/client/tests/test_gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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)

Expand Down

0 comments on commit a52c416

Please sign in to comment.