Ask Your Question
0

How to create a new node in the inventory

asked 2014-06-18 07:00:10 -0700

rgowrishankar gravatar image

Hi, I am trying to create a new node by augmenting the existing node in opendaylight-inventory and want to be able to access it via the RESTCONF API: http://localhost:8080/restconf/operational/opendaylight-inventory:nodes/

I created a new yang file in which I defined the following: Grouping abc-node { Leaf property1 { Type string; } } augment "/inv:nodes/inv:node" { ext:augment-identifier "test-abc-node"; uses abc-node; }

This is similar to OpenFlow. I tried searching the project (controller and OpenFlow) to figure out how the node is created but I have not been successful. I did find the code where the node gets updated (inventory-manager). I looked into the InstanceIdentifier and if that can be used to insert a new node, but that seems to be for getting information of an existing instance in the inventory.

Overall, what I am trying to do is to create a new node type in my plugin that I can create and the user can modify (using http://localhost:8080/restconf/operational/opendaylight-inventory:nodes/ URL) similar to the way OpenFlow nodes work. I could not find any information on the wiki either. Could one of the MD-SAL experts please help?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2014-06-18 07:13:04 -0700

Devin Avery gravatar image

We created a ping 2.0 example that illustrates augmenting / creating of nodes/node – you can find the source here:

https://git.opendaylight.org/gerrit/#/c/7249/

(As of Jun 18th it hasn’t been merged yet, and is pending some modifications based on feedback from Tony – that said, it should get you started).

There may be other ways to achieve what you want, but my hope is that this example would help people get started with this need. :)

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

Question Tools

Follow
1 follower

Stats

Asked: 2014-06-18 07:00:10 -0700

Seen: 629 times

Last updated: Jun 18 '14