Sign inSign up

frinx/netconf-testtool

By frinx

Updated about 1 year ago

Docker container with Netconf test tool, containing also starting script to run test tool simply.

Image
0

4.6K

frinx/netconf-testtool repository overview

Starting of the NETCONF testtool from Docker Image
  1. Download docker image using docker pull command:
docker pull frinx/netconf-testtool
  1. Run using docker run command:
docker run -it frinx/netconf-testtool

note
You can use --rm option before -it option to automatically remove docker container after it is closed.

  1. You can use options of Netconf test tool starting script
docker run --rm --publish 1024-1123:1024-1123 -v ./schemas:/opt/schemas -v ./i.xml:/opt/i.xml -it frinx/netconf-testtool \
--xmx 1G --port 1024 --devices 100 --schemas ./schemas --init-conf ./i.xml --ssh --md-sal --debug

note
-x or --xmx is used to set Java heap for test tool
-p or --port is used to set starting port of test tool
-d or --devices is used to set number of simulated devices
-s or --schemas is used to set schemas folder (it should be mount first to docker container using option -v)
-i or --init-conf is used to set initial simulated configto be returned by get-config RPC (it should be mount first to docker container similar like schemas)
--ssh is used to enable ssh
--md-sal is used to enable md-sal
--debug is ised to run in debug mode
-h or --help is used to display help
--override is used to override this starting script options and enter directly netconf test tool options (-x or --xmx option should be used before override)
if you are using some external files like schemas or initial configuration files, you should first mount them with options -v.
If you want to use ports, you should publish them using --publish option.

  1. You can also override starting script using option --override
docker run --publish 1024-1123:1024-1123 -v ./schemas:/opt/schemas -v ./i.xml:/opt/i.xml -v ./notification.xml:/opt/notification.xml \
            -it frinx/netconf-testtool --xmx 1G --override \
            --ssh true \
            --md-sal true \
            --starting-port 1024 \
            --device-count 100 \
            --schemas-dir ./schemas \
            --initial-config ./i.xml \
            --notification-file ./notification.xml \
            --debug true

note
Setting of Java options like xmx using -x or --xmx should be before --override option.
If usng --override option, then no other options of start script could be used except xmx setting and debug.
When using debug with override options, then only some Java and shell debug options would be active, but test tool itself would not be in debug mode - it could be set directly with test tool debug option.

  1. You can also Override docker entrypoint and run netconf test tool directly by custom way using all options of test tool and all java options
docker run --rm --publish 1024-1123:1024-1123 -v ./schemas:/opt/schemas -v ./i.xml:/opt/i.xml -v ./notifications.xml:/opt/notification.xml \
-it --entrypoint /bin/bash frinx/netconf-testtool

commands to run in docker container:

java -Djava.security.egd=file:/dev/./urandom \
     -Xmx1G \
     -jar netconf-testtool-executable.jar \
     --ssh true \
     --md-sal true \
     --device-count 100 \
     --starting-port 1024 \
     --schemas-dir ./schemas \
     --initial-config ./i.xml \
     --notification-file ./notification.xml \
     --debug true

note
In this custom way of running test tool you can run it directly or using starting script as was mentioned previously in step 3 and step 4.
Also in this way you should mount all external files that you want to use.
Files available in entrypoint override mode are netconf-testtool-executable.jar to run test tool directly from this jar file and run_netconf_testtool.sh to run it from start script.

Tag summary

Content type

Image

Digest

sha256:7fefc7d0d

Size

256.3 MB

Last updated

about 1 year ago

docker pull frinx/netconf-testtool