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.
Regards, Ryan Goulding [0] 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> 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/ > 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</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/ , 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", > "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/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 ) > 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) , > 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"; > 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"; > 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</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</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 > 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