blob: ba0f6db0b20f3ced71b5306482f326ccf2be42eb [file] [log] [blame]
Jian Li4de49c02018-02-23 10:48:20 +09001def get_openstack4j_deps_path():
2
3 WEB_INF_PATH = 'WEB-INF/classes/deps/'
4 OPENSTACK4J_DEPS = [
5 'openstack4j-core',
6 'openstack4j-http-connector',
7 'openstack4j-httpclient',
8 ]
9 OPENSTACK4J_VER = '3.1.0'
10
11 openstack_deps_path = ''
12
13 for dep in OPENSTACK4J_DEPS:
14 name = dep + '-' + OPENSTACK4J_VER + '.jar'
15 path = WEB_INF_PATH + name
16 openstack_deps_path = openstack_deps_path + path + ','
17
18 return openstack_deps_path
19
20def get_jackson_deps_path():
21
22 WEB_INF_PATH = 'WEB-INF/classes/deps/'
23 JACKSON_DEPS_WITH_VER = [
24 'json-patch-1.9.jar',
25 'jackson-coreutils-1.6.jar',
26 'msg-simple-1.1.jar',
27 'btf-1.2.jar',
28 'snakeyaml-1.15.jar'
29 ]
30
31 jackson_deps_path = ''
32
33 for dep in JACKSON_DEPS_WITH_VER:
34 path = WEB_INF_PATH + dep
35 jackson_deps_path = jackson_deps_path + path + ','
36
37 return jackson_deps_path
38
Hyunsun Moon05400872017-02-07 17:11:25 +090039COMPILE_DEPS = [
Jian Li02a94982018-02-03 02:49:07 +090040 '//lib:CORE_DEPS',
41 '//lib:JACKSON',
42 '//lib:KRYO',
43 '//core/store/serializers:onos-core-serializers',
44 '//lib:org.apache.karaf.shell.console',
45 '//lib:javax.ws.rs-api',
46 '//utils/rest:onlab-rest',
47 '//cli:onos-cli',
48 '//apps/openstacknode/api:onos-apps-openstacknode-api',
49 '//lib:openstack4j-core',
50 '//lib:openstack4j-http-connector',
51 '//lib:openstack4j-httpclient',
52 '//lib:json-patch',
53 '//lib:jackson-coreutils',
54 '//lib:btf',
55 '//lib:msg-simple',
Jian Li54c46042018-02-20 00:32:01 +090056 '//lib:snakeyaml',
Ray Milkeyf80bbb22016-03-11 10:16:22 -080057]
58
Hyunsun Moonc7eb0d02017-03-27 18:13:00 +090059TEST_DEPS = [
60 '//lib:TEST_ADAPTERS',
61 '//core/api:onos-api-tests',
62 '//core/common:onos-core-common-tests',
Jian Li5c51d90a2018-02-20 14:10:25 +090063 '//web/api:onos-rest-tests',
64 '//lib:TEST_REST',
Hyunsun Moonc7eb0d02017-03-27 18:13:00 +090065]
66
Jian Li02a94982018-02-03 02:49:07 +090067BUNDLES = [
68 '//apps/openstacknetworking:onos-apps-openstacknetworking',
69]
70
Jian Li4de49c02018-02-23 10:48:20 +090071INCLUDE_PACKAGES = 'com.google.common.net,com.google.common.io,com.fasterxml.jackson.annotation'
Jian Li54c46042018-02-20 00:32:01 +090072EXCLUDE_PACKAGES = '!org.openstack4j,!org.openstack4j.*'
Jian Li4de49c02018-02-23 10:48:20 +090073ALL_PACKAGES = '*'
Jian Li02a94982018-02-03 02:49:07 +090074
Hyunsun Moon05400872017-02-07 17:11:25 +090075osgi_jar_with_tests (
Jian Li02a94982018-02-03 02:49:07 +090076 deps = COMPILE_DEPS,
77 test_deps = TEST_DEPS,
78 web_context = '/onos/openstacknetworking',
79 api_title = 'OpenStack Networking API',
80 api_version = '1.0',
81 api_description = 'REST API for OpenStack Networking',
82 api_package = 'org.onosproject.openstacknetworking.web',
Jian Li54c46042018-02-20 00:32:01 +090083
84 # dependency embedding
Jian Li4de49c02018-02-23 10:48:20 +090085 import_packages = INCLUDE_PACKAGES + ',' + EXCLUDE_PACKAGES + ',' + ALL_PACKAGES,
86 bundle_classpath = get_openstack4j_deps_path() + get_jackson_deps_path()
Hyunsun Moon05400872017-02-07 17:11:25 +090087)
88
Ray Milkeya5ff8a72016-04-19 09:43:45 -070089onos_app (
Jian Li02a94982018-02-03 02:49:07 +090090 app_name = 'org.onosproject.openstacknetworking',
91 title = 'OpenStack Networking',
92 category = 'Utility',
93 url = 'http://onosproject.org',
94 included_bundles = BUNDLES,
Jian Li02a94982018-02-03 02:49:07 +090095 description = 'OpenStack Networking application.',
96 required_apps = [
97 'org.onosproject.openstacknode'
98 ]
Jian Li54c46042018-02-20 00:32:01 +090099)