@@ -244,52 +244,6 @@ def patch(self, path, data=None, headers={}):
244
244
request = urllib .request .Request (url , data , headers , method = "PATCH" )
245
245
return self ._do_request (request )
246
246
247
- def is_server_compatible (self ):
248
- """
249
- Test whether version of the server meets the required set of endpoints.
250
-
251
- :returns: client compatible with server
252
- rtype: Boolean
253
- """
254
- resp = self .get ("/ping" )
255
- data = json .load (resp )
256
- if "endpoints" not in data :
257
- return False
258
- endpoints = data ["endpoints" ]
259
-
260
- client_endpoints = {
261
- "data_sync" : {
262
- "GET" : ["/project/raw/{namespace}/{project_name}" ],
263
- "POST" : [
264
- "/project/push/cancel/{transaction_id}" ,
265
- "/project/push/finish/{transaction_id}" ,
266
- "/project/push/{namespace}/{project_name}" ,
267
- # "/project/push/chunk/{transaction_id}/{chunk_id}" # issue in server
268
- ],
269
- },
270
- "project" : {
271
- "DELETE" : ["/project/{namespace}/{project_name}" ],
272
- "GET" : [
273
- "/project" ,
274
- "/project/{namespace}/{project_name}" ,
275
- "/project/version/{namespace}/{project_name}" ,
276
- ],
277
- "POST" : ["/project/{namespace}" ],
278
- },
279
- "user" : {"POST" : ["/auth/login" ]},
280
- }
281
-
282
- for k , v in client_endpoints .items ():
283
- if k not in endpoints :
284
- return False
285
- for method , url_list in v .items ():
286
- if method not in endpoints [k ]:
287
- return False
288
- for url in url_list :
289
- if url not in endpoints [k ][method ]:
290
- return False
291
- return True
292
-
293
247
def login (self , login , password ):
294
248
"""
295
249
Authenticate login credentials and store session token
0 commit comments