def delete_server(sid): server = Server() server.id = sid server.is_del = 1 server.persist()
def add_server(server_info): server = Server() for k, v in server_info.iteritems(): setattr(server, k, v) server.persist()