Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

./simulator.sh stop


  • Verify the that you have netopeer docker container are up and running. It will be mapped to host port 830

...

cd /opt/dev/Netopeer2/cli/build
./netopeer2-cli
> connect --host localhost --login netconf
> edit-config --target running --config=/dev-models/pg-data.xml
> get --filter-xpath /sample-plugin:*

> edit-config --target running --config=/dev-models/sample-plugin-data.xml
OK
> get --filter-xpath /sample-plugin:*
DATA
<sample-plugin xmlns="urn:opendaylight:params:xml:ns:yang:sample-plugin">
<pg-streams>
<pg-stream>
<id>1</id>
<is-enabled>true</is-enabled>
</pg-stream>
</pg-streams>
</sample-plugin>



  • You can use the attached PNF-DEMO-ENRICHED-WORKING.zip file to enrich, save, publish and deploy from CDS UI. Otherwise you can clone the CDS source code using utility scripts under Scripts folder


...

The below script will load the CDS default model artifacts into CDS DB. You should get HTTP status 200 for the below command.

...

You can verify the CURL command JSON pay load file  /tmp/day-n-pnf-config.json

cd PNF_DEMO/Scripts

bash -x ./create-config-assing-data.sh day-2 10.128.0.86 10


Verify the day-2 NETCONF RPC payload in CDS DB you should see the NETCONF RPC with 5 streams (fw_udp_1 TO fw_udp_10)

MariaDB [sdnctl]> select * from TEMPLATE_RESOLUTION where resolution_key='day-2' AND artifact_name='netconfrpc';


<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
<edit-config>
<target>
<running/>
</target>
<config>
<sample-plugin xmlns="urn:opendaylight:params:xml:ns:yang:sample-plugin">
<pg-streams>
<pg-stream>
<id>fw_udp_1</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_2</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_3</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_4</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_5</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_6</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_7</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_8</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_9</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_10</id>
<is-enabled>true</is-enabled>
</pg-stream>
</pg-streams>
</sample-plugin>
</config>
</edit-config>
</rpc>


Note:- Till this point CDS did not interact with the PNF simulator or device. We just created the day-1 and day-2 configurations and

...

Open a new terminal and tail CDS Blueprint processor logs and keep it running. We will need it to review the config-deploy actions

cd PNF_DEMO/Scripts


bash -x ./tail-cds-bp-log.sh

Push the NETCONF changes for day-1

# Command syntax
# bash -x ./process-config-deploy.sh RESOLUTION_KEY PNF_IP_ADDRESS
# resolution-key = day-1 you can look at the JSON payload /tmp/pnf-config-deploy.json

cd PNF_DEMO/Scripts

bash -x ./process-config-deploy.sh day-1 10.128.0.86

  

Verify the CDS blueprint processor logs and you should see NETCONF RPC OK response as shown below

2020-09-08 13:16:25,783|||Thread-57||||INFO||||||| 10.128.0.86:830: Received message with messageId: 2
<rpc-reply message-id="2" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><ok/></rpc-reply>


Go back to PNF netopeer cli console and verify if you can  see 5 streams  fw_udp_1 to fw_udp_5 enabled

>
> get --filter-xpath /sample-plugin:*
DATA
<sample-plugin xmlns="urn:opendaylight:params:xml:ns:yang:sample-plugin">
<pg-streams>
<pg-stream>
<id>1</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_1</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_2</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_3</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_4</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_5</id>
<is-enabled>true</is-enabled>
</pg-stream>
</pg-streams>
</sample-plugin>

>

  • config-deploy  resoultion-key = day-2

...

# Command syntax
# bash -x ./process-config-deploy.sh RESOLUTION_KEY PNF_IP_ADDRESS
# resolution-key = day-1 you can look at the JSON payload /tmp/pnf-config-deploy.json

cd PNF_DEMO/Scripts

bash -x ./process-config-deploy.sh day-1 10.128.0.86

  

Verify the CDS blueprint processor logs and you should see NETCONF RPC OK response as shown below

2020-09-08 13:19:59,078|||Thread-60||||INFO||||||| 10.128.0.86:830: Received message with messageId: 2
<rpc-reply message-id="2" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><ok/></rpc-reply>

Go back to PNF netopeer cli console and verify if you can  see 5 streams  fw_udp_1 to fw_udp_10 enabled

> get --filter-xpath /sample-plugin:*
DATA
<sample-plugin xmlns="urn:opendaylight:params:xml:ns:yang:sample-plugin">
<pg-streams>
<pg-stream>
<id>1</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_1</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_2</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_3</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_4</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_5</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_6</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_7</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_8</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_9</id>
<is-enabled>true</is-enabled>
</pg-stream>
<pg-stream>
<id>fw_udp_10</id>
<is-enabled>true</is-enabled>
</pg-stream>
</pg-streams>
</sample-plugin>