Improved Python API

This commit is contained in:
Luca Deri 2022-12-03 13:37:39 +01:00
parent f8f97a5af8
commit f3a2f2e31b
4 changed files with 138 additions and 9 deletions

View file

@ -1,19 +1,28 @@
#!/usr/bin/env python3
#
# Test application for python API
#
from ntopng import ntopng
from interface import interface
from host import host
from flow import flow
import os
my_ntopng = ntopng('admin', 'lucaderi', 'http://localhost:3000')
my_ntopng = ntopng('admin', 'admin', 'http://localhost:3000')
ifid = 4
my_interface = interface(my_ntopng)
#my_interface.self_test(ifid)
my_interface.self_test(ifid)
my_host = host(my_ntopng)
my_host.self_test(ifid)
my_flow = flow(my_ntopng)
my_flow.self_test(ifid)
os._exit(0)