With old yang model files it seems work (I can get some configs), but I can not to configure nothing. When I try to do config action, like this with Cisco XRv - no errors (returns 200OK), no log events, but configuration just does not apply to device...
Sample of config post: PUT http://192.168.5.199:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/PE-2/yang-ext:mount/configuration:configuration/interfaces/interface/ge-0%2F0%2F1 { "interface": [ { "name": "ge-0/0/1", "disable": [ null ], "unit": [ { "name": "0", "family": { "iso": {}, "inet": { "address": [ { "name": "192.168.1.2/30" } ] }, "mpls": {} } } ], "description": "PE1-to-PE2-TEST" } ] } With fresh versions of Junos yang models from github (for 16.1R3), I also have no success: Sucessfully add device and check connection, but then I try to get config data - error appears. Before this test I remove PE1 and PE-2 nodes, delete old juniper yang files from cache/schema and restart ODL. In log file, I can see message with link to old yang model: ( Unknown child(ren) node(s) detected, identified by: ( http://xml.juniper.net/xnm/1.1/xnm)configuration, in: org.opendaylight.netconf.sal.connect.netconf.util.NodeContainerProxy@4b6c924e]]} ), may be it cached somethere? Add device: PUT http://192.168.5.199:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/PE-1 <node xmlns="urn:TBD:params:xml:ns:yang:network-topology"> <node-id>PE-1</node-id> <host xmlns="urn:opendaylight:netconf-node-topology">172.16.16.1</host> <port xmlns="urn:opendaylight:netconf-node-topology">830</port> <username xmlns="urn:opendaylight:netconf-node-topology">root</username> <password xmlns="urn:opendaylight:netconf-node-topology">passw0rd</password> <tcp-only xmlns="urn:opendaylight:netconf-node-topology">false</tcp-only> <keepalive-delay xmlns="urn:opendaylight:netconf-node-topology">0</keepalive-delay> <yang-module-capabilities xmlns="urn:opendaylight:netconf-node-topology"> <capability> http://yang.juniper.net/yang/1.1/je?module=junos-extension&revision=2017-02-20 </capability> <capability> http://yang.juniper.net/yang/1.1/jc?module=configuration&revision=2017-02-20 </capability> </yang-module-capabilities> </node> Check: GET http://192.168.5.199:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/PE-1 { "node": [ { "node-id": "PE-1", "netconf-node-topology:available-capabilities": { "available-capability": [ "urn:ietf:params:netconf:capability:confirmed-commit:1.0", "urn:ietf:params:netconf:capability:candidate:1.0", "urn:ietf:params:xml:ns:netconf:capability:confirmed-commit:1.0", "urn:ietf:params:netconf:capability:validate:1.0", "http://xml.juniper.net/netconf/junos/1.0", "urn:ietf:params:xml:ns:netconf:base:1.0", "urn:ietf:params:xml:ns:netconf:capability:url:1.0?protocol=http,ftp,file", "urn:ietf:params:netconf:base:1.0", "urn:ietf:params:xml:ns:netconf:capability:validate:1.0", "urn:ietf:params:xml:ns:netconf:capability:candidate:1.0", "( http://yang.juniper.net/yang/1.1/je?revision=2017-02-20)junos-extension", "( http://yang.juniper.net/yang/1.1/jc?revision=2017-02-20)configuration", "http://xml.juniper.net/dmi/system/1.0", "urn:ietf:params:netconf:capability:url:1.0?scheme=http,ftp,file" ] }, "netconf-node-topology:host": "172.16.16.1", "netconf-node-topology:unavailable-capabilities": {}, "netconf-node-topology:connection-status": "connected", "netconf-node-topology:port": 830 } ] } Try to get config: GET http://192.168.5.199:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/PE-1/yang-ext:mount/configuration:configuration/system/services { "errors": { "error": [ { "error-type": "application", "error-tag": "data-missing", "error-message": "Request could not be completed because the relevant data model content does not exist " } ] } } Karaf.log filtered to netconf: root@osboxes:~/odl/data/log# tail -f karaf.log | grep etconf 2017-02-21 15:59:27,668 | WARN | oupCloseable-3-6 | NetconfXMLToMessageDecoder | 321 - org.opendaylight.netconf.netty-util - 1.1.2.Boron-SR2 | XML message with unwanted leading bytes detected. Discarded the 1 leading byte(s): '0a' 2017-02-21 15:59:27,669 | WARN | oupCloseable-3-6 | ReadOnlyTx | 327 - org.opendaylight.netconf.sal-netconf-connector - 1.4.2.Boron-SR2 | RemoteDevice{PE-1}: Reading data failed java.lang.IllegalStateException: Unknown child(ren) node(s) detected, identified by: (http://xml.juniper.net/xnm/1.1/xnm)configuration, in: org.opendaylight.netconf.sal.connect.netconf.util.NodeContainerProxy@4b6c924e at org.opendaylight.netconf.sal.connect.netconf.schema.mapping.NetconfMessageTransformer.toRpcResult(NetconfMessageTransformer.java:186)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.schema.mapping.NetconfMessageTransformer.toRpcResult(NetconfMessageTransformer.java:57)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceRpc$2.apply(NetconfDeviceRpc.java:68)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceRpc$2.apply(NetconfDeviceRpc.java:64)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.listener.UncancellableFuture.set(UncancellableFuture.java:44)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator.processMessage(NetconfDeviceCommunicator.java:325)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator.onMessage(NetconfDeviceCommunicator.java:262)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator.onMessage(NetconfDeviceCommunicator.java:49)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.nettyutil.AbstractNetconfSession.handleMessage(AbstractNetconfSession.java:64)[321:org.opendaylight.netconf.netty-util:1.1.2.Boron-SR2] at org.opendaylight.netconf.nettyutil.AbstractNetconfSession.handleMessage(AbstractNetconfSession.java:35)[321:org.opendaylight.netconf.netty-util:1.1.2.Boron-SR2] 2017-02-21 15:59:27,671 | WARN | oupCloseable-3-6 | BrokerFacade | 267 - org.opendaylight.netconf.sal-rest-connector - 1.4.2.Boron-SR2 | Exception by reading CONFIGURATION via Restconf: /( http://yang.juniper.net/yang/1.1/jc?revision=2017-02-20)configuration/system/services ReadFailedException{message=read execution failed, errorList=[RpcError [message=read execution failed, severity=ERROR, errorType=APPLICATION, tag=operation-failed, applicationTag=null, info=null, cause=java.lang.IllegalStateException: Unknown child(ren) node(s) detected, identified by: (http://xml.juniper.net/xnm/1.1/xnm)configuration, in: org.opendaylight.netconf.sal.connect.netconf.util.NodeContainerProxy@4b6c924e ]]} at org.opendaylight.netconf.sal.connect.netconf.listener.UncancellableFuture.set(UncancellableFuture.java:44)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator.processMessage(NetconfDeviceCommunicator.java:325)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator.onMessage(NetconfDeviceCommunicator.java:262)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator.onMessage(NetconfDeviceCommunicator.java:49)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.nettyutil.AbstractNetconfSession.handleMessage(AbstractNetconfSession.java:64)[321:org.opendaylight.netconf.netty-util:1.1.2.Boron-SR2] at org.opendaylight.netconf.nettyutil.AbstractNetconfSession.handleMessage(AbstractNetconfSession.java:35)[321:org.opendaylight.netconf.netty-util:1.1.2.Boron-SR2] Caused by: java.lang.IllegalStateException: Unknown child(ren) node(s) detected, identified by: (http://xml.juniper.net/xnm/1.1/xnm)configuration, in: org.opendaylight.netconf.sal.connect.netconf.util.NodeContainerProxy@4b6c924e at org.opendaylight.netconf.sal.connect.netconf.schema.mapping.NetconfMessageTransformer.toRpcResult(NetconfMessageTransformer.java:186)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.schema.mapping.NetconfMessageTransformer.toRpcResult(NetconfMessageTransformer.java:57)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceRpc$2.apply(NetconfDeviceRpc.java:68)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceRpc$2.apply(NetconfDeviceRpc.java:64)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException: errors: [RestconfError [error-type: application, error-tag: operation-failed, error-message: Problem to get data from transaction., error-info: ReadFailedException{message=read execution failed, errorList=[RpcError [message=read execution failed, severity=ERROR, errorType=APPLICATION, tag=operation-failed, applicationTag=null, info=null, cause=java.lang.IllegalStateException: Unknown child(ren) node(s) detected, identified by: ( http://xml.juniper.net/xnm/1.1/xnm)configuration, in: org.opendaylight.netconf.sal.connect.netconf.util.NodeContainerProxy@4b6c924e ]]} at org.opendaylight.netconf.sal.connect.netconf.listener.UncancellableFuture.set(UncancellableFuture.java:44) at org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator.processMessage(NetconfDeviceCommunicator.java:325) at org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator.onMessage(NetconfDeviceCommunicator.java:262) at org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator.onMessage(NetconfDeviceCommunicator.java:49) at org.opendaylight.netconf.nettyutil.AbstractNetconfSession.handleMessage(AbstractNetconfSession.java:64) at org.opendaylight.netconf.nettyutil.AbstractNetconfSession.handleMessage(AbstractNetconfSession.java:35) Caused by: java.lang.IllegalStateException: Unknown child(ren) node(s) detected, identified by: (http://xml.juniper.net/xnm/1.1/xnm)configuration, in: org.opendaylight.netconf.sal.connect.netconf.util.NodeContainerProxy@4b6c924e at org.opendaylight.netconf.sal.connect.netconf.schema.mapping.NetconfMessageTransformer.toRpcResult(NetconfMessageTransformer.java:186) at org.opendaylight.netconf.sal.connect.netconf.schema.mapping.NetconfMessageTransformer.toRpcResult(NetconfMessageTransformer.java:57) at org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceRpc$2.apply(NetconfDeviceRpc.java:68) at org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceRpc$2.apply(NetconfDeviceRpc.java:64) at org.opendaylight.netconf.sal.restconf.impl.BrokerFacade.handlingCallback(BrokerFacade.java:686)[267:org.opendaylight.netconf.sal-rest-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.restconf.impl.BrokerFacade$2.onFailure(BrokerFacade.java:442)[267:org.opendaylight.netconf.sal-rest-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.listener.UncancellableFuture.set(UncancellableFuture.java:44)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator.processMessage(NetconfDeviceCommunicator.java:325)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator.onMessage(NetconfDeviceCommunicator.java:262)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator.onMessage(NetconfDeviceCommunicator.java:49)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.nettyutil.AbstractNetconfSession.handleMessage(AbstractNetconfSession.java:64)[321:org.opendaylight.netconf.netty-util:1.1.2.Boron-SR2] at org.opendaylight.netconf.nettyutil.AbstractNetconfSession.handleMessage(AbstractNetconfSession.java:35)[321:org.opendaylight.netconf.netty-util:1.1.2.Boron-SR2] Caused by: ReadFailedException{message=read execution failed, errorList=[RpcError [message=read execution failed, severity=ERROR, errorType=APPLICATION, tag=operation-failed, applicationTag=null, info=null, cause=java.lang.IllegalStateException: Unknown child(ren) node(s) detected, identified by: ( http://xml.juniper.net/xnm/1.1/xnm)configuration, in: org.opendaylight.netconf.sal.connect.netconf.util.NodeContainerProxy@4b6c924e ]]} Caused by: java.lang.IllegalStateException: Unknown child(ren) node(s) detected, identified by: (http://xml.juniper.net/xnm/1.1/xnm)configuration, in: org.opendaylight.netconf.sal.connect.netconf.util.NodeContainerProxy@4b6c924e at org.opendaylight.netconf.sal.connect.netconf.schema.mapping.NetconfMessageTransformer.toRpcResult(NetconfMessageTransformer.java:186)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.schema.mapping.NetconfMessageTransformer.toRpcResult(NetconfMessageTransformer.java:57)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceRpc$2.apply(NetconfDeviceRpc.java:68)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceRpc$2.apply(NetconfDeviceRpc.java:64)[327:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] ^C 2017-02-21 15:52 GMT+03:00 Ryan Goulding <ryandgould...@gmail.com>: > Yes; odl-netconf-topology is required for spawning via topology > configuration in a single node deployment. odl-netconf-clustered-topology > provides clustering support, and will should also work in a single node > deployment scenario. However, please don't try to install both features at > once, as it is document that they will interfere with each other :). > > Glad you were able to get up and running with ODL + JunOS! > > Regards, > > Ryan > > On Tue, Feb 21, 2017 at 3:00 AM, Roman Mavrichev < > roman.mavric...@gmail.com> wrote: > >> I have had install (probably this module is not istalled by default) >> odl-netconf-topology (in karaf shell: feature:install >> odl-netconf-topology ) and after restarting of ODL I can see PE-2 adn >> xrv-P1 nodes at operational datastore too. Also, I`am able to get config >> portions of these nodes over REST (Postman). I will try again later with >> latest version of Junos yang from github (for 16.1 junos release). >> >> Put node to config datastore: PUT http://192.168.5.199:8181/ >> restconf/config/network-topology:network-topology/topology/ >> topology-netconf/node/PE-2 >> <node xmlns="urn:TBD:params:xml:ns:yang:network-topology"> >> <node-id>PE-2</node-id> >> <host xmlns="urn:opendaylight:netconf-node-topology">172.16.16.2</ >> host> >> <port xmlns="urn:opendaylight:netconf-node-topology">830</port> >> <username xmlns="urn:opendaylight:netconf-node-topology">root</usernam >> e> >> <password xmlns="urn:opendaylight:netconf-node-topology">passw0rd</ >> password> >> <tcp-only xmlns="urn:opendaylight:netconf-node-topology">false</tcp- >> only> >> <keepalive-delay xmlns="urn:opendaylight:netcon >> f-node-topology">0</keepalive-delay> >> <yang-module-capabilities xmlns="urn:opendaylight:netcon >> f-node-topology"> >> <capability>http://xml.juniper.net/xnm/1.1/xnm?module= >> configuration&revision=2014-11-13</capability> >> </yang-module-capabilities> >> </node> >> >> Show config datastore: GET http://192.168.5.199:8181/ >> restconf/config/network-topology:network-topology/topology/ >> topology-netconf/ >> { >> "topology": [ >> { >> "topology-id": "topology-netconf", >> "node": [ >> { >> "node-id": "xrv-P1", >> "netconf-node-topology:host": "172.16.17.1", >> "netconf-node-topology:password": "passw0rd", >> "netconf-node-topology:username": "rmavrichev", >> "netconf-node-topology:port": 830, >> "netconf-node-topology:tcp-only": false, >> "netconf-node-topology:keepalive-delay": 0 >> }, >> { >> "node-id": "PE-2", >> "netconf-node-topology:pass-through": {}, >> "netconf-node-topology:keepalive-delay": 0, >> "netconf-node-topology:host": "172.16.16.2", >> "netconf-node-topology:password": "passw0rd", >> "netconf-node-topology:username": "root", >> "netconf-node-topology:yang-module-capabilities": { >> "override": false, >> "capability": [ >> "http://xml.juniper.net/xnm/1. >> 1/xnm?module=configuration&revision=2014-11-13" >> ] >> }, >> "netconf-node-topology:port": 830, >> "netconf-node-topology:tcp-only": false >> } >> ], >> "topology-types": { >> "l3-unicast-igp-topology:l3-unicast-igp-topology": { >> "ospf-topology:ospf": {}, >> "isis-topology:isis": {} >> }, >> "odl-bgp-topology-types:bgp-linkstate-topology": {}, >> "odl-bgp-topology-types:bgp-ipv6-reachability-topology": {}, >> "odl-bgp-topology-types:bgp-ipv4-reachability-topology": {}, >> "network-topology-pcep:topology-pcep": {}, >> "netconf-node-topology:topology-netconf": {}, >> "topology-tunnel-pcep:topology-tunnel-pcep": {}, >> "topology-tunnel:topology-tunnel": {} >> } >> } >> ] >> } >> >> Operational datastore, node PE-2: GET http://192.168.5.199:8181/ >> restconf/operational/network-topology:network-topology/topol >> ogy/topology-netconf/node/PE-2 >> { >> "node": [ >> { >> "node-id": "PE-2", >> "netconf-node-topology:available-capabilities": { >> "available-capability": [ >> "urn:ietf:params:netconf:capability:confirmed-commit:1.0", >> "urn:ietf:params:netconf:capability:candidate:1.0", >> "urn:ietf:params:xml:ns:netconf:capability:confirmed-commit: >> 1.0", >> "urn:ietf:params:netconf:capability:validate:1.0", >> "http://xml.juniper.net/netconf/junos/1.0", >> "urn:ietf:params:xml:ns:netconf:base:1.0", >> "urn:ietf:params:xml:ns:netconf:capability:url:1.0?protocol= >> http,ftp,file", >> "urn:ietf:params:netconf:base:1.0", >> "urn:ietf:params:xml:ns:netconf:capability:validate:1.0", >> "urn:ietf:params:xml:ns:netconf:capability:candidate:1.0", >> "(http://xml.juniper.net/xnm/1.1/xnm?revision=2014-11-13)con >> figuration", >> "http://xml.juniper.net/dmi/system/1.0", >> "urn:ietf:params:netconf:capability:url:1.0?scheme=http,ftp, >> file" >> ] >> }, >> "netconf-node-topology:host": "172.16.16.2", >> "netconf-node-topology:unavailable-capabilities": {}, >> "netconf-node-topology:connection-status": "connected", >> "netconf-node-topology:port": 830 >> } >> ] >> } >> >> Get config portion of PE-2: GET http://192.168.5.199:8181/ >> restconf/config/network-topology:network-topology/topology/ >> topology-netconf/node/PE-2/yang-ext:mount/configuration: >> configuration/system/services >> { >> "services": { >> "ssh": { >> "protocol-version": [ >> "v2" >> ] >> }, >> "netconf": { >> "ssh": { >> "port": 830 >> } >> } >> } >> } >> >> >> Thanks all for cooperation. >> >> 2017-02-20 23:44 GMT+03:00 Evgeny Zobnitsev <e...@fgts.ru>: >> >>> Roman, >>> >>> The operational datastore is not working for me yet too …. >>> >>> What you see in the config datastore ? >>> >>> Evgeny >>> >>> On 20 Feb 2017, at 20:11, Roman Mavrichev <roman.mavric...@gmail.com> >>> wrote: >>> >>> I tried to remount two devices (Junos and IOS XRv) with new method [0], >>> as Ryan said. Junos don`t list his capabilities in hello, so I added it >>> manually (old but working file from Yang Labs) : >>> >>> PUT http://192.168.5.199:8181/restconf/config/network-topolo >>> gy:network-topology/topology/topology-netconf/node/PE-2 >>> <node xmlns="urn:TBD:params:xml:ns:yang:network-topology"> >>> <node-id>PE-2</node-id> >>> <host xmlns="urn:opendaylight:netconf-node-topology">172.16.16.2</ >>> host> >>> <port xmlns="urn:opendaylight:netconf-node-topology">830</port> >>> <username xmlns="urn:opendaylight:netcon >>> f-node-topology">root</username> >>> <password xmlns="urn:opendaylight:netcon >>> f-node-topology">passw0rd</password> >>> <tcp-only xmlns="urn:opendaylight:netcon >>> f-node-topology">false</tcp-only> >>> <keepalive-delay xmlns="urn:opendaylight:netcon >>> f-node-topology">0</keepalive-delay> >>> <yang-module-capabilities xmlns="urn:opendaylight:netcon >>> f-node-topology"> >>> <capability>http://xml.juniper.net/xnm/1.1/xnm?module=config >>> uration&revision=2014-11-13</capability> >>> </yang-module-capabilities> >>> </node> >>> >>> PUT http://192.168.5.199:8181/restconf/config/network-topolo >>> gy:network-topology/topology/topology-netconf/node/xrv-P1 >>> <node xmlns="urn:TBD:params:xml:ns:yang:network-topology"> >>> <node-id>xrv-P1</node-id> >>> <host xmlns="urn:opendaylight:netconf-node-topology">172.16.17.1</ >>> host> >>> <port xmlns="urn:opendaylight:netconf-node-topology">830</port> >>> <username xmlns="urn:opendaylight:netcon >>> f-node-topology">rmavrichev</username> >>> <password xmlns="urn:opendaylight:netcon >>> f-node-topology">passw0rd</password> >>> <tcp-only xmlns="urn:opendaylight:netcon >>> f-node-topology">false</tcp-only> >>> <keepalive-delay xmlns="urn:opendaylight:netcon >>> f-node-topology">0</keepalive-delay> >>> </node> >>> >>> Then, check it: I see these hosts in config datastore: >>> >>> GET http://192.168.5.199:8181/restconf/config/network-topolo >>> gy:network-topology/topology/topology-netconf/ >>> "topology": [ >>> { >>> "topology-id": "topology-netconf", >>> "node": [ >>> { >>> "node-id": "xrv-P1", >>> "netconf-node-topology:host": "172.16.17.1", >>> "netconf-node-topology:password": "passw0rd", >>> "netconf-node-topology:username": "rmavrichev", >>> "netconf-node-topology:port": 830, >>> "netconf-node-topology:tcp-only": false, >>> "netconf-node-topology:keepalive-delay": 0 >>> }, >>> { >>> "node-id": "PE-2", >>> "netconf-node-topology:pass-through": {}, >>> "netconf-node-topology:keepalive-delay": 0, >>> "netconf-node-topology:host": "172.16.16.2", >>> "netconf-node-topology:password": "passw0rd", >>> "netconf-node-topology:username": "root", >>> "netconf-node-topology:yang-module-capabilities": { >>> "override": false, >>> "capability": [ >>> "http://xml.juniper.net/xnm/1. >>> 1/xnm?module=configuration&revision=2014-11-13" >>> ] >>> }, >>> "netconf-node-topology:port": 830, >>> "netconf-node-topology:tcp-only": false >>> } >>> >>> After that I restarted ODL. >>> But when I trying to view operational datastore (GET >>> http://192.168.5.199:8181/restconf/operational/network- >>> topology:network-topology/topology/topology-netconf/) - these hosts >>> absent... >>> >>> Also, no data about reconfigured hosts xrv-P1 and PE-2 exists int >>> karaf.log after restart. >>> >>> >>> >>> >>> >>> 2017-02-20 17:51 GMT+03:00 Robert Varga <n...@hq.sk>: >>> >>>> On 02/20/2017 03:38 PM, Ryan Goulding wrote: >>>> > Three things: >>>> > >>>> > 1) The restart is needed to initiate re-parse of the yang files and >>>> > schema context assembly >>>> > 2) You are mounting using an old method. Please use [0]. Please also >>>> > consider specifying a custom schema cache so that device yang is >>>> honored >>>> > over ODL yang (just in case). >>>> > 3) Please attach a log. It is very hard to say without having access >>>> to >>>> > karaf.log. >>>> >>>> 4) +netconf-dev :) >>>> >>>> Bye, >>>> Robert >>>> >>>> > >>>> > Regards, >>>> > >>>> > Ryan Goulding >>>> > >>>> > [0] https://wiki.opendaylight.org/view/OpenDaylight_Controll >>>> er:Config:Examples:Netconf#Spawning_netconf_connectors_via_ >>>> topology_configuration >>>> > >>>> > On Mon, Feb 20, 2017 at 9:28 AM, Roman Mavrichev >>>> > <roman.mavric...@gmail.com <mailto:roman.mavric...@gmail.com>> wrote: >>>> > >>>> > I got usable NETCONF ODL (0.5.2-Boron-SR2) connector with Junos >>>> (VMX >>>> > 16.1r10). >>>> > >>>> > 1. Get yang model for Junos from >>>> > https://forums.juniper.net/t5/Automation/Yang-Labs-Tools/ta >>>> -p/294320 >>>> > <https://forums.juniper.net/t5/Automation/Yang-Labs-Tools/t >>>> a-p/294320> >>>> > (https://forums.juniper.net/jnet/attachments/jnet/Automatio >>>> n_Scripting/591.2/1/configuration-142.yang.txt >>>> > <https://forums.juniper.net/jnet/attachments/jnet/Automatio >>>> n_Scripting/591.2/1/configuration-142.yang.txt>) >>>> > >>>> > 2. Put it to cache/schema as configurat...@2014-11-13.yang >>>> > >>>> > 3. Restart ODL (I don`t sure what it`s really need, but I did it) >>>> > >>>> > 4. Use POSTMAN to add NetconfDevice (POST): >>>> > <module xmlns="urn:opendaylight:params >>>> :xml:ns:yang:controller:config"> >>>> > <type >>>> > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controlle >>>> r:md:sal:connector:netconf">prefix:sal-netconf-connector</type> >>>> > <name>PE-1</name> >>>> > <address >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf">172.16.16.1</address> >>>> > <port >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf">830</port> >>>> > <username >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf">root</username> >>>> > <password >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf">passw0rd</password> >>>> > <tcp-only >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf">false</tcp-only> >>>> > <yang-module-capabilities >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf"> >>>> > <capability>http://xml.juniper.net/xnm/1.1/xnm?module=confi >>>> guration&revision=2014-11-13 >>>> > <http://xml.juniper.net/xnm/1.1/xnm?module=configuration&am >>>> p;revision=2014-11-13></capability> >>>> > </yang-module-capabilities> >>>> > <event-executor >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf"> >>>> > <type >>>> > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controlle >>>> r:netty">prefix:netty-event-executor</type> >>>> > <name>global-event-executor</name> >>>> > </event-executor> >>>> > <binding-registry >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf"> >>>> > <type >>>> > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controlle >>>> r:md:sal:binding">prefix:binding-broker-osgi-registry</type> >>>> > <name>binding-osgi-broker</name> >>>> > </binding-registry> >>>> > <dom-registry >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf"> >>>> > <type >>>> > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controlle >>>> r:md:sal:dom">prefix:dom-broker-osgi-registry</type> >>>> > <name>dom-broker</name> >>>> > </dom-registry> >>>> > <client-dispatcher >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf"> >>>> > <type >>>> > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controlle >>>> r:config:netconf">prefix:netconf-client-dispatcher</type> >>>> > <name>global-netconf-dispatcher</name> >>>> > </client-dispatcher> >>>> > <processing-executor >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf"> >>>> > <type >>>> > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controlle >>>> r:threadpool">prefix:threadpool</type> >>>> > <name>global-netconf-processing-executor</name> >>>> > </processing-executor> >>>> > <keepalive-executor >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf"> >>>> > <type >>>> > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controlle >>>> r:threadpool">prefix:scheduled-threadpool</type> >>>> > <name>global-netconf-ssh-scheduled-executor</name> >>>> > </keepalive-executor> >>>> > </module> >>>> > >>>> > 4. Use POSTMAN to view Netconf topology (GET) >>>> > http://192.168.5.199:8181/restconf/operational/network-topo >>>> logy:network-topology/topology/topology-netconf/ >>>> > <http://192.168.5.199:8181/restconf/operational/network-top >>>> ology:network-topology/topology/topology-netconf/> >>>> > , device should have status "connected" with some capabilities >>>> like >>>> > this: >>>> > { >>>> > "node-id": "PE-1", >>>> > "netconf-node-topology:available-capabilities": { >>>> > "available-capability": [ >>>> > "urn:ietf:params:netconf:capa >>>> bility:confirmed-commit:1.0", >>>> > "urn:ietf:params:netconf:capability:candidate:1.0", >>>> > >>>> > "urn:ietf:params:xml:ns:netconf:capability:confirmed-commit:1.0", >>>> > "urn:ietf:params:netconf:capability:validate:1.0", >>>> > "http://xml.juniper.net/netconf/junos/1.0 >>>> > <http://xml.juniper.net/netconf/junos/1.0>", >>>> > "urn:ietf:params:xml:ns:netconf:base:1.0", >>>> > >>>> > "urn:ietf:params:xml:ns:netconf:capability:url:1.0?protocol >>>> =http,ftp,file", >>>> > "urn:ietf:params:netconf:base:1.0", >>>> > "urn:ietf:params:xml:ns:netco >>>> nf:capability:validate:1.0", >>>> > "urn:ietf:params:xml:ns:netco >>>> nf:capability:candidate:1.0", >>>> > >>>> > "(http://xml.juniper.net/xnm/1.1/xnm?revision=2014-11-13)co >>>> nfiguration >>>> > <http://xml.juniper.net/xnm/1.1/xnm?revision=2014-11-13)con >>>> figuration>", >>>> > "http://xml.juniper.net/dmi/system/1.0 >>>> > <http://xml.juniper.net/dmi/system/1.0>", >>>> > >>>> > "urn:ietf:params:netconf:capability:url:1.0?scheme=http,ftp,file" >>>> > ] >>>> > }, >>>> > "netconf-node-topology:host": "172.16.16.1", >>>> > "netconf-node-topology:unavailable-capabilities": {}, >>>> > "netconf-node-topology:connection-status": "connected", >>>> > "netconf-node-topology:port": 830 >>>> > }, >>>> > >>>> > 5. Try to get some config portion of device via REST (Use POSTMAN: >>>> > GET >>>> > http://192.168.5.199:8181/restconf/config/network-topology: >>>> network-topology/topology/topology-netconf/node/PE-1/yang-ex >>>> t:mount/configuration:configuration/system/services >>>> > <http://192.168.5.199:8181/restconf/config/network-topology >>>> :network-topology/topology/topology-netconf/node/PE-1/yang-e >>>> xt:mount/configuration:configuration/system/services> >>>> > ) >>>> > Result: >>>> > >>>> > { >>>> > "services": { >>>> > "ssh": { >>>> > "protocol-version": [ >>>> > "v2" >>>> > ] >>>> > }, >>>> > "netconf": { >>>> > "ssh": { >>>> > "port": 830 >>>> > } >>>> > } >>>> > } >>>> > } >>>> > >>>> > >>>> > I also tried to use with ODL a newer yang models from Juniper ( >>>> > available from https://github.com/Juniper/yang/tree/master/16.1 >>>> > <https://github.com/Juniper/yang/tree/master/16.1>) , >>>> > configuration.yang and junos-extension.yang, but withous success. >>>> > I had put it to cache/schema, add revision strings (to filenames >>>> and >>>> > also inside yang file), succesfull register device with ODL - but >>>> > can`t get any config data. Sad but true. >>>> > >>>> > Sample: >>>> > root@osboxes:~/odl/cache/schema# head -21 >>>> configurat...@2017-02-20.yang >>>> > /* >>>> > * Copyright (c) 2016 Juniper Networks, Inc. >>>> > * All rights reserved. >>>> > */ >>>> > >>>> > module configuration { >>>> > namespace "http://yang.juniper.net/yang/1.1/jc >>>> > <http://yang.juniper.net/yang/1.1/jc>"; >>>> > prefix jc; >>>> > import junos-extension { >>>> > prefix junos; >>>> > } >>>> > >>>> > organization >>>> > "Juniper Networks, Inc."; >>>> > >>>> > description >>>> > "Junos YANG module for configuration hierarchies"; >>>> > >>>> > revision "2017-02-20" { >>>> > description "Initial revision"; >>>> > } >>>> > root@osboxes:~/odl/cache/schema# head -19 >>>> > junos-extens...@2017-02-20.yang >>>> > /* >>>> > * Copyright (c) 2016 Juniper Networks, Inc. >>>> > * All rights reserved. >>>> > */ >>>> > >>>> > module junos-extension { >>>> > namespace "http://yang.juniper.net/yang/1.1/je >>>> > <http://yang.juniper.net/yang/1.1/je>"; >>>> > prefix junos; >>>> > >>>> > organization >>>> > "Juniper Networks, Inc."; >>>> > >>>> > description >>>> > "This module contains definitions for Junos YANG extensions."; >>>> > >>>> > revision "2017-02-20" { >>>> > description "Initial revision"; >>>> > } >>>> > >>>> > root@osboxes:~/odl/cache/schema# >>>> > >>>> > <module xmlns="urn:opendaylight:params >>>> :xml:ns:yang:controller:config"> >>>> > <type >>>> > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controlle >>>> r:md:sal:connector:netconf">prefix:sal-netconf-connector</type> >>>> > <name>PE-1</name> >>>> > <address >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf">172.16.16.1</address> >>>> > <port >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf">830</port> >>>> > <username >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf">root</username> >>>> > <password >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf">passw0rd</password> >>>> > <tcp-only >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf">false</tcp-only> >>>> > <yang-module-capabilities >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf"> >>>> > <capability >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf">http://yang.juniper.net/yang/1.1/je?mod >>>> ule=junos-extension&revision=2017-02-20 >>>> > <http://yang.juniper.net/yang/1.1/je?module=junos-extension >>>> &revision=2017-02-20></capability> >>>> > <capability >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf">http://yang.juniper.net/yang/1.1/jc?mod >>>> ule=configuration&revision=2017-02-20 >>>> > <http://yang.juniper.net/yang/1.1/jc?module=configuration&a >>>> mp;revision=2017-02-20></capability> >>>> > </yang-module-capabilities> >>>> > <event-executor >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf"> >>>> > <type >>>> > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controlle >>>> r:netty">prefix:netty-event-executor</type> >>>> > <name>global-event-executor</name> >>>> > </event-executor> >>>> > <binding-registry >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf"> >>>> > <type >>>> > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controlle >>>> r:md:sal:binding">prefix:binding-broker-osgi-registry</type> >>>> > <name>binding-osgi-broker</name> >>>> > </binding-registry> >>>> > <dom-registry >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf"> >>>> > <type >>>> > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controlle >>>> r:md:sal:dom">prefix:dom-broker-osgi-registry</type> >>>> > <name>dom-broker</name> >>>> > </dom-registry> >>>> > <client-dispatcher >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf"> >>>> > <type >>>> > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controlle >>>> r:config:netconf">prefix:netconf-client-dispatcher</type> >>>> > <name>global-netconf-dispatcher</name> >>>> > </client-dispatcher> >>>> > <processing-executor >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf"> >>>> > <type >>>> > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controlle >>>> r:threadpool">prefix:threadpool</type> >>>> > <name>global-netconf-processing-executor</name> >>>> > </processing-executor> >>>> > <keepalive-executor >>>> > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sa >>>> l:connector:netconf"> >>>> > <type >>>> > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controlle >>>> r:threadpool">prefix:scheduled-threadpool</type> >>>> > <name>global-netconf-ssh-scheduled-executor</name> >>>> > </keepalive-executor> >>>> > </module> >>>> > >>>> > >>>> > >>>> > _______________________________________________ >>>> > controller-dev mailing list >>>> > controller-dev@lists.opendaylight.org >>>> > <mailto:controller-dev@lists.opendaylight.org> >>>> > https://lists.opendaylight.org/mailman/listinfo/controller-dev >>>> > <https://lists.opendaylight.org/mailman/listinfo/controller-dev> >>>> > >>>> > >>>> > >>>> > >>>> > _______________________________________________ >>>> > controller-dev mailing list >>>> > controller-dev@lists.opendaylight.org >>>> > https://lists.opendaylight.org/mailman/listinfo/controller-dev >>>> > >>>> >>>> >>> <karaf.log>_______________________________________________ >>> netconf-dev mailing list >>> netconf-...@lists.opendaylight.org >>> https://lists.opendaylight.org/mailman/listinfo/netconf-dev >>> >>> >>> >> >> _______________________________________________ >> netconf-dev mailing list >> netconf-...@lists.opendaylight.org >> https://lists.opendaylight.org/mailman/listinfo/netconf-dev >> >> >
_______________________________________________ controller-dev mailing list controller-dev@lists.opendaylight.org https://lists.opendaylight.org/mailman/listinfo/controller-dev