A BGP looking glass based on the Django web framework
- User interface
- Polished web UI based on jQuery and Bootstrap
- Ajax/JSON query processing
- Customisable Django templates
- Multi-vendor device support using Napalm drivers
- Supported query types
- BGP paths/bestpath/longer paths by prefix
- BGP paths by AS_PATH regexp
- BGP paths by community match
- ICMP Ping
- Traceroute
- Framework for adding new query types easily
- Supported NOS command dialects
- Cisco IOS-XE/Classic
- "Dialect" framework for defining new syntax mappings
- Security
- SSH2-only command execution
- Multi-layered parameter verification
- Session and command authorisation framework:
- Google reCaptcha support
- Source IP address enforcement per session
- Max queries enforcement per session
- Max time enforcement per session
To install in a virtualenv called $VENV
:
-
Create and activate the vitrualenv:
virtualenv $VENV cd $VENV source bin/activate
-
Install Django and DjangoLG using
pip
:pip install Django pip install djangolg
-
Create a Django project:
django-admin startproject demo_lg cd demo_lg
-
Edit your project's settings file (e.g.
vi demo_lg/settings.py
):- Add
djangolg.apps.DjangolgConfig
toINSTALLED_APPS
. - Add
DJANGOLG_
settings as required.
- Add
-
Edit your project's urls file (e.g.
vi demo_lg/urls.py
):- Add the
include
function to the module's imports:-from django.conf.urls import url +from django.conf.urls import url, include
- Add an entry to
urlpatterns
:urlpatterns = [ + url(r'^lg/', include('djangolg.urls')), url(r'^admin/', admin.site.urls), ]
- Add the
-
Create your database tables using
manage.py
:./manage.py migrate
-
Create a set of SSH credentials, a location and some routers:
./manage.py lg add credentials --name default_credentials --type 0 --username test_user --password test_password ./manage.py lg add locations --name Some Place --sitecode ABC-123 ./manage.py lg add routers --hostname router1.example.net --dialect ios --credentials 1 --location 1 ./manage.py lg add routers --hostname router2.example.net --dialect ios --credentials 1 --location 1
-
Run the development server:
./manage.py runserver [::]:8000
-
Open a browser, navigate to
localhost:8000
, and check that everything is working.
DjangoLG is maintained by Workonline Communications (Pty) Ltd.
Get in touch with us at [email protected] or raise an issue.
DjangoLG is released under the Apache License version 2.0.
© 2016-2017 Workonline Communications (Pty) Ltd