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

0

how to commit the config into device?

asked 2016-02-08 13:52:15 -0700

Lan gravatar image

updated 2016-02-11 14:36:32 -0700

As we known, there are two data stores in ODL:1.config and 2. operational. We can use RESTCONF operations get/put/post to request "config" data and get method to retrieve "operational" data. I get the devices configuration by RESTCONF :(http://localhost:8181/restconf/config/opendaylight-inventory:nodes)

My questions is: I get the "config" , then modify it, and finally I put the "config" back. example: get http://localhost:8181/restconf/config...


        <state xmlns="urn:opendaylight:flow:inventory">
            <live>false</live>
            <blocked>false</blocked>
            <link-down>true</link-down>
        </state>

I modify link-down =>false then put http://localhost:8181/restconf/config... and for verify I get again:


  <state xmlns="urn:opendaylight:flow:inventory">
            <live>false</live>
            <blocked>false</blocked>
            <link-down>false</link-down>
        </state>

But I get http://localhost:8181/restconf/operat... it shows=>


        <state xmlns="urn:opendaylight:flow:inventory">
            <live>false</live>
            <blocked>false</blocked>
            <link-down>true</link-down>
        </state>

how to commit the "config" into device?
It seems that the file have not changed when I get the "operational" file. Is it possible commit the modified "config" to "operational" using netconf protocol?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-02-08 17:32:53 -0700

saisujithreddy gravatar image

Here are the steps when NEW flow/inventory is added.

new configuration added through rest ( can be through postman or any other )--> yang model verified the body & url ---> Configuration is pushed in to Operational state.

Here are the steps when the same flow/inventory is added back with modification:-

configuration with changes added through rest ( depending on the changes like in case of adding a new flow the flow id should be unique) --> yang model verifies the body & url --> configuration Will not be pushed if there is an existing flow/inventory with same id else it will be pushed to operational.

Suggestion:- Please check if you are not only changing the minor parameters but also the unique parameters.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2016-02-08 13:52:15 -0700

Seen: 108 times

Last updated: Feb 11 '16