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.

One of the main questions is: How many NetConf-Servers are configured and what it the connection-status to each NetConf-Server.

```
#!/bin/bash
protocol=http     # http or https
fqdn=10.20.6.29 # This is a machine of OSNL (OpenSDN/NFV lab) used for testing the commands
httpPort=8181
odlAaaUserName=demx8as6
odlAaaUserPassword=************

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 capabilites for a seleted node (device, mountpoint, netconf-server)"
nodeId="SMOptics"
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