|
relates with CONTROLLER-242
|
|
Question 1:
BrokerFacade - what class should be used for manipulating with datastore? Currently I am using DOMDataBroker but I am not sure if it is correct.
Question 2:
BrokerFacade - what class should be used for manipulating with datastore when data are behind mountpoint?
Question 3:
BrokerFacade - invokeRpc method calls ConsumerSession.rpc() which has input parameter of type CompositeNode. What should be used instead?
Problem 1:
yang-data-composite-node artifact does't contain class which is able to parse and serialize anyxml nodes.
|
|
This change is based on:
|
|
PROBLEM 2:
POST http://localhost:8080/restconf/config with data
'<nodes xmlns="urn:opendaylight:inventory">
<node xmlns="urn:opendaylight:inventory">
<id>1</id>
<table xmlns="urn:opendaylight:flow:inventory">
<id>2</id>
<flow>
<id>flow21</id>
</flow>
<flow>
<id>flow22</id>
</flow>
</table>
</node>
</nodes>'
then results of various GET:
Is this behaviour correct?
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Gradually inserting:
- <nodes></nodes>
- <node><id>1</id></node>
- <table><id>2</id></table>
....
|
|
(In reply to Jozef Gloncak from comment #4)
> PROBLEM 2:
>
> POST http://localhost:8080/restconf/config with data
> '<nodes xmlns="urn:opendaylight:inventory">
> <node xmlns="urn:opendaylight:inventory">
> <id>1</id>
> <table xmlns="urn:opendaylight:flow:inventory">
> <id>2</id>
> <flow>
> <id>flow21</id>
> </flow>
> <flow>
> <id>flow22</id>
> </flow>
> </table>
> </node>
> </nodes>'
>
> then results of various GET:
> - http://localhost:8080/restconf/config/opendaylight-inventory:nodes - OK
> - http://localhost:8080/restconf/config/opendaylight-inventory:nodes/node/1
> - OK
> -
> http://localhost:8080/restconf/config/opendaylight-inventory:nodes/node/1/
> table/2 - WRONG
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf">
> <error>
> <error-type>application</error-type>
> <error-tag>data-missing</error-tag>
> <error-message>No data was found.</error-message>
> </error>
> </errors>
>
> Is this behaviour correct?
when data are inserted gradually
- <nodes></nodes>
- <node><id>1</id></node>
- <table><id>2</id></table>
....
then all of this GET are OK
|
|
PROBLEM 3:
I also
POST http://localhost:8080/restconf/config/
data
'<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<nodes xmlns="urn:opendaylight:inventory">
<node>
<id>3</id>
</node>
<node>
<id>1</id>
</node>
<node>
<id>2</id>
</node>
</nodes>'
then I wanted to PUT (rewrite only node with ID 1 so I constructed
PUT http://localhost:8080/restconf/config/opendaylight-inventory:nodes/node/1
<node xmlns="urn:opendaylight:inventory">
<id>1</id>
</node>
but the result of
GET http://localhost:8080/restconf/config/opendaylight-inventory:nodes
was
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<nodes xmlns="urn:opendaylight:inventory">
<node>
<id>1</id>
</node>
</nodes>
(nodes 2 and 3 were lost)
|
|
Question 4:
How should be info about concrete "scope" and "datastore" for which should be stream (.../restconf/streams/stream/...) send to handling method?
Current state is via parameters in URI ("datastore", "scope"), where for defaults values:
- datastore=CONFIGURATION (other values: OPERATIONAL)
- scope=BASE (other values: ONE, SUBTREE)
|
|
(In reply to Jozef Gloncak from comment #7)
> Question 4:
> How should be info about concrete "scope" and "datastore" for which should
> be stream (.../restconf/streams/stream/...) send to handling method?
>
> Current state is via parameters in URI ("datastore", "scope"), where for
> defaults values:
> - datastore=CONFIGURATION (other values: OPERATIONAL)
> - scope=BASE (other values: ONE, SUBTREE)
In patch set 5 it was changed as follows:
1) creating listener
POST http://localhost:8080/restconf/operations/sal-remote:create-data-change-event-subscription
with data
<input xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:remote">
<path xmlns:a="urn:opendaylight:inventory">/a:nodes</path>
<datastore xmlns="urn:sal:restconf:event:subscription">OPERATIONAL</datastore>
<scope xmlns="urn:sal:restconf:event:subscription">BASE</scope>
</input>
has output
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<output xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:remote">
<stream-name>opendaylight-inventory:nodes/datastore=OPERATIONAL/scope=BASE</stream-name>
</output>
2) registration to listen data changes
GET http://localhost:8080/restconf/streams/stream/opendaylight-inventory:nodes/datastore=OPERATIONAL/scope=BASE
which returns location in header:
http://localhost:8181/opendaylight-inventory:nodes/datastore=OPERATIONAL/scope=BASE
|
|
(In reply to Jozef Gloncak from comment #3)
> This change is based on:
> - https://git.opendaylight.org/gerrit/#/c/8660 - yang-data-composite-node
> fix (+ conversion to bundle)
> - https://git.opendaylight.org/gerrit/#/c/8723/ - add
> yang-data-composite-node bundle to ODL distribution (currently it is
> submitted like draft because change #8660 isn't merged yet.
Additional patch set which are necessary fot CONTROLLER-511
https://git.opendaylight.org/gerrit/#/c/8931/ - Support for AnyXml yang type to yang-data-composite-node
https://git.opendaylight.org/gerrit/#/c/8930/2 - Add AnyXmlNodeBase parser and serializer
|
|
Patch set 6 is available
https://git.opendaylight.org/gerrit/#/c/8457/
|
|
to Question 3: it probably isn't necessary to translate composite node to normalized node when invoking rpc because no interaction with datastore. Should be confirmed!!!
|
|
patch set 10
https://git.opendaylight.org/gerrit/#/c/8457/
|
|
patch set 11
https://git.opendaylight.org/gerrit/#/c/8457/
(removed comments for RestConnectorModule.java and RestConnectorModuleFactory.java)
|
Generated at Wed Feb 07 19:53:12 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.