commit | 8245e098905208efc5c8ad59a96c6d6795dd0223 | [log] [tgz] |
---|---|---|
author | Matteo Scandolo <teo@opennetworking.org> | Tue Oct 22 20:10:19 2019 +0000 |
committer | Gerrit Code Review <gerrit@opencord.org> | Tue Oct 22 20:10:19 2019 +0000 |
tree | fe4858c37246fe9b2c68c12a46d22088f8d1a8f1 | |
parent | c060545e2d757b3d424362ce1c43472fd7678902 [diff] | |
parent | 9dadc5bdb05e6480024cecd066734e1151ce339f [diff] |
Merge "VOL-2090 Move omci processing to olt, so that messages can be processed by the correct onu"
BBSim is managed via a Makefile
, plese run the following command to display all the available targets
make help
Once VOLTHA is deployed you can deploy BBsim using the helm chart provided in the repo:
git clone https://github.com/opencord/helm-charts.git helm install -n bbsim bbsim
Once BBSim
is up and running you can provision the OLT in VOLTHA.
When you install the BBSim
helm chart you'll notice that the last line of the output prints the service name and port:
... NOTES: BBSim deployed with release name: bbsim OLT ID: 0 # of NNI Ports: 1 # of PON Ports: 2 # of ONU Ports: 2 Total ONUs: (total: 4) OLT is listening on: "voltha.svc.bbsim:50060"
Connect to the voltha CLI and execute this commands:
preprovision_olt -t openolt -H voltha.svc.bbsim:50060 enable
This assumes voltctl
is installed an configured
voltctl device create -t openolt -H bbsim:50060 voltctl device enable $(voltctl device list --filter Type~openolt -q)
BBSim comes with a gRPC interface to control the internal state. This interface can be queried using bbsimctl
(the tool can be build with make build
and it's available inside the bbsim
container):
$ ./bbsimctl --help Usage: bbsimctl [OPTIONS] <config | olt | onus> Global Options: -c, --config=FILE Location of client config file [$BBSIMCTL_CONFIG] -s, --server=SERVER:PORT IP/Host and port of XOS -d, --debug Enable debug mode Help Options: -h, --help Show this help message Available commands: config generate bbsimctl configuration olt OLT Commands onus List ONU Devices
bbsimctl
can be configured via a config file such as:
$ cat ~/.bbsim/config apiVersion: v1 server: 127.0.0.1:50070 grpc: timeout: 10s
Some example commands:
$ ./bbsimctl olt get ID SERIALNUMBER OPERSTATE INTERNALSTATE 0 BBSIM_OLT_0 up enabled $ ./bbsimctl olt pons PON Ports for : BBSIM_OLT_0 ID OPERSTATE 0 up 1 up 2 up 3 up $ ./bbsimctl onu list PONPORTID ID SERIALNUMBER STAG CTAG OPERSTATE INTERNALSTATE 0 1 BBSM00000001 900 900 up eap_response_identity_sent 0 2 BBSM00000002 900 901 up eap_start_sent 0 3 BBSM00000003 900 902 up auth_failed 0 4 BBSM00000004 900 903 up auth_failed 1 1 BBSM00000101 900 904 up eap_response_success_received 1 2 BBSM00000102 900 905 up eap_response_success_received 1 3 BBSM00000103 900 906 up eap_response_challenge_sent 1 4 BBSM00000104 900 907 up auth_failed 2 1 BBSM00000201 900 908 up auth_failed 2 2 BBSM00000202 900 909 up eap_start_sent 2 3 BBSM00000203 900 910 up eap_response_identity_sent 2 4 BBSM00000204 900 911 up eap_start_sent 3 1 BBSM00000301 900 912 up eap_response_identity_sent 3 2 BBSM00000302 900 913 up auth_failed 3 3 BBSM00000303 900 914 up auth_failed 3 4 BBSM00000304 900 915 up auth_failed
bbsimctl
comes with autocomplete, just run:
source <(bbsimctl completion bash)
More advanced documentation lives in the here
This project structure is based on golang-standards/project-layout.