12-06-2017 09:05 AM - edited 03-01-2019 04:03 AM
I’m creating an action for the circuit create(one package) that shall refer to a device configuration attribute (different NED package)
tailf:action create-service {
tailf:info "create a new service";
tailf:actionpoint svo-circuit-app-create-service;
input {
leaf name {
type string;
description "name of circuit";
}
leaf src-device {
description "src device";
type leafref {
path "/ncs:devices/ncs:device/ncs:name";
}
}
leaf src-device-tp {
type leafref {
path "/ncs:devices/ncs:device/ncs:config/svo-cln:circuit-termination-points/svo-cln:test";
}
must "/ncs:devices/ncs:device[ncs:name=current()/../src-device]";
}
}
output {
leaf success {
type boolean;
}
leaf message {
type string;
description "Free format message.";
}
}
}
And the test leaf is defined in this NED yang file
module svo-circuit-lite-node {
namespace "http://cisco.com/yang/svo-circuit-lite-node";
prefix "svo-cln";
import cisco-svo-group-circuit { prefix svo-cgrp; revision-date 2017-11-24; }
….
container circuit-termination-points {
…..
leaf test {
description "REMOVE, used just for simplify the study of circuit creation";
type string;
}
…..
}
}
Because the 2 yang module are in different packages, the Makefile of the circuit package has the following reference to the other package
## Uncomment and patch the line below if you have a dependency to a NED
## or to other YANG files
YANGPATH += ../../svo-circuit-ned/src/yang
The bold line of the action has been wrote following the suggestion of the path found on the GUI for the configuration of the leaf test

My issue comes at compiler time with this kind of error:
mfontane@mfontane-lnx:~/svo/svo-run/packages/svo-circuit-app$ make -C src
make: Entering directory '/home/mfontane/svo/svo-run/packages/svo-circuit-app/src'
/home/mfontane/svo/nso-4.5.1/bin/ncsc `ls svo-circuit-app-ann.yang > /dev/null 2>&1 && echo "-a svo-circuit-app-ann.yang"` \
--yangpath ../../svo-circuit-ned/src/yang -c -o ../load-dir/svo-circuit-app.fxs yang/svo-circuit-app.yang
yang/svo-circuit-app.yang:59: error: the node 'circuit-termination-points' from module 'svo-circuit-lite-node' (in node 'config' from 'tailf-ncs') is not found
Makefile:40: recipe for target '../load-dir/svo-circuit-app.fxs' failed
make: *** [../load-dir/svo-circuit-app.fxs] Error 1
make: Leaving directory '/home/mfontane/svo/svo-run/packages/svo-circuit-app/src'
Where I’m wrong?
Thank in advance.
Mik
Solved! Go to Solution.
12-07-2017 01:50 PM
Please change the yang path to ../../svo-circuit-ned/src/ncsc-out/modules/yang
12-07-2017 01:50 PM
Please change the yang path to ../../svo-circuit-ned/src/ncsc-out/modules/yang
12-11-2017 04:50 AM
It works.
Thank You.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide