The objective of this page is to give you some basics about setting up ONAP PNF simulator and how to create a simple CDS blueprint model to perform DAY-N config-assign and config-deploy.
- Setting up PNF simulator integration project
You can refer to PnP PNF Simulator wiki page to clone the GIT repo and start the required docker containers. We are interested in the sysrepo
/sysrepo-netopeer2
docker container to load a simple YANG similar to vFW Packet Generator.
- Start PNF simulator docker containers. You can consider changing the netopeer image verion to image: sysrepo/sysrepo-netopeer2:iop in docker-compose.yml file If you find any issues with the default image.
cd $HOME
git clone https://github.com/onap/integration.git
Start PNF simulator
cd ~/integration/test/mocks/pnfsimulator
./simulator.sh stop
./simulator.sh stop
- Verify the you have netopeer docker container are up and running. It will be mapped to host port 830
docker ps -a | grep netopeer
- 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. You can leave this terminal up and running.
cd /opt/dev/Netopeer2/cli/build > quit |
---|
- You can use the attached PNF-DEMO-ENRICHED-CBA.zip file to enrich, save, publish and deploy from CDS UI. Otherwise you can clone the CDS source code
git clone "https://gerrit.onap.org/r/ccsdk/cds" |
---|
- Setup CDS k8s environment by following Running CDS on Microk8s wiki page
- After Verify if you can see CDS k8s PODs
Config-Deploy
- 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
- TODO: REST API CURL Command for Day-1 configuration deployment
- TODO: REST API CURL Command for Day-2 configuration deployment