blob: 3b9950085b38c3d7f870ab349add342091986469 [file] [log] [blame]
Radek Krejcid23f0df2017-08-31 16:34:49 +02001"""
2Netopeer2 GUI backend
3File: __init__.py
4Author: Radek Krejci <rkrejci@cesnet.cz>
5
6Backend initialization via liberouter GUI.
7"""
8
9from liberouterapi import app, config
10from ..module import Module
11
12# Get Netopeer backend config
13config.load(path = __path__[0] + '/config.ini')
14
15# Register a blueprint
16module_bp = Module('netopeer', __name__, url_prefix = '/netopeer', no_version = True)
17
18from .schemas import *
19
20module_bp.add_url_rule('/inventory/schemas/list', view_func = schemas_list, methods=['GET'])
21module_bp.add_url_rule('/inventory/schemas', view_func = schemas_add, methods=['POST'])
Radek Krejci3cb753f2017-09-08 16:14:29 +020022module_bp.add_url_rule('/inventory/schemas', view_func = schemas_rm, methods = ['DELETE'])