...
- Create a simple packet generator YANG model (pg.yang)
module sample-plugin { yang-version 1; description revision "2016-09-18" { container sample-plugin { // READ // WRITE } grouping sample-plugin-params { key id; leaf is-enabled { |
---|
- Sample XML data definition for the above model to initialise one single PG stream (pg-data.xml)
<sample-plugin xmlns="urn:opendaylight:params:xml:ns:yang:sample-plugin"> |
---|
- Copy the above two files into netopeer docker container (pg.yang & pg-data.xml) under /etc/sysrepo/data folder
Execute the following command within netopeer docker container to install the pg.yang model
sysrepoctl -i -g /etc/sysrepo/yang/pg.yang
- Connect to netopeer docker container and execute the following commands to initialise the pg.yang model
cd /opt/dev/Netopeer2/cli/build > quit exit |
---|
- Now create a simple CDS blue print to update the number of streams using NETCONF.
- The assumption is all the below parameters for config-assign will sent as part of config-assing REST call
Day-0 : config-assign parameters
netconf-server-ip, netconf-server-port, netconf-username, netconf-password, pg-stream-count
Day-1 : config-assign parameters
netconf-server-ip, netconf-server-port, netconf-username, netconf-password, pg-stream-count
- config-deploy request will send the Day-0 or Day-1 resolution key as part of the REST call.
"resolution-key" : "day-1" (OR) "resolution-key" : "day-2"
- config-deploy should retrieve the Day-1 or Day-2 configuration based on the resolution-key and executes the NETCONF command processor Kotlin code