Пример #1
0
 def post(self):
     """创建 Redis 服务器
     """
     data = request.get_json()
     server,errors = ServerSchema().load(data)
     if errors:
         return errors,400
     server.ping()
Пример #2
0
 def post(self):
     data = request.get_json()
     server, erros = ServerSchema().load(data)
     if errors:
         return errors, 400
     server.ping()
     server.save()
     return('ok':True},201
Пример #3
0
 def post(self):
     """create Redis server"""
     data = request.get_json()
     server, errors = ServerSchema().load(data)
     if errors:
         return errors, 400
     server.ping()
     server.save()
     return {'ok': True}, 201