[NETCONF-670] ignore-missing-schema-sources not allowed as input to create-device Created: 23/Apr/20  Updated: 28/Oct/23  Resolved: 01/Aug/20

Status: Resolved
Project: netconf
Component/s: netconf
Affects Version/s: None
Fix Version/s: Aluminium

Type: Bug Priority: Medium
Reporter: Jamo Luhrsen Assignee: Nikhil Soni
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to NETCONF-1192 Duplicate 'ignore-missing-schema-sour... Resolved

 Description   

when attempting to mount a device with this operation:

http://{{controller-ip}}:8181/restconf/operations/netconf-node-topology:create-device

using a body like this (note the ignore-missing-schema-sources element:

{
    "input": {
        "login-password": {
            "password": "password",
            "username": "username"
        },
        "netconf-node-optional:ignore-missing-schema-sources": {
            "reconnect-time": 5000,
            "allowed": true
        },
        "netconf-node-topology:node-id": "{{node}}",
        "actor-response-wait-time": 900,
        "concurrent-rpc-limit": 0,
        "host": "{{testtool-ip}}",
        "sleep-factor": 1,
        "port": 17830,
        "tcp-only": false,
        "connection-timeout-millis": 20000,
        "max-connection-attempts": 0,
        "keepalive-delay": 300,
        "schema-cache-directory": "MX2020-19.3R2.9",
        "between-attempts-timeout-millis": 2000,
        "schemaless": false,
        "default-request-timeout-millis": 600000
    }
}

it is denied with:

{
    "errors": {
        "error": [
            {
                "error-type": "protocol",
                "error-tag": "malformed-message",
                "error-message": "Error parsing input: Schema node with name ignore-missing-schema-sources was not found under (urn:opendaylight:netconf-node-topology?revision=2015-01-14)input.",
                "error-info": "Schema node with name ignore-missing-schema-sources was not found under (urn:opendaylight:netconf-node-topology?revision=2015-01-14)input."
            }
        ]
    }
}

I do not see the the netconf-node-topology.yang loaded, which probably explains it.
Should that module be loaded?



 Comments   
Comment by Jamo Luhrsen [ 02/Jun/20 ]

FYI, a mount to config store like below does work. this is just failing with the create-device RPC:

{
    "network-topology:node": {
        "node-id": "{{node}}",
        "netconf-node-topology:host": "{{testtool-ip}}",
        "schema-cache-directory": "{{testtool-ip}}",
        "netconf-node-topology:port": 830,
        "netconf-node-topology:tcp-only": false,
        "netconf-node-topology:username": "jamo",
        "netconf-node-topology:password": "jamo123",
        "netconf-node-topology:actor-response-wait-time": 60,
        "netconf-node-topology:keepalive-delay": 60,
        "netconf-node-optional:ignore-missing-schema-sources": {
            "reconnect-time": 2000,
            "allowed": true
        }
    }
}
Comment by Nikhil Soni [ 15/Jun/20 ]

jluhrsen
Please give URL also for this config store which is working.

Comment by Jamo Luhrsen [ 16/Jun/20 ]

nikhil.soni.lumina,

this is the working case:

PUT to:

http://{{controller-ip}}:8181/restconf/config/network-topology:network-topology/topology/topology-netconf

with body:

{
    "network-topology:node": {
        "node-id": "{{node}}2",
        "netconf-node-topology:host": "{{testtool-ip}}",
        "netconf-node-topology:port": 830,
        "netconf-node-topology:tcp-only": false,
        "netconf-node-topology:username": "jamo",
        "netconf-node-topology:password": "jamo123",
        "netconf-node-topology:actor-response-wait-time": 600,
        "netconf-node-topology:keepalive-delay": 600,
        "netconf-node-optional:ignore-missing-schema-sources": {
            "reconnect-time": 5000,
            "allowed": true
        }
    }
}

vs the failing case described above using the create-device RPC

Comment by Nikhil Soni [ 16/Jun/20 ]

jluhrsen

I have investigated the issue and have found below points -

1. There is a Yang file named netconf-node-optional which has augment for Node "/nt:network-topology/nt:topology/nt:node". This augment enables extra fields in network-topology->topolpgy->node but not for the rpc.

2. if we call "restconf/operations/netconf-node-topology:create-device" with above augment fields then in RestConf filter it throws "ignore-missing-schema-sources was not found" which is valid.

To justify point 2, at local I changed netconf-node-optional augment with augment "/nt:create-device/nt:input/"
then I executed the rpc URL with same payload and it worked in unit test.

With above points, it does not look that it is an issue.

Please suggest if you have any other point of view.

Comment by Jamo Luhrsen [ 17/Jun/20 ]

nikhil.soni.lumina, it sounds like you have the fix right? You can include the unit test with the augment change.

But, I'm not sure we are on the same page because you said "it does not look that it is an issue."

let me know what you think.

Comment by Nikhil Soni [ 18/Jun/20 ]

jluhrsen
Rewording my reply without example -

There is a Yang file named netconf-node-optional which has augment for Node "/nt:network-topology/nt:topology/nt:node".

So according to this file only "/restconf/config/network-topology:network-topology/topology/topology-netconf" Rest call will work with "ignore-missing-schema-sources" payload field.

So according to "netconf-node-optional" Yang file below scenarios are valid -

1. Rest call /restconf/operations/netconf-node-topology:create-device should throw exception "Schema node with name ignore-missing-schema-sources was not found under" if we pass ignore-missing-schema-sources field in payload - it is happening in current implementation

2.Rest call /restconf/config/network-topology:network-topology/topology/topology-netconf should accept "ignore-missing-schema-sources" field - it is happening in current implementation

Comment by Tejas Nevrekar [ 18/Jun/20 ]

nikhil.soni.lumina as discussed, please go ahead and raise a gerrit with the augmentation change.

Generated at Wed Feb 07 20:15:36 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.