Jian Li | 4de49c0 | 2018-02-23 10:48:20 +0900 | [diff] [blame] | 1 | def 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 | |
| 20 | def 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 Moon | 0540087 | 2017-02-07 17:11:25 +0900 | [diff] [blame] | 39 | COMPILE_DEPS = [ |
Jian Li | 02a9498 | 2018-02-03 02:49:07 +0900 | [diff] [blame] | 40 | '//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 Li | 54c4604 | 2018-02-20 00:32:01 +0900 | [diff] [blame] | 56 | '//lib:snakeyaml', |
Ray Milkey | f80bbb2 | 2016-03-11 10:16:22 -0800 | [diff] [blame] | 57 | ] |
| 58 | |
Hyunsun Moon | c7eb0d0 | 2017-03-27 18:13:00 +0900 | [diff] [blame] | 59 | TEST_DEPS = [ |
| 60 | '//lib:TEST_ADAPTERS', |
| 61 | '//core/api:onos-api-tests', |
| 62 | '//core/common:onos-core-common-tests', |
Jian Li | 5c51d90a | 2018-02-20 14:10:25 +0900 | [diff] [blame] | 63 | '//web/api:onos-rest-tests', |
| 64 | '//lib:TEST_REST', |
Hyunsun Moon | c7eb0d0 | 2017-03-27 18:13:00 +0900 | [diff] [blame] | 65 | ] |
| 66 | |
Jian Li | 02a9498 | 2018-02-03 02:49:07 +0900 | [diff] [blame] | 67 | BUNDLES = [ |
| 68 | '//apps/openstacknetworking:onos-apps-openstacknetworking', |
| 69 | ] |
| 70 | |
Jian Li | 4de49c0 | 2018-02-23 10:48:20 +0900 | [diff] [blame] | 71 | INCLUDE_PACKAGES = 'com.google.common.net,com.google.common.io,com.fasterxml.jackson.annotation' |
Jian Li | 54c4604 | 2018-02-20 00:32:01 +0900 | [diff] [blame] | 72 | EXCLUDE_PACKAGES = '!org.openstack4j,!org.openstack4j.*' |
Jian Li | 4de49c0 | 2018-02-23 10:48:20 +0900 | [diff] [blame] | 73 | ALL_PACKAGES = '*' |
Jian Li | 02a9498 | 2018-02-03 02:49:07 +0900 | [diff] [blame] | 74 | |
Hyunsun Moon | 0540087 | 2017-02-07 17:11:25 +0900 | [diff] [blame] | 75 | osgi_jar_with_tests ( |
Jian Li | 02a9498 | 2018-02-03 02:49:07 +0900 | [diff] [blame] | 76 | 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 Li | 54c4604 | 2018-02-20 00:32:01 +0900 | [diff] [blame] | 83 | |
| 84 | # dependency embedding |
Jian Li | 4de49c0 | 2018-02-23 10:48:20 +0900 | [diff] [blame] | 85 | import_packages = INCLUDE_PACKAGES + ',' + EXCLUDE_PACKAGES + ',' + ALL_PACKAGES, |
| 86 | bundle_classpath = get_openstack4j_deps_path() + get_jackson_deps_path() |
Hyunsun Moon | 0540087 | 2017-02-07 17:11:25 +0900 | [diff] [blame] | 87 | ) |
| 88 | |
Ray Milkey | a5ff8a7 | 2016-04-19 09:43:45 -0700 | [diff] [blame] | 89 | onos_app ( |
Jian Li | 02a9498 | 2018-02-03 02:49:07 +0900 | [diff] [blame] | 90 | app_name = 'org.onosproject.openstacknetworking', |
| 91 | title = 'OpenStack Networking', |
| 92 | category = 'Utility', |
| 93 | url = 'http://onosproject.org', |
| 94 | included_bundles = BUNDLES, |
Jian Li | 02a9498 | 2018-02-03 02:49:07 +0900 | [diff] [blame] | 95 | description = 'OpenStack Networking application.', |
| 96 | required_apps = [ |
| 97 | 'org.onosproject.openstacknode' |
| 98 | ] |
Jian Li | 54c4604 | 2018-02-20 00:32:01 +0900 | [diff] [blame] | 99 | ) |