Versions Compared

Key

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

...

Please see karaf documentation for further information about the karaf commands: http://karaf.apache.org/manual/latest/#_commands

OpenDaylight RestConf 

MDSAL OpenDaylight internal data

Most for the important data is stored in OpenDaylights Model-Driven-Service-Abstraction-Layer (MD-SAL). The entire data tree is accessible via the RestConf interface.

...


login="-u $odlAaaUserName:$odlAaaUserPassword"
header='--header "Content-Type: application/json"'
baseUrl="$protocol://$fqdn:$httpPort"

echo "List configured mountpoints";
odlMountpointsUrl=$baseUrl/restconf/config/network-topology:network-topology
curl $login $header $odlMountpointsUrl | python -m json.tool | grep node-id
echo
echo "List connection-status of mountpoints";
odlMountpointsUrl=$baseUrl/restconf/operational/network-topology:network-topology
curl $login $header $odlMountpointsUrl | python -m json.tool | grep connection-status
echo


Data from NetConf Sever (device, network function)

Via the OpenDaylight RestConf interface it is also possible to retrieve the data from NetConf Servers. Of cause you need to know the "node-id" - the OpenDaylight identifier for the NetConf-Server and the supported YANG Models.

The node-ids are known from the commands above. Please remember one (wink)

Now it is necessary to check the supported yang modules: 


echo "View supported yang capabilities for a sleeted node (device, mountpoint, netconf-server)"
nodeId=<node-id>
odlMountpointsUrl=$baseUrl/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/$nodeId/available-capabilities
curl $login $header $odlMountpointsUrl | python -m json.tool | grep capability\":
echo
echo "Show device data provided by the NetConf-Server"
yangCapability="core-model:network-element"
odlMountpointsUrl=$baseUrl/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/$nodeId/yang-ext:mount/$yangCapability
curl $login $header $odlMountpointsUrl | python -m json.tool
echo

Data from a database

SDN-R (currently - there are activities to move such data into other databases)  stores a couple of data in an elasticsearch cluster. The most important ones are related to NetConf Alarm notifications.

From such notifications SDN-R keeps a table up-to-date with all current alarms of the network. In addition received NetConf Notifications with faults are stored in a separate. EleasticSearch APIs (https://www.elastic.co/guide/en/elasticsearch/reference/2.2/search.html) can be used to retrieve the data. 

Current alarms

echo "Show 100 current alarms"
esUrl=$baseUrl/database/sdnevents/faultcurrent/_search
curl --request POST $header -d '{"from":0,"size":100,"query":{"match_all":{}}}' $esUrl | python -m json.tool
echo

Alarm Log

echo "Show 100 alarm logs"

 esUrl=$baseUrl/database/sdnevents/faultlog/_search
curl --request POST $header -d '{"from":0,"size":100,"query":{"match_all":{}}}' $esUrl | python -m json.tool
echo