Hi Bharat, Janani and Marc
Thanks a lot for your replies. I succeeded to build l3vpn and openroadm apps by buck built-in ONOS. But I failed to build a new app I added. It seems that my new app isn't built. Do I have to register my app somewhere to compile and build?
1. I added a new app named 'yang-sample'
ubuntu@miyata:~/onos/apps/yang-sample$ pwd
/home/ubuntu/onos/apps/yang-sample
2. There are some YANG files in the src/main/yang directory
ubuntu@miyata:~/onos/apps/yang-sample$ find .
.
./src
./src/main
./src/main/yang
./src/main/yang/ietf-yang-types.yang
./src/main/yang/ietf-inet-types.yang
...(some YANG files)...
./src/main/java
./src/main/java/org
./src/main/java/org/onosproject
./src/main/java/org/onosproject/yang
./src/test
./src/test/java
./.buckd
...
./BUCK
./pom.xml
3. I copied BUCK file from the YANG Compiler document and referred to BUCK files in l3vpn and openroadm.
ubuntu@miyata:~/onos/apps/yang-sample$ cat BUCK
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:onos-yang-model',
]
TEST_DEPS = [
]
yang_osgi_jar(
deps = COMPILE_DEPS,
name = 'onos-apps-yang',
srcs = glob(['src/main/**/*.yang']),
visibility = [
'PUBLIC'
],
)
osgi_jar_with_tests(
deps = COMPILE_DEPS,
test_deps = TEST_DEPS,
)
onos_app(
app_name = 'org.onosproject.yang-sample',
title = 'YANG SampleApp',
category = 'YANG',
url = '
http://onosproject.org',
description = 'YANG Sample Application',
required_apps = APPS,
)
4. use buck to build
ubuntu@miyata:~/onos/apps/yang-sample$ ../../bin/buck build onos
Waiting for Watchman query [[query, /home/ubuntu/onos, {since=n:buckd149c3c92-bacf-4b03-95d7-2dc4c1f5b8ee, expression=[not, [anyof, [type, d], [dirname, .idea], [dirname, .buckd], [dirname, buck-out/cache], [dirname, .git], [dirname, buck-out/.trash], [dirname, buck-out], [match, **/*.pbxproj, wholename, {includedotfiles=true}], [match, **/*.xcscheme, wholename, {includedotfiles=true}], [match, **/*.xcworkspacedata, wholename, {includedotfiles=true}], [match, **/*~, wholename, {includedotfiles=true}], [match, **/#*#, wholename, {includedotfiles=true}], [match, **/.#*, wholename, {includedotfiles=true}], [match, **/*.swo, wholename, {includedotfiles=true}], [match, **/*.swp, wholename, {includedotfiles=true}], [match, **/*.swpx, wholename, {includedotfiles=true}], [match, **/*.un~, wholename, {includedotfiles=true}], [match, **/.netrhwist, wholename, {includedotfiles=true}], [match, .idea, wholename, {includedotfiles=true}], [match, .iml, wholename, {includedotfiles=true}], [match, **/*.pydevproject, wholename, {includedotfiles=true}], [match, .project, wholename, {includedotfiles=true}], [match, .metadata, wholename, {includedotfiles=true}], [match, **/*.tmp, wholename, {includedotfiles=true}], [match, **/*.bak, wholename, {includedotfiles=true}], [match, **/*~.nib, wholename, {includedotfiles=true}], [match, .classpath, wholename, {includedotfiles=true}], [match, .settings, wholename, {includedotfiles=true}], [match, .loadpath, wholename, {includedotfiles=true}], [match, .externalToolBuilders, wholename, {includedotfiles=true}], [match, .cproject, wholename, {includedotfiles=true}], [match, .buildpath, wholename, {includedotfiles=true}], [match, .DS_Store, wholename, {includedotfiles=true}], [match, .AppleDouble, wholename, {includedotfiles=true}], [match, .LSOverride, wholename, {includedotfiles=true}], [match, .Spotlight-V100, wholename, {includedotfiles=true}], [match, .Trashes, wholename, {includedotfiles=true}], [match, $RECYCLE.BIN, wholename, {includedotfiles=true}], [match, .*.sublime-workspace, wholename, {includedotfiles=true}]]], empty_on_fresh_instance=true, fields=[name, exists, new]}]]...
[-] PROCESSING BUCK FILES...FINISHED 3.4s [100%] New Buck instance
[-] DOWNLOADING... (0.00 B/S AVG, TOTAL: 0.00 B, 0 Artifacts)
[-] BUILDING...FINISHED 2.6s [100%] (1/1 JOBS, 0 UPDATED, 0 [0.0%] CACHE MISS)
4. There aren't built files in the buck-out directory.
ubuntu@miyata:~/onos/apps/yang-sample$ ls -d ~/onos/buck-out/gen/apps/yang*
/home/ubuntu/onos/buck-out/gen/apps/yang /home/ubuntu/onos/buck-out/gen/apps/yang-gui
I'm not sure where the default directory is and how I can configure the destination directory as the document says.
Thanks,
Naoki
2017年6月14日水曜日 2時34分36秒 UTC+9 Marc De Leenheer:
> You can also take a look at onos/apps/openroadm. The actual models are under onos/models/openroadm
>
>
>
>
> Hope this helps,
>
>
> marc
>
>
> On Tue, Jun 13, 2017 at 5:32 AM, Janani Baskaran <
jananisv...@gmail.com> wrote:
>
>
> Hi,
>
>
> To create YANG app with BUCK, you can refer '/home/root1/onos/models/l3vpn' where L3VPN YANG files are kept and are used by L3VPN app in '/home/root1/onos/apps/l3vpn'.
>
>
> Please let me know if any more queries you have.
>
>
> Thanks & Regards,
>
>
> Janani B
>
>
>
>
>
> On 13 June 2017 at 17:28, Naoki <
naoki.m...@gmail.com> wrote:
> Hi all,
>
>
>
> I'm following the Yang Compiler document here
https://wiki.onosproject.org/display/ONOS/YANG+Compiler#YANGCompiler-YangBuckPlugin:
>
>
>
> I couldn't find out how to create new buck-base applications in ONOS. Are there any documents or tutorials about it? (I succeeded to create the Maven-base applications.)
>
>
>
> Thanks,
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an email to
onos-dev+u...@onosproject.org.
> To unsubscribe from this group and stop receiving emails from it, send an email to
onos-dev+u...@onosproject.org.