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