Exemplo n.º 1
0
 def wrapper(*args, **kwargs):
     register_operators(name=name,
                        type=type,
                        addr=addr,
                        author=author,
                        version=version,
                        description=description)
     func(*args, **kwargs)
     delete_operators(name=name)
Exemplo n.º 2
0
def operator_refresh_api():
    args = reqparse.RequestParser(). \
        add_argument("name", type=str, required=True). \
        add_argument("addr", type=str, required=True). \
        add_argument("author", type=str, required=True). \
        add_argument("type", type=str, required=True). \
        add_argument("description", type=str, required=True). \
        add_argument("version", type=str, required=True). \
        parse_args()
    args = from_view_dict(args)
    return register_operators(**args)
Exemplo n.º 3
0
 def create(self, data):
     register_operators(data['endpoint'], data['name'])