Ray Milkey
Committed by Brian O'Connor

app buck refactor for apps: aaa, acl, bgprouter

Change-Id: Iaa970e3a937cc1df0aff29cc45f4c08c2d79cd13
...@@ -86,15 +86,16 @@ CORE = [ ...@@ -86,15 +86,16 @@ CORE = [
86 APPS = [ 86 APPS = [
87 '//apps/dhcp:onos-apps-dhcp-oar', 87 '//apps/dhcp:onos-apps-dhcp-oar',
88 '//apps/fwd:onos-apps-fwd-oar', 88 '//apps/fwd:onos-apps-fwd-oar',
89 + '//apps/aaa:onos-apps-aaa-oar',
90 + '//apps/acl:onos-apps-acl-oar',
91 + '//apps/bgprouter:onos-apps-bgprouter-oar',
92 + '//apps/proxyarp:onos-apps-proxyarp-oar',
89 ] 93 ]
90 94
91 APP_JARS = [ 95 APP_JARS = [
92 '//apps/cpman/api:onos-app-cpman-api', 96 '//apps/cpman/api:onos-app-cpman-api',
93 '//apps/cpman/app:onos-app-cpman-app', 97 '//apps/cpman/app:onos-app-cpman-app',
94 - '//apps/aaa:onos-app-aaa', 98 + '//apps/routing-api:onos-apps-routing-api',
95 - '//apps/acl:onos-app-acl',
96 - '//apps/bgprouter:onos-app-bgprouter',
97 - '//apps/routing-api:onos-app-routing-api',
98 '//apps/cip:onos-app-cip', 99 '//apps/cip:onos-app-cip',
99 '//apps/cordmcast:onos-app-cord-mcast', 100 '//apps/cordmcast:onos-app-cord-mcast',
100 '//apps/cordvtn:onos-apps-cordvtn', 101 '//apps/cordvtn:onos-apps-cordvtn',
...@@ -123,8 +124,7 @@ APP_JARS = [ ...@@ -123,8 +124,7 @@ APP_JARS = [
123 '//apps/optical:onos-app-optical', 124 '//apps/optical:onos-app-optical',
124 '//apps/pathpainter:onos-app-pp', 125 '//apps/pathpainter:onos-app-pp',
125 '//apps/pim:onos-app-pim', 126 '//apps/pim:onos-app-pim',
126 - '//apps/proxyarp:onos-app-proxyarp', 127 + '//apps/routing:onos-apps-routing',
127 - '//apps/routing:onos-app-routing',
128 '//apps/sdnip:onos-app-sdnip', 128 '//apps/sdnip:onos-app-sdnip',
129 '//apps/segmentrouting:onos-app-segmentrouting', 129 '//apps/segmentrouting:onos-app-segmentrouting',
130 '//apps/test:onos-app-test', 130 '//apps/test:onos-app-test',
......
1 -SRC = 'src/main/java/org/onosproject/**/'
2 -TEST = 'src/test/java/org/onosproject/**/'
3 -
4 -CURRENT_NAME = 'onos-app-aaa'
5 -CURRENT_TARGET = ':' + CURRENT_NAME
6 -
7 COMPILE_DEPS = [ 1 COMPILE_DEPS = [
8 '//lib:CORE_DEPS', 2 '//lib:CORE_DEPS',
9 '//lib:org.apache.karaf.shell.console', 3 '//lib:org.apache.karaf.shell.console',
...@@ -15,18 +9,14 @@ TEST_DEPS = [ ...@@ -15,18 +9,14 @@ TEST_DEPS = [
15 '//core/common:onos-core-common', 9 '//core/common:onos-core-common',
16 ] 10 ]
17 11
18 -java_library( 12 +osgi_jar_with_tests (
19 - name = CURRENT_NAME,
20 - srcs = glob([SRC + '/*.java']),
21 deps = COMPILE_DEPS, 13 deps = COMPILE_DEPS,
22 - visibility = ['PUBLIC'], 14 + test_deps = TEST_DEPS,
23 ) 15 )
24 16
25 -java_test( 17 +onos_app (
26 - name = 'tests', 18 + title = 'Authentication App',
27 - srcs = glob([TEST + '/*.java']), 19 + category = 'Security',
28 - deps = COMPILE_DEPS + 20 + url = 'http://onosproject.org',
29 - TEST_DEPS + 21 + description = 'ONOS authentication application.',
30 - [CURRENT_TARGET],
31 - source_under_test = [CURRENT_TARGET],
32 ) 22 )
......
1 -SRC = 'src/main/java/org/onosproject/**/'
2 -TEST = 'src/test/java/org/onosproject/**/'
3 -
4 -CURRENT_NAME = 'onos-app-acl'
5 -CURRENT_TARGET = ':' + CURRENT_NAME
6 -
7 COMPILE_DEPS = [ 1 COMPILE_DEPS = [
8 '//lib:CORE_DEPS', 2 '//lib:CORE_DEPS',
9 '//lib:javax.ws.rs-api', 3 '//lib:javax.ws.rs-api',
...@@ -16,18 +10,15 @@ TEST_DEPS = [ ...@@ -16,18 +10,15 @@ TEST_DEPS = [
16 '//lib:jersey-server', 10 '//lib:jersey-server',
17 ] 11 ]
18 12
19 -java_library( 13 +osgi_jar_with_tests (
20 - name = CURRENT_NAME,
21 - srcs = glob([SRC + '/*.java']),
22 deps = COMPILE_DEPS, 14 deps = COMPILE_DEPS,
23 - visibility = ['PUBLIC'], 15 + test_deps = TEST_DEPS,
16 + web_context = '/onos/v1/acl',
24 ) 17 )
25 18
26 -java_test( 19 +onos_app (
27 - name = 'tests', 20 + title = 'ACL App',
28 - srcs = glob([TEST + '/*.java']), 21 + category = 'Security',
29 - deps = COMPILE_DEPS + 22 + url = 'http://onosproject.org',
30 - TEST_DEPS + 23 + description = 'ONOS ACL application.',
31 - [CURRENT_TARGET],
32 - source_under_test = [CURRENT_TARGET],
33 ) 24 )
......
1 -SRC = 'src/main/java/org/onosproject/**/'
2 -TEST = 'src/test/java/org/onosproject/**/'
3 -
4 -CURRENT_NAME = 'onos-app-bgprouter'
5 -CURRENT_TARGET = ':' + CURRENT_NAME
6 -
7 COMPILE_DEPS = [ 1 COMPILE_DEPS = [
8 '//lib:CORE_DEPS', 2 '//lib:CORE_DEPS',
9 '//incubator/api:onos-incubator-api', 3 '//incubator/api:onos-incubator-api',
10 - '//apps/routing-api:onos-app-routing-api', 4 + '//apps/routing-api:onos-apps-routing-api',
11 ] 5 ]
12 6
13 -TEST_DEPS = [ 7 +BUNDLES = [
14 - '//lib:TEST', 8 + '//apps/routing-api:onos-apps-routing-api',
9 + '//apps/routing:onos-apps-routing',
10 + '//apps/bgprouter:onos-apps-bgprouter',
15 ] 11 ]
16 12
17 -java_library( 13 +osgi_jar (
18 - name = CURRENT_NAME,
19 - srcs = glob([SRC + '/*.java']),
20 deps = COMPILE_DEPS, 14 deps = COMPILE_DEPS,
21 - visibility = ['PUBLIC'],
22 ) 15 )
23 16
24 -java_test( 17 +onos_app (
25 - name = 'tests', 18 + title = 'BGP Router App',
26 - srcs = glob([TEST + '/*.java']), 19 + category = 'Traffic Steering',
27 - deps = COMPILE_DEPS + 20 + url = 'http://onosproject.org',
28 - TEST_DEPS + 21 + description = 'BGP router application.',
29 - [CURRENT_TARGET], 22 + required_apps = [ 'org.onosproject.proxyarp' ],
30 - source_under_test = [CURRENT_TARGET], 23 + included_bundles = BUNDLES,
31 ) 24 )
......
...@@ -3,8 +3,7 @@ BUNDLES = [ ...@@ -3,8 +3,7 @@ BUNDLES = [
3 '//apps/dhcp/app:onos-apps-dhcp-app', 3 '//apps/dhcp/app:onos-apps-dhcp-app',
4 ] 4 ]
5 5
6 -onos_app( 6 +onos_app (
7 - feature_coords = ONOS_GROUP_ID + ':onos-apps-dhcp:' + ONOS_VERSION,
8 title = 'DHCP Server App', 7 title = 'DHCP Server App',
9 category = 'Utility', 8 category = 'Utility',
10 url = 'http://onosproject.org', 9 url = 'http://onosproject.org',
......
...@@ -4,13 +4,13 @@ COMPILE_DEPS = [ ...@@ -4,13 +4,13 @@ COMPILE_DEPS = [
4 '//cli:onos-cli', 4 '//cli:onos-cli',
5 ] 5 ]
6 6
7 -osgi_jar( 7 +osgi_jar_with_tests (
8 deps = COMPILE_DEPS, 8 deps = COMPILE_DEPS,
9 ) 9 )
10 10
11 -onos_app( 11 +onos_app (
12 title = 'Reactive Forwarding App', 12 title = 'Reactive Forwarding App',
13 category = 'Traffic Steering', 13 category = 'Traffic Steering',
14 url = 'http://onosproject.org', 14 url = 'http://onosproject.org',
15 description = 'Reactive forwarding application using flow subsystem.', 15 description = 'Reactive forwarding application using flow subsystem.',
16 -)
...\ No newline at end of file ...\ No newline at end of file
16 +)
......
...@@ -9,7 +9,7 @@ COMPILE_DEPS = [ ...@@ -9,7 +9,7 @@ COMPILE_DEPS = [
9 '//lib:org.apache.karaf.shell.console', 9 '//lib:org.apache.karaf.shell.console',
10 '//cli:onos-cli', 10 '//cli:onos-cli',
11 '//incubator/api:onos-incubator-api', 11 '//incubator/api:onos-incubator-api',
12 - '//apps/routing-api:onos-app-routing-api', 12 + '//apps/routing-api:onos-apps-routing-api',
13 ] 13 ]
14 14
15 TEST_DEPS = [ 15 TEST_DEPS = [
......
1 -SRC = 'src/main/java/org/onosproject/**/'
2 -TEST = 'src/test/java/org/onosproject/**/'
3 -
4 -CURRENT_NAME = 'onos-app-proxyarp'
5 -CURRENT_TARGET = ':' + CURRENT_NAME
6 -
7 COMPILE_DEPS = [ 1 COMPILE_DEPS = [
8 '//lib:CORE_DEPS', 2 '//lib:CORE_DEPS',
9 ] 3 ]
10 4
11 -TEST_DEPS = [ 5 +osgi_jar (
12 - '//lib:TEST',
13 -]
14 -
15 -java_library(
16 - name = CURRENT_NAME,
17 - srcs = glob([SRC + '/*.java']),
18 deps = COMPILE_DEPS, 6 deps = COMPILE_DEPS,
19 - visibility = ['PUBLIC'],
20 ) 7 )
21 8
22 -java_test( 9 +onos_app (
23 - name = 'tests', 10 + title = 'Proxy ARP/NDP App',
24 - srcs = glob([TEST + '/*.java']), 11 + category = 'Traffic Steering',
25 - deps = COMPILE_DEPS + 12 + url = 'http://onosproject.org',
26 - TEST_DEPS + 13 + description = 'Proxy ARP/NDP application.',
27 - [CURRENT_TARGET],
28 - source_under_test = [CURRENT_TARGET],
29 ) 14 )
......
1 -SRC = 'src/main/java/org/onosproject/**/'
2 -TEST = 'src/test/java/org/onosproject/**/'
3 -
4 -CURRENT_NAME = 'onos-app-routing-api'
5 -CURRENT_TARGET = ':' + CURRENT_NAME
6 -
7 COMPILE_DEPS = [ 1 COMPILE_DEPS = [
8 '//lib:CORE_DEPS', 2 '//lib:CORE_DEPS',
9 ] 3 ]
...@@ -12,19 +6,8 @@ TEST_DEPS = [ ...@@ -12,19 +6,8 @@ TEST_DEPS = [
12 '//lib:TEST_ADAPTERS', 6 '//lib:TEST_ADAPTERS',
13 ] 7 ]
14 8
15 -java_library( 9 +osgi_jar_with_tests (
16 - name = CURRENT_NAME,
17 - srcs = glob([SRC + '/*.java']),
18 deps = COMPILE_DEPS, 10 deps = COMPILE_DEPS,
19 - visibility = ['PUBLIC'], 11 + test_deps = TEST_DEPS,
20 ) 12 )
21 13
22 -java_test(
23 - name = 'onos-app-routing-api-tests',
24 - srcs = glob([TEST + '/*.java']),
25 - deps = COMPILE_DEPS +
26 - TEST_DEPS +
27 - [CURRENT_TARGET],
28 - source_under_test = [CURRENT_TARGET],
29 - visibility = ['PUBLIC'],
30 -)
......
1 -SRC = 'src/main/java/org/onosproject/**/'
2 -TEST = 'src/test/java/org/onosproject/**/'
3 -
4 -CURRENT_NAME = 'onos-app-routing'
5 -CURRENT_TARGET = ':' + CURRENT_NAME
6 -
7 COMPILE_DEPS = [ 1 COMPILE_DEPS = [
8 '//lib:CORE_DEPS', 2 '//lib:CORE_DEPS',
9 '//lib:org.apache.karaf.shell.console', 3 '//lib:org.apache.karaf.shell.console',
10 '//lib:concurrent-trees', 4 '//lib:concurrent-trees',
11 '//cli:onos-cli', 5 '//cli:onos-cli',
12 '//incubator/api:onos-incubator-api', 6 '//incubator/api:onos-incubator-api',
13 - '//apps/routing-api:onos-app-routing-api', 7 + '//apps/routing-api:onos-apps-routing-api',
14 '//core/common:onos-core-common', 8 '//core/common:onos-core-common',
15 ] 9 ]
16 10
17 TEST_DEPS = [ 11 TEST_DEPS = [
18 '//lib:TEST_ADAPTERS', 12 '//lib:TEST_ADAPTERS',
19 '//incubator/api:onos-incubator-api-tests', 13 '//incubator/api:onos-incubator-api-tests',
20 - '//apps/routing-api:onos-app-routing-api-tests', 14 + '//apps/routing-api:onos-apps-routing-api-tests',
21 ] 15 ]
22 16
23 -java_library( 17 +osgi_jar_with_tests (
24 - name = CURRENT_NAME,
25 - srcs = glob([SRC + '/*.java']),
26 deps = COMPILE_DEPS, 18 deps = COMPILE_DEPS,
27 - visibility = ['PUBLIC'], 19 + test_deps = TEST_DEPS,
28 - resources_root = 'src/main/resources',
29 - resources = glob(['src/main/resources/**']),
30 -)
31 -
32 -java_test(
33 - name = 'tests',
34 - srcs = glob([TEST + '/*.java']),
35 - deps = COMPILE_DEPS +
36 - TEST_DEPS +
37 - [CURRENT_TARGET],
38 - source_under_test = [CURRENT_TARGET],
39 ) 20 )
......
...@@ -7,13 +7,13 @@ CURRENT_TARGET = ':' + CURRENT_NAME ...@@ -7,13 +7,13 @@ CURRENT_TARGET = ':' + CURRENT_NAME
7 COMPILE_DEPS = [ 7 COMPILE_DEPS = [
8 '//lib:CORE_DEPS', 8 '//lib:CORE_DEPS',
9 '//incubator/api:onos-incubator-api', 9 '//incubator/api:onos-incubator-api',
10 - '//apps/routing-api:onos-app-routing-api', 10 + '//apps/routing-api:onos-apps-routing-api',
11 ] 11 ]
12 12
13 TEST_DEPS = [ 13 TEST_DEPS = [
14 '//lib:TEST_ADAPTERS', 14 '//lib:TEST_ADAPTERS',
15 '//incubator/api:onos-incubator-api-tests', 15 '//incubator/api:onos-incubator-api-tests',
16 - '//apps/routing-api:onos-app-routing-api-tests', 16 + '//apps/routing-api:onos-apps-routing-api-tests',
17 ] 17 ]
18 18
19 java_library( 19 java_library(
......
...@@ -10,7 +10,7 @@ COMPILE_DEPS = [ ...@@ -10,7 +10,7 @@ COMPILE_DEPS = [
10 '//lib:javax.ws.rs-api', 10 '//lib:javax.ws.rs-api',
11 '//cli:onos-cli', 11 '//cli:onos-cli',
12 '//incubator/api:onos-incubator-api', 12 '//incubator/api:onos-incubator-api',
13 - '//apps/routing-api:onos-app-routing-api', 13 + '//apps/routing-api:onos-apps-routing-api',
14 '//utils/rest:onlab-rest', 14 '//utils/rest:onlab-rest',
15 15
16 ] 16 ]
......
...@@ -12,7 +12,7 @@ COMPILE_DEPS = [ ...@@ -12,7 +12,7 @@ COMPILE_DEPS = [
12 '//cli:onos-cli', 12 '//cli:onos-cli',
13 '//utils/rest:onlab-rest', 13 '//utils/rest:onlab-rest',
14 '//incubator/api:onos-incubator-api', 14 '//incubator/api:onos-incubator-api',
15 - '//apps/routing-api:onos-app-routing-api', 15 + '//apps/routing-api:onos-apps-routing-api',
16 ] 16 ]
17 17
18 TEST_DEPS = [ 18 TEST_DEPS = [
......
1 ONOS_ORIGIN = 'ON.Lab' 1 ONOS_ORIGIN = 'ON.Lab'
2 +ONOS_GROUP_ID = 'org.onosproject'
2 ONOS_VERSION = '1.6.0-SNAPSHOT' 3 ONOS_VERSION = '1.6.0-SNAPSHOT'
3 DEFAULT_APP_CATEGORY = 'Utility' 4 DEFAULT_APP_CATEGORY = 'Utility'
4 ONOS_ARTIFACT_BASE = 'onos-' 5 ONOS_ARTIFACT_BASE = 'onos-'
5 -APP_PREFIX = 'org.onosproject.' 6 +APP_PREFIX = ONOS_GROUP_ID + '.'
6 7
7 import os.path 8 import os.path
8 9
...@@ -50,8 +51,7 @@ def onos_app( ...@@ -50,8 +51,7 @@ def onos_app(
50 feature_coords = '$(maven_coords %s)' % included_bundles[0] 51 feature_coords = '$(maven_coords %s)' % included_bundles[0]
51 52
52 if not feature_coords: 53 if not feature_coords:
53 - print 'Missing maven coordinates for %s app feature.' % name 54 + feature_coords = '%s:%s:%s' % ( ONOS_GROUP_ID, _get_name(), ONOS_VERSION )
54 - return
55 55
56 args = [ '-n %s' % feature_coords, 56 args = [ '-n %s' % feature_coords,
57 '-v %s' % version, 57 '-v %s' % version,
......