blob: 2fb2b8da13eafaf5b553644e6aeba483a5496c31 [file] [log] [blame]
Brian O'Connor9e1352f2016-04-29 17:13:33 -07001KARAF = '//lib:apache-karaf'
2BRANDING = '//tools/package/branding:onos-tools-package-branding'
3
4FEATURES = [
5 '//features:onos-thirdparty-base',
6 '//features:onos-thirdparty-web',
7 '//features:onos-api',
8 '//features:onos-core',
9 '//features:onos-incubator',
10 '//features:onos-rest',
11 '//features:onos-gui',
12 '//features:onos-cli',
13#'//features:onos-security',
14]
15
16#FIXME this list is currently mirrored from the root Buck file
17APPS = [
Ray Milkey4abe8442016-05-05 11:21:33 -070018 # Drivers
Brian O'Connor9e1352f2016-04-29 17:13:33 -070019 '//drivers/default:onos-drivers-default-oar',
Ray Milkey4abe8442016-05-05 11:21:33 -070020 '//drivers/corsa:onos-drivers-corsa-oar',
Brian O'Connor9e1352f2016-04-29 17:13:33 -070021
22 # Providers
23 '//providers/bgp:onos-providers-bgp-oar',
24 '//providers/host:onos-providers-host-oar',
25 '//providers/lldp:onos-providers-lldp-oar',
26 '//providers/netcfghost:onos-providers-netcfghost-oar',
27 '//providers/netcfglinks:onos-providers-netcfglinks-oar',
28 '//providers/netconf:onos-providers-netconf-oar',
29 '//providers/openflow/message:onos-providers-openflow-message-oar',
30 '//providers/ovsdb:onos-providers-ovsdb-oar',
31 '//providers/pcep:onos-providers-pcep-oar',
32 '//providers/null:onos-providers-null-oar',
33 '//providers/openflow/base:onos-providers-openflow-base-oar',
Thomas Vachuska777dbd72016-05-04 10:10:11 -070034 '//providers/openflow/app:onos-providers-openflow-app-oar',
Brian O'Connor9e1352f2016-04-29 17:13:33 -070035 '//providers/rest:onos-providers-rest-oar',
36 '//providers/isis:onos-providers-isis-oar',
Ray Milkey43702bf2016-05-04 10:40:55 -070037 '//providers/ovsdb/host:onos-providers-ovsdb-host-oar',
38 '//providers/ovsdb/base:onos-providers-ovsdb-base-oar',
Brian O'Connor9e1352f2016-04-29 17:13:33 -070039
40 # Apps
41 '//apps/dhcp:onos-apps-dhcp-oar',
42 '//apps/fwd:onos-apps-fwd-oar',
Brian O'Connor9e1352f2016-04-29 17:13:33 -070043 '//apps/acl:onos-apps-acl-oar',
44 '//apps/bgprouter:onos-apps-bgprouter-oar',
45 '//apps/proxyarp:onos-apps-proxyarp-oar',
46 '//apps/segmentrouting:onos-apps-segmentrouting-oar',
47 '//apps/gangliametrics:onos-apps-gangliametrics-oar',
48 '//apps/graphitemetrics:onos-apps-graphitemetrics-oar',
Brian O'Connor9e1352f2016-04-29 17:13:33 -070049 '//apps/influxdbmetrics:onos-apps-influxdbmetrics-oar',
50 '//apps/metrics:onos-apps-metrics-oar',
51 '//apps/mfwd:onos-apps-mfwd-oar',
52 '//apps/mlb:onos-apps-mlb-oar',
53 '//apps/openstackinterface:onos-apps-openstackinterface-oar',
54 '//apps/openstacknetworking:onos-apps-openstacknetworking-oar',
55 '//apps/openstacknetworking/openstackrouting:onos-apps-openstacknetworking-openstackrouting-oar',
56 '//apps/openstacknetworking/openstackswitching:onos-apps-openstacknetworking-openstackswitching-oar',
57 '//apps/mobility:onos-apps-mobility-oar',
58 '//apps/optical:onos-apps-optical-oar',
59 '//apps/pathpainter:onos-apps-pathpainter-oar',
60 '//apps/pcep-api:onos-apps-pcep-api-oar',
61 '//apps/pim:onos-apps-pim-oar',
62 '//apps/reactive-routing:onos-apps-reactive-routing-oar',
63 '//apps/sdnip:onos-apps-sdnip-oar',
64 '//apps/virtualbng:onos-apps-virtualbng-oar',
Brian O'Connor9e1352f2016-04-29 17:13:33 -070065 '//apps/vpls:onos-apps-vpls-oar',
66 '//apps/vrouter:onos-apps-vrouter-oar',
67 '//apps/vtn:onos-apps-vtn-oar',
68 '//apps/faultmanagement:onos-apps-faultmanagement-oar',
69 '//apps/openstacknode:onos-apps-openstacknode-oar',
70 '//apps/cpman/app:onos-apps-cpman-app-oar',
71 '//apps/xosclient:onos-apps-xosclient-oar',
Ray Milkey6cef47e2016-06-02 10:13:27 -070072 '//apps/events:onos-apps-events-oar',
73 '//apps/test/election:onos-apps-test-election-oar',
74 '//apps/test/distributed-primitives:onos-apps-test-distributed-primitives-oar',
75 '//apps/test/intent-perf:onos-apps-test-intent-perf-oar',
Madan Jampanifbfd8b52016-06-02 14:26:42 -070076 '//apps/test/loadtest:onos-apps-test-loadtest-oar',
Ray Milkey6cef47e2016-06-02 10:13:27 -070077 '//apps/test/demo:onos-apps-test-demo-oar',
Brian O'Connor9e1352f2016-04-29 17:13:33 -070078]
79
80#TODO move to buck-tools
81export_file (
82 name = 'onos-prep-karaf',
83)
84
85genrule(
86 name = 'onos-karaf',
87 srcs = glob(['bin/*', 'etc/*', 'init/*']),
88 bash = '$(location :onos-prep-karaf) $OUT $(location %s) %s $(location %s)'\
89 % (KARAF, ONOS_VERSION, BRANDING),
90 out = 'karaf.zip',
91)
92
93compile_features(
94 name = 'onos-features',
95 features = FEATURES,
96)
97
98staged_repos = ['$(location %s-repo)' % f for f in FEATURES]
99staged_apps = ['$(location %s)' % a for a in APPS]
100
101# feature_coords = 'foo:bar:1.3'
102sources = [ '$(location :onos-features)', ]
103sources += staged_repos + staged_apps
104
105genrule(
106 name = 'onos-package',
Brian O'Connor92ec2132016-05-03 17:30:25 -0700107 out = 'onos.tar.gz',
Thomas Vachuska0483bee2016-05-04 19:37:51 -0700108 bash = '$(exe //buck-tools:onos-stage) $OUT $(location :onos-karaf) ' + ' '.join(sources),
Brian O'Connor9e1352f2016-04-29 17:13:33 -0700109 visibility = [ 'PUBLIC' ],
Ray Milkey43702bf2016-05-04 10:40:55 -0700110)
Thomas Vachuska5f54c6f2016-05-04 19:19:51 -0700111
112genrule(
113 name = 'onos-run',
114 out = 'onos-run',
115 srcs = [ 'onos-run-karaf' ],
116 bash = 'sed "s#ONOS_TAR=#ONOS_TAR=$(location :onos-package)#" $SRCS > $OUT; chmod +x $OUT',
117 executable = True,
118 visibility = [ 'PUBLIC' ],
Ray Milkey4abe8442016-05-05 11:21:33 -0700119)