You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- copy NLAN Agent and NLAN modules to remote routers
$ nlan.py -m
- enable the rc script (/etc/init.d/nlan)
$ nlan.py system.rc enable
- update the rc script (/etc/init.d/nlan)
$ nlan.py system.rc update
- update OVSDB(conf.db) with new schema
$ nlan.py db.update
- deploy a network service with a default state file
$ nlan.py deploy
- deploy a network service with a default state file and with verbose output
$ nlan.py -v deploy
- deploy a network service with a specific state file (e.g., 'state.yaml')
$ nlan.py state.yaml
- deploy network service with logging enabled (either --info or --debug)
$ nlan.py dvsdvr.yaml --info
- execute a raw command at remote routers (e.g., ping)
$ nlan.py -t openwrt1 --raw 'ping -c4 192.168.1.10'
- execute a raw command at all the routers on the roster
$ nlan.py --raw 'ping -c4 192.168.1.10'
- wait until all the routers on the roster become accessible (-w <timeout>)
$ nlan.py -w 100
- wait until all the routers on the roster become inaccessible (-w -<timeout>)
$ nlan.py -w -50
Working with a local Git repo
- deploy a network service with a default state file (the state file is commited to the local git repo after the deployment)
$ nlan.py -G deploy
- rollback to the previous state
$ nlan.py init.run
$ nlan.py -R deploy
- echo test
$ nlan.py test.echo Hello World!
- show rpc list
$ nlan.py rpc.list
- ping test
$ nlan.py test.ping 192.168.1.10
- shutdown all the routers
$ nlan.py system.halt
- reboot all the routers
$ nlan.py system.reboot
- show NLAN Agent environment(shows built-in "__n__" variable)
$ nlan.py nlan.env
- show the current NLAN state in OVSDB
$ nlan.py db.state
- show the current NLAN state in OVSDB at a specific router
$ nlan.py -t openwrt1 db.state
- show a specific NLAN row in OVSDB (e.g., subnets vni=101)
$ nlan.py db.getrow subnets vni 101
- clear NLAN states in all the routers (all reset)
$ nlan.py init.run
$ nlan.py system.reboot
NLAN schema update
Update 'env.py' and 'schema.sh' at first. Then,
$ schema.sh
$ nlan -m
$ nlan db.update
Do not forget to update env.py either.
Using NLAN REST APIs
$ curl -s -H Content-Type:application/json -X POST http://192.168.56.101:8080/_ALL/rpc/test/echo?params=Hello!
$ curl -s -H Content-Type:application/json -X OPTIONS http://192.168.56.101:8080?params=subnets
$ curl -s -H Content-Type:application/json -X POST http://192.168.56.101:8080/openwrt1/rpc/init/run
$ curl -s -H Content-Type:application/json -X POST http://192.168.56.101:8080/openwrt1/config/bridges?ovs_bridges=enabled
$ curl -s -H Content-Type:application/json -X POST http://192.168.56.101:8080/openwrt1/config/vxlan?local_ip=192.168.1.101&remote_ips=192.168.1.102,192.168.56.103