Ray Milkey
Committed by Brian O'Connor

app buck refactor for apps: aaa, acl, bgprouter

Change-Id: Iaa970e3a937cc1df0aff29cc45f4c08c2d79cd13
......@@ -86,15 +86,16 @@ CORE = [
APPS = [
'//apps/dhcp:onos-apps-dhcp-oar',
'//apps/fwd:onos-apps-fwd-oar',
'//apps/aaa:onos-apps-aaa-oar',
'//apps/acl:onos-apps-acl-oar',
'//apps/bgprouter:onos-apps-bgprouter-oar',
'//apps/proxyarp:onos-apps-proxyarp-oar',
]
APP_JARS = [
'//apps/cpman/api:onos-app-cpman-api',
'//apps/cpman/app:onos-app-cpman-app',
'//apps/aaa:onos-app-aaa',
'//apps/acl:onos-app-acl',
'//apps/bgprouter:onos-app-bgprouter',
'//apps/routing-api:onos-app-routing-api',
'//apps/routing-api:onos-apps-routing-api',
'//apps/cip:onos-app-cip',
'//apps/cordmcast:onos-app-cord-mcast',
'//apps/cordvtn:onos-apps-cordvtn',
......@@ -123,8 +124,7 @@ APP_JARS = [
'//apps/optical:onos-app-optical',
'//apps/pathpainter:onos-app-pp',
'//apps/pim:onos-app-pim',
'//apps/proxyarp:onos-app-proxyarp',
'//apps/routing:onos-app-routing',
'//apps/routing:onos-apps-routing',
'//apps/sdnip:onos-app-sdnip',
'//apps/segmentrouting:onos-app-segmentrouting',
'//apps/test:onos-app-test',
......
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-aaa'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:org.apache.karaf.shell.console',
......@@ -15,18 +9,14 @@ TEST_DEPS = [
'//core/common:onos-core-common',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
osgi_jar_with_tests (
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
test_deps = TEST_DEPS,
)
java_test(
name = 'tests',
srcs = glob([TEST + '/*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[CURRENT_TARGET],
source_under_test = [CURRENT_TARGET],
onos_app (
title = 'Authentication App',
category = 'Security',
url = 'http://onosproject.org',
description = 'ONOS authentication application.',
)
......
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-acl'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:javax.ws.rs-api',
......@@ -16,18 +10,15 @@ TEST_DEPS = [
'//lib:jersey-server',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
osgi_jar_with_tests (
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
test_deps = TEST_DEPS,
web_context = '/onos/v1/acl',
)
java_test(
name = 'tests',
srcs = glob([TEST + '/*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[CURRENT_TARGET],
source_under_test = [CURRENT_TARGET],
onos_app (
title = 'ACL App',
category = 'Security',
url = 'http://onosproject.org',
description = 'ONOS ACL application.',
)
......
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-bgprouter'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//incubator/api:onos-incubator-api',
'//apps/routing-api:onos-app-routing-api',
'//apps/routing-api:onos-apps-routing-api',
]
TEST_DEPS = [
'//lib:TEST',
BUNDLES = [
'//apps/routing-api:onos-apps-routing-api',
'//apps/routing:onos-apps-routing',
'//apps/bgprouter:onos-apps-bgprouter',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
osgi_jar (
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
)
java_test(
name = 'tests',
srcs = glob([TEST + '/*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[CURRENT_TARGET],
source_under_test = [CURRENT_TARGET],
onos_app (
title = 'BGP Router App',
category = 'Traffic Steering',
url = 'http://onosproject.org',
description = 'BGP router application.',
required_apps = [ 'org.onosproject.proxyarp' ],
included_bundles = BUNDLES,
)
......
......@@ -3,8 +3,7 @@ BUNDLES = [
'//apps/dhcp/app:onos-apps-dhcp-app',
]
onos_app(
feature_coords = ONOS_GROUP_ID + ':onos-apps-dhcp:' + ONOS_VERSION,
onos_app (
title = 'DHCP Server App',
category = 'Utility',
url = 'http://onosproject.org',
......
......@@ -4,11 +4,11 @@ COMPILE_DEPS = [
'//cli:onos-cli',
]
osgi_jar(
osgi_jar_with_tests (
deps = COMPILE_DEPS,
)
onos_app(
onos_app (
title = 'Reactive Forwarding App',
category = 'Traffic Steering',
url = 'http://onosproject.org',
......
......@@ -9,7 +9,7 @@ COMPILE_DEPS = [
'//lib:org.apache.karaf.shell.console',
'//cli:onos-cli',
'//incubator/api:onos-incubator-api',
'//apps/routing-api:onos-app-routing-api',
'//apps/routing-api:onos-apps-routing-api',
]
TEST_DEPS = [
......
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-proxyarp'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
osgi_jar (
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
)
java_test(
name = 'tests',
srcs = glob([TEST + '/*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[CURRENT_TARGET],
source_under_test = [CURRENT_TARGET],
onos_app (
title = 'Proxy ARP/NDP App',
category = 'Traffic Steering',
url = 'http://onosproject.org',
description = 'Proxy ARP/NDP application.',
)
......
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-routing-api'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
]
......@@ -12,19 +6,8 @@ TEST_DEPS = [
'//lib:TEST_ADAPTERS',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
osgi_jar_with_tests (
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
test_deps = TEST_DEPS,
)
java_test(
name = 'onos-app-routing-api-tests',
srcs = glob([TEST + '/*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[CURRENT_TARGET],
source_under_test = [CURRENT_TARGET],
visibility = ['PUBLIC'],
)
......
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-routing'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:org.apache.karaf.shell.console',
'//lib:concurrent-trees',
'//cli:onos-cli',
'//incubator/api:onos-incubator-api',
'//apps/routing-api:onos-app-routing-api',
'//apps/routing-api:onos-apps-routing-api',
'//core/common:onos-core-common',
]
TEST_DEPS = [
'//lib:TEST_ADAPTERS',
'//incubator/api:onos-incubator-api-tests',
'//apps/routing-api:onos-app-routing-api-tests',
'//apps/routing-api:onos-apps-routing-api-tests',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
osgi_jar_with_tests (
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
resources_root = 'src/main/resources',
resources = glob(['src/main/resources/**']),
)
java_test(
name = 'tests',
srcs = glob([TEST + '/*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[CURRENT_TARGET],
source_under_test = [CURRENT_TARGET],
test_deps = TEST_DEPS,
)
......
......@@ -7,13 +7,13 @@ CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//incubator/api:onos-incubator-api',
'//apps/routing-api:onos-app-routing-api',
'//apps/routing-api:onos-apps-routing-api',
]
TEST_DEPS = [
'//lib:TEST_ADAPTERS',
'//incubator/api:onos-incubator-api-tests',
'//apps/routing-api:onos-app-routing-api-tests',
'//apps/routing-api:onos-apps-routing-api-tests',
]
java_library(
......
......@@ -10,7 +10,7 @@ COMPILE_DEPS = [
'//lib:javax.ws.rs-api',
'//cli:onos-cli',
'//incubator/api:onos-incubator-api',
'//apps/routing-api:onos-app-routing-api',
'//apps/routing-api:onos-apps-routing-api',
'//utils/rest:onlab-rest',
]
......
......@@ -12,7 +12,7 @@ COMPILE_DEPS = [
'//cli:onos-cli',
'//utils/rest:onlab-rest',
'//incubator/api:onos-incubator-api',
'//apps/routing-api:onos-app-routing-api',
'//apps/routing-api:onos-apps-routing-api',
]
TEST_DEPS = [
......
ONOS_ORIGIN = 'ON.Lab'
ONOS_GROUP_ID = 'org.onosproject'
ONOS_VERSION = '1.6.0-SNAPSHOT'
DEFAULT_APP_CATEGORY = 'Utility'
ONOS_ARTIFACT_BASE = 'onos-'
APP_PREFIX = 'org.onosproject.'
APP_PREFIX = ONOS_GROUP_ID + '.'
import os.path
......@@ -50,8 +51,7 @@ def onos_app(
feature_coords = '$(maven_coords %s)' % included_bundles[0]
if not feature_coords:
print 'Missing maven coordinates for %s app feature.' % name
return
feature_coords = '%s:%s:%s' % ( ONOS_GROUP_ID, _get_name(), ONOS_VERSION )
args = [ '-n %s' % feature_coords,
'-v %s' % version,
......