[NETCONF-537] Default operation none when data does not exist in mounted device Created: 16/Apr/18 Updated: 06/Aug/18 Resolved: 06/Aug/18 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | netconf |
| Affects Version/s: | Oxygen |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Medium |
| Reporter: | Marek Gradzki | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
I mounted honeycomb and try to configure BGP route using following PUT: PUT http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/vpp/yang-ext:mount/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/ipv4-route/10.0.0.11%2F32/0 <ipv4-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet"> <path-id>0</path-id> <prefix>10.0.0.11/32</prefix> <attributes> <as-path></as-path> <origin> <value>igp</value> </origin> <local-pref> <pref>100</pref> </local-pref> <ipv4-next-hop> <global>10.11.1.1</global> </ipv4-next-hop> </attributes> </ipv4-route> The request is translated to following <edit-config> : <rpc message-id="m-9" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <candidate/> </target> <default-operation>none</default-operation> <config> <application-rib xmlns="urn:opendaylight:params:xml:ns:yang:bgp-rib"> <id>10.25.1.9</id> <tables> <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi> <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi> <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet"> <ipv4-route xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" a:operation="replace"> <path-id>0</path-id> <prefix>10.0.0.11/32</prefix> <attributes> <origin> <value>igp</value> </origin> <local-pref> <pref>100</pref> </local-pref> <as-path/> <ipv4-next-hop> <global>10.11.1.1</global> </ipv4-next-hop> </attributes> </ipv4-route> </ipv4-routes> </tables> </application-rib> </config> </edit-config> </rpc> But application-rib does not exist:
2018-04-16 18:02:46,378 | TRACE | oupCloseable-3-1 | NetconfDeviceCommunicator | 304 - org.opendaylight.netconf.sal-netconf-connector - 1.7.0 | RemoteDevice{vpp}: Matched request: <rpc message-id="m-6" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<source>
<running/>
</source>
<filter xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:type="subtree">
<application-rib xmlns="urn:opendaylight:params:xml:ns:yang:bgp-rib">
<id>10.25.1.9</id>
</application-rib>
</filter>
</get-config>
</rpc>
to response: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-6">
<data/>
</rpc-reply>
Commit causes honeycomb failure:
2018-04-16 18:03:05,302 | TRACE | oupCloseable-3-1 | NetconfDeviceCommunicator | 304 - org.opendaylight.netconf.sal-netconf-connector - 1.7.0 | RemoteDevice{vpp}: Matched request: <rpc message-id="m-10" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<commit/>
</rpc>
to response: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-10">
<rpc-error>
<error-type>application</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
<error-message>Transaction commit failed on Failed to validate DataTreeModification 1 Cause: Node /(urn:opendaylight:params:xml:ns:yang:bgp-rib?revision=2017-12-07)application-rib does not exist. Cannot apply modification to its children.</error-message>
</rpc-error>
</rpc-reply>
|
| Comments |
| Comment by Marek Gradzki [ 17/Apr/18 ] |
|
When Nitrogen SR2 distro is used issue is also present. Also following request is translated with invalid default operation (works with Oxygen): PUT http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/vpp/yang-ext:mount/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/hc-bgp-instance/bgp/bgp-openconfig-extensions:neighbors/neighbor/10.25.1.9 { "neighbor": { "neighbor-address": "10.25.1.9", "config": { "peer-group": "application-peers" }, "afi-safis": { "afi-safi": [ { "afi-safi-name": "openconfig-bgp-types:IPV4-UNICAST", "receive": true, "send-max": 0 } ] } } } NETCONF request: <rpc message-id="m-27" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <candidate/> </target> <default-operation>none</default-operation> <config> <network-instances xmlns="http://openconfig.net/yang/network-instance"> <network-instance> <name>global-bgp</name> <protocols> <protocol> <name>hc-bgp-instance</name> <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier> <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions"> <neighbors> <neighbor xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" a:operation="replace"> <neighbor-address>10.25.1.9</neighbor-address> <config> <peer-group>application-peers</peer-group> </config> <afi-safis> <afi-safi> <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name> <send-max>0</send-max> <receive>true</receive> </afi-safi> </afi-safis> </neighbor> </neighbors> </bgp> </protocol> </protocols> </network-instance> </network-instances> </config> </edit-config> </rpc>
|