Ask is moving to Stack Overflow and! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode


How can I set network-topology with RESTCONF?

asked 2015-08-04 12:19:18 -0700

fyeh gravatar image

updated 2015-08-10 10:34:24 -0700

I'm attempting to change the network topology with the RESTCONF API using the URL root:


However, at the moment even a plain GET on this base URL returns an error:

 "error-message":"Request could not be completed because the relevant data model content does not exist "

The methods (GET, PUT, DELETE, POST) are defined and exposed in the Yang UI and the API explorer. Are they supposed to be able to change the network configuration or are they meant to serve a different purpose?

[edit 1] In Reply to jsmoeller's comment:

I have tried connecting both a real switch (Pica8 3290 running OVS) and mininet OvS, and used the YangUI within Dlux. In all cases, this URL (restconf/config/network-topology:network-topology) returns this error.

A different URL (/restconf/operational/network-topology:network-topology) has only the GET method and works fine as ready-only topology.

[edit 2] Just wanted to clarify that I'm trying to manipulate the topology entirely within and only within OpenDayLight, independent of the initial network topology that ODL first received/constructed. Is that possible?

Fei Yeh

Northwestern University

edit retag flag offensive close merge delete


Is e.g. openvswitch or a real switch attached ? Try also the yangui within dlux. This allows you to easily explore the rest calls.

jsmoeller ( 2015-08-04 13:52:02 -0700 )edit

/config/ is the "desired state" (no default state -> no data in there), but your live topology is visible in the operational tree, so that matches your observation. This is the split between config / operation inherited from the NETCONF standard.

jsmoeller ( 2015-08-05 10:01:49 -0700 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2015-08-10 23:46:03 -0700

hjdeore gravatar image


I also tried same thing to set network topology through RESTCONF,

For config data store, i used same REST call as per below


If you put data in correct form it get stored in configuration data store but that data doesn't get transferred to Operational data store which you are accessing using


My advice is , don't try to populate topology using REST API instead write program to populate Operational Data store of network topology.

I guess this will help.

edit flag offensive delete publish link more


Thanks, that makes sense but how did you figure out that data doesn't transfer? Is there an API for populating Operational Data Store?

fyeh ( 2015-08-13 12:43:22 -0700 )edit

when i updated config data using REST API , it got update but after that when i check operational data using REST API there was no data. It means that data is not getting transferred. You can update operational data store by using instance identifier which we used to update data store. Instance of Network Topology Interface

hjdeore ( 2015-08-16 22:18:01 -0700 )edit

answered 2015-08-05 13:05:03 -0700


I would ask for 2 things:

  1. Are the features for what you are trying to achieve installed ? In this case, it seems you are trying to use the OVSDB feature to connect some OVS switches.

  2. Can you include the json payload used to create the topology ?


edit flag offensive delete publish link more


I'm trying to set network topology with RESTCONF, not OVSDB directly. I have this module installed: 78 | Active | 80 | 2013.10.19.7-Lithium | org.opendaylight.yangtools.model.ietf-restconf What URL and methods should I use?

fyeh ( 2015-08-07 14:19:35 -0700 )edit
Login/Signup to Answer


Asked: 2015-08-04 12:19:18 -0700

Seen: 2,628 times

Last updated: Aug 10 '15