Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(client): add "accoutType" to create_azure_storage_config #989

Merged
merged 1 commit into from
Sep 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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