Management Commands

update_topology

After topology URLs (URLs exposing the files that the topology of the network) have been added in the admin, the update_topology management command can be used to collect data and start playing with the network graph:

./manage.py update_topology

The management command accepts a --label argument that will be used to search in topology labels, e.g.:

./manage.py update_topology --label mytopology

Logging

The update_topology management command will automatically try to log errors.

For a good default LOGGING configuration refer to the test settings.

save_snapshot

The save_snapshot management command can be used to save the topology graph data which could be used to view the network topology graph sometime in future:

./manage.py save_snapshot

The management command accepts a --label argument that will be used to search in topology labels, e.g.:

./manage.py save_snapshot --label mytopology

upgrade_from_django_netjsongraph

If you are upgrading from django-netjsongraph to openwisp-network-topology, there is an easy migration script that will import your topologies, users & groups to openwisp-network-topology instance:

./manage.py upgrade_from_django_netjsongraph

The management command accepts an argument --backup, that you can pass to give the location of the backup files, by default it looks in the tests/ directory, e.g.:

./manage.py upgrade_from_django_netjsongraph --backup /home/user/django_netjsongraph/

The management command accepts another argument --organization, if you want to import data to a specific organization, you can give its UUID for the same, by default the data is added to the first found organization, e.g.:

./manage.py upgrade_from_django_netjsongraph --organization 900856da-c89a-412d-8fee-45a9c763ca0b

create_device_nodes

This management command can be used to create the initial DeviceNode relationships when the integration with OpenWISP Controller is enabled in a preexisting system which already has some devices and topology objects in its database.

./manage.py create_device_nodes