This repository creates a Docker image that provides a mock GRPC VOLTHA server that may be valuable for client testing.
This mock server can support either VOLTHA v1 or v2 protocol buffers. To
select which protocol buffers to use either a -1 or -2 argument can
be used when starting the Docker container. The default is version 2.
The mock server can be started using the following command:
docker docker run -tid --name voltha-mock --rm \
-p 50051:50051 ciena/voltha-mock
The image is built with some based mock responses, nothing fancy and nothing much. These can be see in the data.json file in the git
repository.
To override the default mock responses mount the custom response file
as /voltha/data.json when the docker container is started, i.e.
-v <path-to-responses>/<response-file.json>:/voltha/data.json.
The following is an example session, installing and using voltctl client against the mock
VOLTHA server:
docker run -tid --name voltha-mock --rm -p 50051:50051 ciena/voltha-mock
mkdir ws
cd ws
export GOPATH=$(pwd)
go get github.com/ciena/voltctl/...
./bin/voltctl -a v2 -s localhost:50051 version
Client Version: beta
Cluster Version: 0.0.1-mock
./bin/voltctl -a v2 -s localhost:50051 adapter list
ID VENDOR VERSION
acme Acme Adapter Services 1.5.0
ollie Ollie's OLTs & ONUs 1.0.3
./bin/voltctl -a v2 -s localhost:50051 device list
ID TYPE ROOT PARENTID SERIALNUMBER VLAN ADMINSTATE OPERSTATUS CONNECTSTATUS
00015bbbfdb3c068 acme_olt true 0001aabbccddeeff 192.168.42.3:50060 0 ENABLED ACTIVE REACHABLE
0001552615104a2c acme_onu false 00015bbbfdb3c068 ACME012345678C 128 ENABLED ACTIVE REACHABLE
0001552615104a2d acme_onu false 00015bbbfdb3c068 ACME012345678D 129 ENABLED ACTIVE REACHABLE
0001552615104a2e acme_onu false 00015bbbfdb3c068 ACME012345678E 130 ENABLED ACTIVE REACHABLE
0001552615104a2f acme_onu false 00015bbbfdb3c068 ACME012345678F 131 DISABLED FAILED UNREACHABLE
docker rm -f voltha-mock
Content type
Image
Digest
Size
51.6 MB
Last updated
over 7 years ago
docker pull ciena/voltha-mock