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-topology:network-topology/topology/topology-netconf/node/PE-2 > > <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</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://xml.juniper.net/xnm/1.1/xnm?module=configuration&revision=2014-11-13 > > <http://xml.juniper.net/xnm/1.1/xnm?module=configuration&revision=2014-11-13></capability> > </yang-module-capabilities> > </node> > > PUT > http://192.168.5.199:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/xrv-P1 > > <http://192.168.5.199:8181/restconf/config/network-topology: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:netconf-node-topology">rmavrichev</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> > </node> > > Then, check it: I see these hosts in config datastore: > > GET > http://192.168.5.199:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/ > > <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 > <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/ > > <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 <mailto: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_Controller:Config:Examples:Netconf#Spawning_netconf_connectors_via_topology_configuration > > > > <https://wiki.opendaylight.org/view/OpenDaylight_Controller: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> > > <mailto: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/ta-p/294320> > > <https://forums.juniper.net/t5/Automation/Yang-Labs-Tools/ta-p/294320 > > <https://forums.juniper.net/t5/Automation/Yang-Labs-Tools/ta-p/294320>> > > > > (https://forums.juniper.net/jnet/attachments/jnet/Automation_Scripting/591.2/1/configuration-142.yang.txt > > > > <https://forums.juniper.net/jnet/attachments/jnet/Automation_Scripting/591.2/1/configuration-142.yang.txt> > > > > <https://forums.juniper.net/jnet/attachments/jnet/Automation_Scripting/591.2/1/configuration-142.yang.txt > > > > <https://forums.juniper.net/jnet/attachments/jnet/Automation_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:controller:md:sal:connector:netconf">prefix:sal-netconf-connector</type> > > <name>PE-1</name> > > <address > > > > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">172.16.16.1</address> > > <port > > > > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">830</port> > > <username > > > > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">root</username> > > <password > > > > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">passw0rd</password> > > <tcp-only > > > > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">false</tcp-only> > > <yang-module-capabilities > > > > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf"> > > > > <capability>http://xml.juniper.net/xnm/1.1/xnm?module=configuration&revision=2014-11-13 > > > > <http://xml.juniper.net/xnm/1.1/xnm?module=configuration&revision=2014-11-13> > > > > <http://xml.juniper.net/xnm/1.1/xnm?module=configuration&revision=2014-11-13 > > > > <http://xml.juniper.net/xnm/1.1/xnm?module=configuration&revision=2014-11-13>></capability> > > </yang-module-capabilities> > > <event-executor > > > > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf"> > > <type > > > > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netty">prefix:netty-event-executor</type> > > <name>global-event-executor</name> > > </event-executor> > > <binding-registry > > > > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf"> > > <type > > > > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller: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:sal:connector:netconf"> > > <type > > > > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller: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:sal:connector:netconf"> > > <type > > > > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller: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:sal:connector:netconf"> > > <type > > > > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:threadpool">prefix:threadpool</type> > > <name>global-netconf-processing-executor</name> > > </processing-executor> > > <keepalive-executor > > > > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf"> > > <type > > > > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller: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-topology:network-topology/topology/topology-netconf/ > > > > <http://192.168.5.199:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/> > > > > <http://192.168.5.199:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/ > > > > <http://192.168.5.199:8181/restconf/operational/network-topology: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: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 > > <http://xml.juniper.net/netconf/junos/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: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)configuration > > <http://xml.juniper.net/xnm/1.1/xnm?revision=2014-11-13)configuration> > > <http://xml.juniper.net/xnm/1.1/xnm?revision=2014-11-13)configuration > > <http://xml.juniper.net/xnm/1.1/xnm?revision=2014-11-13)configuration>>", > > "http://xml.juniper.net/dmi/system/1.0 > > <http://xml.juniper.net/dmi/system/1.0> > > <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-ext:mount/configuration:configuration/system/services > > > > <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> > > > > <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 > > > > <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>> > > ) > > 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> > > <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> > > <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> > > <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:controller:md:sal:connector:netconf">prefix:sal-netconf-connector</type> > > <name>PE-1</name> > > <address > > > > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">172.16.16.1</address> > > <port > > > > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">830</port> > > <username > > > > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">root</username> > > <password > > > > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">passw0rd</password> > > <tcp-only > > > > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">false</tcp-only> > > <yang-module-capabilities > > > > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf"> > > <capability > > > > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">http://yang.juniper.net/yang/1.1/je?module=junos-extension&revision=2017-02-20 > > > > <http://yang.juniper.net/yang/1.1/je?module=junos-extension&revision=2017-02-20> > > > > <http://yang.juniper.net/yang/1.1/je?module=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:sal:connector:netconf">http://yang.juniper.net/yang/1.1/jc?module=configuration&revision=2017-02-20 > > > > <http://yang.juniper.net/yang/1.1/jc?module=configuration&revision=2017-02-20> > > > > <http://yang.juniper.net/yang/1.1/jc?module=configuration&revision=2017-02-20 > > > > <http://yang.juniper.net/yang/1.1/jc?module=configuration&revision=2017-02-20>></capability> > > </yang-module-capabilities> > > <event-executor > > > > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf"> > > <type > > > > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netty">prefix:netty-event-executor</type> > > <name>global-event-executor</name> > > </event-executor> > > <binding-registry > > > > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf"> > > <type > > > > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller: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:sal:connector:netconf"> > > <type > > > > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller: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:sal:connector:netconf"> > > <type > > > > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller: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:sal:connector:netconf"> > > <type > > > > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:threadpool">prefix:threadpool</type> > > <name>global-netconf-processing-executor</name> > > </processing-executor> > > <keepalive-executor > > > > xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf"> > > <type > > > > xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller: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> > > <mailto: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> > > <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 > > <mailto:controller-dev@lists.opendaylight.org> > > https://lists.opendaylight.org/mailman/listinfo/controller-dev > > <https://lists.opendaylight.org/mailman/listinfo/controller-dev> > > > > > <karaf.log>_______________________________________________ > netconf-dev mailing list > netconf-...@lists.opendaylight.org <mailto:netconf-...@lists.opendaylight.org> > https://lists.opendaylight.org/mailman/listinfo/netconf-dev > <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