@@ -96,10 +96,9 @@ def access_modify(
96
96
}
97
97
98
98
resp = self ._client .post (
99
- "/object-storage/buckets/{}/{}/access" .format (
100
- parse .quote (str (self .cluster )), parse .quote (str (self .id ))
101
- ),
99
+ f"{ self .api_endpoint } /access" ,
102
100
data = drop_null_keys (params ),
101
+ model = self ,
103
102
)
104
103
105
104
if "errors" in resp :
@@ -138,10 +137,9 @@ def access_update(
138
137
}
139
138
140
139
resp = self ._client .put (
141
- "/object-storage/buckets/{}/{}/access" .format (
142
- parse .quote (str (self .cluster )), parse .quote (str (self .id ))
143
- ),
140
+ f"{ self .api_endpoint } /access" ,
144
141
data = drop_null_keys (params ),
142
+ model = self ,
145
143
)
146
144
147
145
if "errors" in resp :
@@ -163,9 +161,8 @@ def ssl_cert_delete(self):
163
161
"""
164
162
165
163
resp = self ._client .delete (
166
- "/object-storage/buckets/{}/{}/ssl" .format (
167
- parse .quote (str (self .cluster )), parse .quote (str (self .id ))
168
- )
164
+ f"{ self .api_endpoint } /ssl" ,
165
+ model = self ,
169
166
)
170
167
171
168
if "error" in resp :
@@ -188,9 +185,8 @@ def ssl_cert(self):
188
185
:rtype: MappedObject
189
186
"""
190
187
result = self ._client .get (
191
- "/object-storage/buckets/{}/{}/ssl" .format (
192
- parse .quote (str (self .cluster )), parse .quote (str (self .id ))
193
- )
188
+ f"{ self .api_endpoint } /ssl" ,
189
+ model = self ,
194
190
)
195
191
196
192
if not "ssl" in result :
@@ -231,10 +227,9 @@ def ssl_cert_upload(self, certificate, private_key):
231
227
"private_key" : private_key ,
232
228
}
233
229
result = self ._client .post (
234
- "/object-storage/buckets/{}/{}/ssl" .format (
235
- parse .quote (str (self .cluster )), parse .quote (str (self .id ))
236
- ),
230
+ f"{ self .api_endpoint } /ssl" ,
237
231
data = params ,
232
+ model = self ,
238
233
)
239
234
240
235
if not "ssl" in result :
@@ -298,10 +293,9 @@ def contents(
298
293
"page_size" : page_size ,
299
294
}
300
295
result = self ._client .get (
301
- "/object-storage/buckets/{}/{}/object-list" .format (
302
- parse .quote (str (self .cluster )), parse .quote (str (self .id ))
303
- ),
296
+ f"{ self .api_endpoint } /object-list" ,
304
297
data = drop_null_keys (params ),
298
+ model = self ,
305
299
)
306
300
307
301
if not "data" in result :
0 commit comments