Skip to content

Commit 9a51d19

Browse files
committed
fix: typo
1 parent 2d1936d commit 9a51d19

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

naas_python/domains/storage/adaptors/primary/SDKStorageAdaptor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def post_workspace_storage_object(self,
8282
)
8383
return response
8484
else:
85-
raise FileNotFoundError(f"File '{src_file}' does not exist.")
85+
raise FileNotFoundError(f"File not found: {src_file}")
8686

8787
def get_workspace_storage_object(self,
8888
workspace_id: str = "",

naas_python/domains/storage/adaptors/secondary/NaasStorageAPIAdaptor.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def create_workspace_storage(self,
3838
workspace_id: str,
3939
storage_name: Storage.__fields__['name']
4040
) -> dict:
41-
_url = f"{self.host}/workspace/{workspace_id}/storage"
41+
_url = f"{self.host}/workspace/{workspace_id}/storage/"
4242

4343
api_response = self.make_api_request(
4444
requests.post,
@@ -66,7 +66,7 @@ def delete_workspace_storage(self,
6666
def list_workspace_storage(self,
6767
workspace_id: str,
6868
) -> dict:
69-
_url = f"{self.host}/workspace/{workspace_id}/storage"
69+
_url = f"{self.host}/workspace/{workspace_id}/storage/"
7070

7171
api_response = self.make_api_request(
7272
requests.get,
@@ -104,9 +104,10 @@ def delete_workspace_storage_object(self,
104104
)
105105
return self.__handle_response(api_response)
106106

107+
@BaseAPIAdaptor.service_status_decorator
107108
def generate_credentials(self, workspace_id :str, storage_name: str) -> dict:
108109

109-
_url = f"{self.host}/workspace/{workspace_id}/storage/credentials"
110+
_url = f"{self.host}/workspace/{workspace_id}/storage/credentials/"
110111

111112
api_response = self.make_api_request(
112113
requests.post,

0 commit comments

Comments
 (0)