[CONTROLLER-730] Issue in rpc call on mounted schema Created: 26/Aug/14  Updated: 25/Jul/23  Resolved: 09/Sep/14

Status: Resolved
Project: controller
Component/s: restconf
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Ankit agarwal Assignee: Jozef Gloncak
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: PC


External issue ID: 1620
Priority: Highest

 Description   

While making rpc call on mounted schema ODL tries to find the provided rpc in available schema and
according to current scenario
1. ODL tries to find the qname for the given module and node name from global schema (which has schemas for local netconf sever) instead of mounted schema.

2. ODL tries to lookup for the remote rpc into the global schema which has only module belong to local netconf server instead of mounted point schema
due to which it returns validName and rpcDefinition as null.

both of above scnearios should be corrected for successful rpc call on mounted schema.
onGlobalContextUpdated method need to updated in a way that it adds the mounted schema to the map of already available schemas so that rpc calls of both the server(local and mounted schema) can work fine.



 Comments   
Comment by Tony Tkacik [ 27/Aug/14 ]

Could you provide example how are you trying to invoke mounted RPC?

Comment by Ankit agarwal [ 27/Aug/14 ]

Hi Tony,

I am using following url to make rpc call,

http://localhost:8080/restconf/operations/opendaylight-inventory:nodes/node/m10schemanew/yang-ext:mount/configuration:get-system-information

Comment by Ankit agarwal [ 02/Sep/14 ]

Hi Tony,

Is there any update on this?
If you think a change is required in ODL then please acknowledge it.

Comment by Jozef Gloncak [ 09/Sep/14 ]

I passed via code which handle invoking of rpc.
Firstly there is method invokeRpc() which contains resolveIdentifierInInvokeRpc(). This method returns rpc executor where concrete rpc is searched in:

  • schema context of running ODL if mount point doesn't exist
  • schema context of device behind mount point if MP exists.

Everytime the rpc in front or behind mount point is called the executor is created as mentioned.

If rpc is called via your URI
http://localhost:8080/restconf/operations/opendaylight-inventory:nodes/node/m10schemanew/yang-ext:mount/configuration:get-system-information

then rpc >get-system-information< from module >configuration< from schema context BEHIND mount point is called.

You mentioned in numbering 1. that for mounted device ODL tries to find rpc from global schema which isn't true. Rpc is searched in schema context of mount point (RestconfImpl.java row 545 - findRpc() method).

I wasn't able to understand numbering 2. but I think that it is the same (or very simillar) as numbering 1.

Currently I can't see your problem. Could you specify concrete example. What version of ODL are you using?

The feature of distinguising between infront and behind mount point rpc calling was added 7 week ago with commit 987da65... - CONTROLLER-633 - rpcs behind yang-ext:mount aren't always executed.

Comment by Ankit agarwal [ 09/Sep/14 ]

Hi,
Thanks for your time,

Firstly i would like to explain what i was asking for

#1: I meant that when ODL tries to find rpc in schema context ,
it was looking into the globalschema instead of schema context of mount point.

Now with latest clone of ODL of 05 Sep, it is working fine.

#2: query in first point and second point is alomost same.
which is Anywaays is working fine so we can move and close this Bug.

May be what you have said is right and merge of CONTROLLER-633 resolves this issue.

Thanks for your time and investiagtion.

Comment by Jozef Gloncak [ 09/Sep/14 ]

Reported problem was solved under CONTROLLER-633

Generated at Wed Feb 07 19:53:44 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.