Ray Milkey
Committed by Gerrit Code Review

Initial BUCK build

Change-Id: I64e8a979301989062f4545a4841b06c15a372049
Showing 129 changed files with 3763 additions and 6 deletions
[buildfile]
includes = //buck-tools/default.defs
[java]
source_level = 8
target_level = 8
DEPS = [
'//utils/osgi:onlab-osgi',
'//utils/junit:onlab-junit',
'//utils/misc:onlab-misc',
'//utils/rest:onlab-rest',
'//core/api:onos-api',
'//incubator/api:onos-incubator-api',
'//incubator/net:onos-incubator-net',
'//core/net:onos-core-net',
'//core/store/primitives:onos-core-primitives',
'//core/store/serializers:onos-core-serializers',
'//core/store/dist:onos-core-dist',
'//core/security:onos-security',
'//core/store/persistence:onos-core-persistence',
'//cli:onos-cli',
'//protocols/rest/api:onos-restsb-api',
'//protocols/rest/ctl:onos-restsb-ctl',
'//protocols/bgp/bgpio:onos-bgpio',
'//protocols/bgp/api:onos-bgp-api',
'//protocols/bgp/ctl:onos-bgp-ctl',
'//protocols/netconf/api:onos-netconf-api',
'//protocols/netconf/ctl:onos-netconf-ctl',
'//protocols/openflow/api:onos-of-api',
'//protocols/openflow/ctl:onos-of-ctl',
'//protocols/ospf/api:onos-ospf-api',
'//protocols/ospf/protocol:onos-ospf-protocol',
'//protocols/ospf/ctl:onos-ospf-ctl',
'//protocols/ovsdb/rfc:onos-ovsdb-rfc',
'//protocols/ovsdb/api:onos-ovsdb-api',
'//protocols/ovsdb/ctl:onos-ovsdb-ctl',
'//protocols/pcep/pcepio:onos-pcep-pcepio',
'//protocols/pcep/api:onos-pcep-controller-api',
'//protocols/pcep/ctl:onos-pcep-ctl',
'//drivers/utilities:onos-drivers-utilities',
'//drivers/ciena:onos-drivers-ciena',
'//drivers/cisco:onos-drivers-cisco',
'//drivers/default:onos-drivers-default',
'//drivers/fujitsu:onos-drivers-fujitsu',
'//drivers/lumentum:onos-drivers-lumentum',
'//drivers/netconf:onos-drivers-netconf',
'//drivers/ovsdb:onos-drivers-ovsdb',
'//providers/bgp/cfg:onos-bgp-provider-cfg',
'//providers/bgp/flow:onos-bgp-provider-flow',
'//providers/bgp/topology:onos-bgp-provider-topology',
'//providers/host:onos-host-provider',
'//providers/lldpcommon:onos-lldp-provider-common',
'//providers/netcfglinks:onos-netcfg-links-provider',
'//providers/lldp:onos-lldp-provider',
'//providers/netconf/device:onos-netconf-provider-device',
'//providers/netcfghost:onos-netcfg-links-provider',
'//providers/null:onos-null-providers',
'//providers/openflow/device:onos-of-provider-device',
'//providers/openflow/flow:onos-of-provider-flow',
'//providers/openflow/group:onos-of-provider-group',
'//providers/openflow/message:onos-of-provider-message',
'//providers/openflow/meter:onos-of-provider-meter',
'//providers/openflow/packet:onos-of-provider-packet',
'//providers/ovsdb/device:onos-ovsdb-provider-device',
'//providers/ovsdb/host:onos-ovsdb-provider-host',
'//providers/ovsdb/tunnel:onos-ovsdb-provider-tunnel',
'//providers/pcep/topology:onos-pcep-provider-topology',
'//providers/pcep/tunnel:onos-pcep-provider-tunnel',
'//providers/rest/device:onos-restsb-provider-device',
'//providers/snmp/alarm:onos-snmp-provider-alarm',
'//providers/snmp/device:onos-snmp-provider-device',
'//web/api:onos-rest',
'//web/gui:onos-gui',
'//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/cip:onos-app-cip',
'//apps/cordmcast:onos-app-cord-mcast',
'//apps/cordvtn:onos-app-cordvtn',
'//apps/dhcp/api:onos-app-dhcp-api',
'//apps/dhcp/app:onos-app-dhcp-app',
'//apps/drivermatrix:onos-app-drivermatrix',
'//apps/events:onos-app-events',
'//apps/faultmanagement:onos-app-fm',
'//apps/flowanalyzer:onos-app-flowanalyzer',
'//apps/fwd:onos-app-fwd',
'//apps/igmp:onos-app-igmp',
'//apps/influxdbmetrics:onos-app-influxdb',
'//apps/olt:onos-app-olt-api',
'//apps/olt:onos-app-olt-app',
'//apps/iptopology-api:onos-app-iptopology-api',
'//apps/metrics:onos-app-metrics',
'//apps/metricsreporter:onos-app-metrics-reporter',
'//apps/mfwd:onos-app-mfwd',
'//apps/mlb:onos-app-mlb',
'//apps/mobility:onos-app-mobility',
'//apps/openstackinterface:onos-app-openstackinterface-api',
'//apps/openstackinterface:onos-app-openstackinterface-app',
'//apps/openstacknetworking:onos-app-openstacknetworking',
'//apps/openstacknode:onos-app-openstacknode',
'//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/sdnip:onos-app-sdnip',
'//apps/segmentrouting:onos-app-segmentrouting',
'//apps/test:onos-app-test',
'//apps/vtn:onos-app-vtn',
'//apps/virtualbng:onos-app-virtualbng',
'//apps/vpls:onos-app-vpls',
'//apps/vrouter:onos-app-vrouter',
]
java_library(
name = 'onos',
visibility = ['PUBLIC'],
deps = DEPS
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-aaa'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:org.apache.karaf.shell.console',
'//cli:onos-cli',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-acl'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:javax.ws.rs-api',
'//utils/rest:onlab-rest',
'//core/store/serializers:onos-core-serializers',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/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',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-cip'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-cord-mcast'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:javax.ws.rs-api',
'//lib:jersey-client',
'//lib:jersey-common',
'//utils/rest:onlab-rest',
'//apps/olt:onos-app-olt-api',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-cordvtn'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:org.apache.karaf.shell.console',
'//lib:javax.ws.rs-api',
'//lib:jsch',
'//utils/rest:onlab-rest',
'//cli:onos-cli',
'//core/store/serializers:onos-core-serializers',
'//apps/openstackinterface:onos-app-openstackinterface-api',
'//apps/dhcp/api:onos-app-dhcp-api',
'//protocols/ovsdb/api:onos-ovsdb-api',
'//protocols/ovsdb/rfc:onos-ovsdb-rfc',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-cpman-api'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-cpman-app'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:org.apache.karaf.shell.console',
'//lib:javax.ws.rs-api',
'//lib:rrd4j',
'//apps/cpman/api:onos-app-cpman-api',
'//utils/rest:onlab-rest',
'//cli:onos-cli',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-dhcp-api'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-dhcp-app'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:javax.ws.rs-api',
'//lib:org.apache.karaf.shell.console',
'//apps/dhcp/api:onos-app-dhcp-api',
'//utils/rest:onlab-rest',
'//core/store/serializers:onos-core-serializers',
'//cli:onos-cli',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-drivermatrix'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:org.apache.karaf.shell.console',
'//cli:onos-cli',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-events'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:org.apache.karaf.shell.console',
'//cli:onos-cli',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:org.apache.karaf.shell.console',
'//incubator/api:onos-incubator-api',
'//cli:onos-cli',
'//utils/rest:onlab-rest',
'//lib:javax.ws.rs-api',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = 'onos-app-fm',
visibility = ['PUBLIC'],
deps = [':fmcli', ':fmgui', ':fmmgr', ':fmweb'],
)
java_library(
name = 'fmcli',
srcs = glob(['fmcli/' + SRC + '*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
resources_root = 'fmcli/src/main/resources',
resources = glob(['fmcli/src/main/resources/**']),
)
java_test(
name = 'fmcli-tests',
srcs = glob(['fmcli/' + TEST + '*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[':fmcli'],
source_under_test = [':fmcli'],
)
java_library(
name = 'fmgui',
srcs = glob(['fmgui/' + SRC + '*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
resources_root = 'fmgui/src/main/resources',
resources = glob(['fmgui/src/main/resources/**']),
)
java_test(
name = 'fmgui-tests',
srcs = glob(['fmgui/' + TEST + '*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[':fmgui'],
source_under_test = [':fmgui'],
)
java_library(
name = 'fmmgr',
srcs = glob(['fmmgr/' + SRC + '*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
)
java_test(
name = 'fmmgr-tests',
srcs = glob(['fmmgr/' + TEST + '*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[':fmmgr'],
source_under_test = [':fmmgr'],
)
java_library(
name = 'fmweb',
srcs = glob(['fmweb/' + SRC + '*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
)
java_test(
name = 'fmweb-tests',
srcs = glob(['fmweb/' + TEST + '*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[':fmweb'],
source_under_test = [':fmweb'],
resources_root = 'fmweb/src/test/resources',
resources = glob(['fmweb/src/test/resources/**']),
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-flowanalyzer'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:org.apache.karaf.shell.console',
'//cli:onos-cli',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-fwd'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:org.apache.karaf.shell.console',
'//cli:onos-cli',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-igmp'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:org.apache.karaf.shell.console',
'//cli:onos-cli',
'//apps/olt:onos-app-olt-api',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-influxdb'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:org.apache.karaf.shell.console',
'//lib:metrics-influxdb',
'//lib:influxdb-java',
'//cli:onos-cli',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-iptopology-api'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-metrics'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:org.apache.karaf.shell.console',
'//lib:javax.ws.rs-api',
'//utils/rest:onlab-rest',
'//cli:onos-cli',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-metrics-reporter'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:gmetric4j',
'//lib:metrics-ganglia',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-mfwd'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-mlb'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-mobility'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:javax.ws.rs-api',
'//lib:jersey-client',
'//lib:org.apache.karaf.shell.console',
'//utils/rest:onlab-rest',
'//cli:onos-cli',
'//core/store/serializers:onos-core-serializers',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = 'onos-app-olt-api',
srcs = glob(['api/' + SRC + '*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
)
java_test(
name = 'onos-app-olt-api-tests',
srcs = glob([TEST + 'api/*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[':onos-app-olt-api'],
source_under_test = [':onos-app-olt-api'],
)
java_library(
name = 'onos-app-olt-app',
srcs = glob(['app/' + SRC + '*.java']),
deps = COMPILE_DEPS + [':onos-app-olt-api'],
visibility = ['PUBLIC'],
)
java_test(
name = 'onos-app-olt-app-tests',
srcs = glob([TEST + 'app/*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[':onos-app-olt-api', ':onos-app-olt-app'],
source_under_test = [':onos-app-olt-app'],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:jersey-client',
'//lib:javax.ws.rs-api',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = 'onos-app-openstackinterface-api',
srcs = glob(['api/' + SRC + '*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
)
java_test(
name = 'onos-app-openstackinterface-api-tests',
srcs = glob([TEST + '/*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[':onos-app-openstackinterface-api'],
source_under_test = [':onos-app-openstackinterface-api'],
)
java_library(
name = 'onos-app-openstackinterface-app',
srcs = glob(['app/' + SRC + '*.java']),
deps = COMPILE_DEPS + [':onos-app-openstackinterface-api'],
visibility = ['PUBLIC'],
)
java_test(
name = 'onos-app-openstackinterface-app-tests',
srcs = glob([TEST + '/*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[':onos-app-openstackinterface-api', ':onos-app-openstackinterface-app'],
source_under_test = [':onos-app-openstackinterface-app'],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:jersey-client',
'//lib:javax.ws.rs-api',
'//apps/openstackinterface:onos-app-openstackinterface-api',
'//core/store/serializers:onos-core-serializers',
]
java_library(
name = 'onos-app-openstacknetworking',
visibility = ['PUBLIC'],
deps = [
':onos-app-openstacknetworking-api',
':onos-app-openstacknetworking-app',
':onos-app-openstackrouting',
':onos-app-openstackswitching',
':onos-app-openstacknetworking-web',
]
)
TEST_DEPS = [
'//lib:TEST',
':onos-app-openstacknetworking',
]
java_library(
name = 'onos-app-openstacknetworking-api',
srcs = glob(['api/' + SRC + '*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
)
java_test(
name = 'onos-app-openstacknetworking-api-tests',
srcs = glob([TEST + 'api/*.java']),
deps = COMPILE_DEPS +
TEST_DEPS,
source_under_test = [':onos-app-openstacknetworking-api'],
)
java_library(
name = 'onos-app-openstacknetworking-app',
srcs = glob(['app/' + SRC + '*.java']),
deps = COMPILE_DEPS + [':onos-app-openstacknetworking-api'],
visibility = ['PUBLIC'],
)
java_test(
name = 'onos-app-openstacknetworking-app-tests',
srcs = glob([TEST + 'app/*.java']),
deps = COMPILE_DEPS +
TEST_DEPS,
source_under_test = [':onos-app-openstacknetworking-app'],
)
java_library(
name = 'onos-app-openstackrouting',
srcs = glob(['openstackrouting/' + SRC + '*.java']),
deps = COMPILE_DEPS + [':onos-app-openstacknetworking-api'],
visibility = ['PUBLIC'],
)
java_test(
name = 'onos-app-openstackrouting-tests',
srcs = glob([TEST + 'openstackrouting/*.java']),
deps = COMPILE_DEPS +
TEST_DEPS,
source_under_test = [':onos-app-openstackrouting'],
)
java_library(
name = 'onos-app-openstackswitching',
srcs = glob(['openstgackswitching/' + SRC + '*.java']),
deps = COMPILE_DEPS + [':onos-app-openstacknetworking-api'],
visibility = ['PUBLIC'],
)
java_test(
name = 'onos-app-openstackswitching-tests',
srcs = glob([TEST + 'openstackswitching/*.java']),
deps = COMPILE_DEPS +
TEST_DEPS,
source_under_test = [':onos-app-openstackswitching'],
)
java_library(
name = 'onos-app-openstacknetworking-web',
srcs = glob(['openstgacknetworking/' + SRC + '*.java']),
deps = COMPILE_DEPS + [':onos-app-openstacknetworking-api'],
visibility = ['PUBLIC'],
)
java_test(
name = 'onos-app-openstacknetworking-web-tests',
srcs = glob([TEST + 'openstackswitching/*.java']),
deps = COMPILE_DEPS +
TEST_DEPS,
source_under_test = [':onos-app-openstacknetworking-web'],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-openstacknode'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//protocols/ovsdb/api:onos-ovsdb-api',
'//protocols/ovsdb/rfc:onos-ovsdb-rfc',
'//core/store/serializers:onos-core-serializers',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-optical'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-pp'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-pcep-api'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//protocols/ovsdb/api:onos-ovsdb-api',
'//protocols/ovsdb/rfc:onos-ovsdb-rfc',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-pim'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:org.apache.karaf.shell.console',
'//cli:onos-cli',
'//incubator/api:onos-incubator-api',
'//apps/routing-api:onos-app-routing-api',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/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']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-routing-api'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/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',
'//core/common:onos-core-common',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-sdnip'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//incubator/api:onos-incubator-api',
'//apps/routing-api:onos-app-routing-api',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-segmentrouting'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:org.apache.karaf.shell.console',
'//lib:javax.ws.rs-api',
'//cli:onos-cli',
'//incubator/api:onos-incubator-api',
'//apps/routing-api:onos-app-routing-api',
'//utils/rest:onlab-rest',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:org.apache.karaf.shell.console',
'//cli:onos-cli',
'//utils/rest:onlab-rest',
'//lib:javax.ws.rs-api',
'//core/store/serializers:onos-core-serializers',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = 'onos-app-test',
visibility = ['PUBLIC'],
deps = [':onos-app-demo',
':onos-app-distributed-primitives',
':onos-app-election',
':onos-app-intent-perf',
':onos-app-loadtest',
':onos-app-messaging-perf',
],
)
# demo
java_library(
name = 'onos-app-demo',
srcs = glob(['demo/' + SRC + '*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
)
java_test(
name = 'onos-app-demo-tests',
srcs = glob(['demo/' + TEST + '*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[':onos-app-demo'],
source_under_test = [':onos-app-demo'],
)
# distributed-primitives
java_library(
name = 'onos-app-distributed-primitives',
srcs = glob(['distributed-primitives/' + SRC + '*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
)
java_test(
name = 'onos-app-distributed-primitives-tests',
srcs = glob(['distributed-primitives/' + TEST + '*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[':onos-app-distributed-primitives'],
source_under_test = [':onos-app-distributed-primitives'],
)
# election
java_library(
name = 'onos-app-election',
srcs = glob(['election/' + SRC + '*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
)
java_test(
name = 'onos-app-election-tests',
srcs = glob(['election/' + TEST + '*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[':onos-app-election'],
source_under_test = [':onos-app-election'],
)
# intent-perf
java_library(
name = 'onos-app-intent-perf',
srcs = glob(['intent-perf/' + SRC + '*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
)
java_test(
name = 'onos-app-intent-perf-tests',
srcs = glob(['intent-perf/' + TEST + '*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[':onos-app-intent-perf'],
source_under_test = [':onos-app-intent-perf'],
)
# loadtest
java_library(
name = 'onos-app-loadtest',
srcs = glob(['loadtest/' + SRC + '*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
)
java_test(
name = 'onos-app-loadtest-tests',
srcs = glob(['loadtest/' + TEST + '*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[':onos-app-loadtest'],
source_under_test = [':onos-app-loadtest'],
)
# messaging-perf
java_library(
name = 'onos-app-messaging-perf',
srcs = glob(['messaging-perf/' + SRC + '*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
)
java_test(
name = 'onos-app-messaging-perf-tests',
srcs = glob(['messaging-perf/' + TEST + '*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[':onos-app-messaging-perf'],
source_under_test = [':onos-app-messaging-perf'],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-virtualbng'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:jersey-client',
'//lib:javax.ws.rs-api',
'//lib:org.apache.karaf.shell.console',
'//cli:onos-cli',
'//utils/rest:onlab-rest',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-vpls'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:jersey-client',
'//lib:javax.ws.rs-api',
'//lib:org.apache.karaf.shell.console',
'//cli:onos-cli',
'//utils/rest:onlab-rest',
'//incubator/api:onos-incubator-api',
'//apps/routing-api:onos-app-routing-api',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-vrouter'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//incubator/api:onos-incubator-api',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:org.apache.karaf.shell.console',
'//cli:onos-cli',
'//utils/rest:onlab-rest',
'//lib:javax.ws.rs-api',
'//core/store/serializers:onos-core-serializers',
'//incubator/api:onos-incubator-api',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = 'onos-app-vtn',
visibility = ['PUBLIC'],
deps = [':onos-app-sfc-mgr',
':onos-app-vtn-mgr',
':onos-app-vtn-rsc',
':onos-app-vtn-web',
],
)
# sfcmgr
java_library(
name = 'onos-app-sfc-mgr',
srcs = glob(['sfcmgr/' + SRC + '*.java']),
deps = COMPILE_DEPS + [':onos-app-vtn-rsc'],
visibility = ['PUBLIC'],
)
java_test(
name = 'onos-app-sfc-mgr-tests',
srcs = glob(['sfcmgr/' + TEST + '*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[':onos-app-sfc-mgr', ':onos-app-vtn-rsc'],
source_under_test = [':onos-app-sfc-mgr'],
)
# vtnmgr
java_library(
name = 'onos-app-vtn-mgr',
srcs = glob(['vtnmgr/' + SRC + '*.java']),
deps = COMPILE_DEPS + [':onos-app-vtn-rsc'],
visibility = ['PUBLIC'],
resources_root = 'vtnmgr/src/main/resources',
resources = glob(['vtnmgr/src/main/resources/**']),
)
java_test(
name = 'onos-app-vtn-mgr-tests',
srcs = glob(['vtnmgr/' + TEST + '*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[':onos-app-vtn-mgr', ':onos-app-vtn-rsc'],
source_under_test = [':onos-app-vtn-mgr'],
)
# vtnrsc
java_library(
name = 'onos-app-vtn-rsc',
srcs = glob(['vtnrsc/' + SRC + '*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
resources_root = 'vtnrsc/src/main/resources',
resources = glob(['vtnrsc/src/main/resources/**']),
)
java_test(
name = 'onos-app-vtn-rsc-tests',
srcs = glob(['vtnrsc/' + TEST + '*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[':onos-app-vtn-rsc'],
source_under_test = [':onos-app-vtn-rsc'],
)
# vtnweb
java_library(
name = 'onos-app-vtn-web',
srcs = glob(['vtnweb/' + SRC + '*.java']),
deps = COMPILE_DEPS + [':onos-app-vtn-rsc'],
visibility = ['PUBLIC'],
)
java_test(
name = 'onos-app-vtn-web-tests',
srcs = glob(['vtnweb/' + TEST + '*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[':onos-app-vtn-web', ':onos-app-vtn-rsc'],
source_under_test = [':onos-app-vtn-web'],
resources_root = 'vtnweb/src/test/resources',
resources = glob(['vtnweb/src/test/resources/**']),
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-app-xos-integration'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:jersey-client',
'//lib:javax.ws.rs-api',
'//lib:org.apache.karaf.shell.console',
'//cli:onos-cli',
'//utils/rest:onlab-rest',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
python_binary(
name = 'download_file',
main = 'download_file.py',
deps = [':util'],
visibility = ['PUBLIC'],
)
python_binary(
name = 'pack_war',
main = 'pack_war.py',
deps = [':util'],
visibility = ['PUBLIC'],
)
python_library(
name = 'util',
srcs = [
'util.py',
'__init__.py'
],
visibility = ['PUBLIC'],
)
def shquote(s):
return s.replace("'", "'\\''")
def os_path():
from os import environ
return environ.get('PATH')
genrule(
name = 'buck',
cmd = 'echo buck=`which buck`>$OUT;' +
("echo PATH=\''%s'\' >>$OUT;" % shquote(os_path())),
out = 'buck.properties',
visibility = ['PUBLIC'],
)
This diff is collapsed. Click to expand it.
File mode changed
# Copyright (C) 2013 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# These definitions support building a runnable version of Gerrit.
DOCS_HTML = '//Documentation:html'
DOCS_LIB = '//Documentation:index_lib'
LIBS = [
'//gerrit-war:log4j-config',
'//gerrit-war:init',
'//lib:postgresql',
'//lib/log:impl_log4j',
]
PGMLIBS = ['//gerrit-pgm:pgm']
def scan_plugins():
import os
deps = []
for n in os.listdir('plugins'):
if os.path.exists(os.path.join('plugins', n, 'BUCK')):
deps.append('//plugins/%s:%s__plugin' % (n, n))
return deps
def war(
name,
libs = [],
pgmlibs = [],
context = [],
visibility = [],
docs = False
):
cmd = ['$(exe //tools:pack_war)', '-o', '$OUT', '--tmp', '$TMP']
for l in libs:
cmd.extend(['--lib', '$(classpath %s)' % l])
for l in pgmlibs:
cmd.extend(['--pgmlib', '$(classpath %s)' % l])
if docs:
cmd.append('$(location %s)' % DOCS_HTML)
cmd.extend(['--lib', '$(classpath %s)' % DOCS_LIB])
if context:
for t in context:
cmd.append('$(location %s)' % t)
genrule(
name = name,
cmd = ' '.join(cmd),
out = name + '.war',
visibility = visibility,
)
def gerrit_war(name, ui = 'ui_optdbg', context = [], docs = False, visibility = []):
ui_deps = []
if ui:
if ui == 'polygerrit' or ui == 'ui_optdbg' or ui == 'ui_optdbg_r':
ui_deps.append('//polygerrit-ui/app:polygerrit_ui')
if ui != 'polygerrit':
ui_deps.append('//gerrit-gwtui:%s' % ui)
war(
name = name,
libs = LIBS + ['//gerrit-war:version'],
pgmlibs = PGMLIBS,
context = ui_deps + context + [
'//gerrit-main:main_bin',
'//gerrit-war:webapp_assets',
],
docs = docs,
visibility = visibility,
)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<!--
This configuration file was written by the eclipse-cs plugin configuration editor
-->
<!--
Checkstyle-Configuration: Google Checks for Gerrit
Description:
Checkstyle configuration based on the Google coding conventions (https://google-styleguide.googlecode.com/svn-history/r130/trunk/javaguide.html),
edited to remove noisy warnings.
-->
<module name="Checker">
<property name="severity" value="warning"/>
<property name="charset" value="UTF-8"/>
<module name="TreeWalker">
<module name="FileContentsHolder"/>
<module name="OuterTypeFilename"/>
<module name="LineLength">
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
<property name="max" value="150"/>
<property name="tabWidth" value="2"/>
</module>
<module name="OneTopLevelClass"/>
<module name="NoLineWrap"/>
<module name="EmptyBlock">
<property name="option" value="TEXT"/>
<property name="tokens" value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
</module>
<module name="NeedBraces"/>
<module name="LeftCurly">
<property name="maxLineLength" value="150"/>
</module>
<module name="RightCurly">
<property name="option" value="alone"/>
<property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/>
</module>
<module name="WhitespaceAround">
<property name="severity" value="ignore"/>
<property name="allowEmptyConstructors" value="true"/>
<property name="allowEmptyMethods" value="true"/>
<property name="allowEmptyTypes" value="true"/>
<property name="allowEmptyLoops" value="true"/>
<message key="ws.notFollowed" value="WhitespaceAround: ''{0}'' is not followed by whitespace."/>
<message key="ws.notPreceded" value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="OneStatementPerLine"/>
<module name="MultipleVariableDeclarations"/>
<module name="ArrayTypeStyle"/>
<module name="UpperEll"/>
<module name="ModifierOrder"/>
<module name="EmptyLineSeparator">
<property name="severity" value="ignore"/>
<property name="allowNoEmptyLineBetweenFields" value="true"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="SeparatorWrap">
<property name="severity" value="ignore"/>
<property name="option" value="nl"/>
<property name="tokens" value="DOT"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="SeparatorWrap">
<property name="severity" value="ignore"/>
<property name="option" value="EOL"/>
<property name="tokens" value="COMMA"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="NoFinalizer"/>
<module name="GenericWhitespace">
<property name="severity" value="ignore"/>
<message key="ws.followed" value="GenericWhitespace ''{0}'' is followed by whitespace."/>
<message key="ws.illegalFollow" value="GenericWhitespace ''{0}'' should followed by whitespace."/>
<message key="ws.preceded" value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
<message key="ws.notPreceded" value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="Indentation">
<property name="severity" value="ignore"/>
<property name="basicOffset" value="2"/>
<property name="caseIndent" value="2"/>
<property name="arrayInitIndent" value="2"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="MethodParamPad">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="OperatorWrap">
<property name="severity" value="ignore"/>
<property name="option" value="NL"/>
<property name="tokens" value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR "/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
</module>
<module name="FileTabCharacter">
<property name="severity" value="ignore"/>
<property name="eachLine" value="true"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="SuppressWithNearbyCommentFilter">
<property name="commentFormat" value="CS IGNORE (\w+) FOR NEXT (\d+) LINES\. REASON\: \w+"/>
<property name="checkFormat" value="$1"/>
<property name="influenceFormat" value="$2"/>
</module>
<module name="SuppressionFilter">
<property name="file" value="${samedir}/checkstyle_suppressions.xml"/>
</module>
</module>
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions>
<suppress files="[/\\].apt_generated[/\\]" checks=".*"/>
</suppressions>
include_defs('//bucklets/maven_jar.bucklet')
BASE_DEPS = [
'//lib:junit',
'//lib:hamcrest-all',
'//lib:slf4j-api',
'//lib:guava-testlib',
]
#!/usr/bin/env python
# Copyright (C) 2013 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from optparse import OptionParser
import re
from subprocess import check_call, CalledProcessError, Popen, PIPE
MAIN = ['//buck-tools/eclipse:classpath']
PAT = re.compile(r'"(//.*?)" -> "//buck-tools:download_file"')
# TODO(davido): Remove this hack when Buck bugs are fixed:
# https://github.com/facebook/buck/issues/656
# https://github.com/facebook/buck/issues/658
JGIT = re.compile(r'//org.eclipse.jgit.*')
CELL = '//lib/jgit'
opts = OptionParser()
opts.add_option('--src', action='store_true')
args, _ = opts.parse_args()
targets = set()
p = Popen(['buck', 'audit', 'classpath', '--dot'] + MAIN, stdout = PIPE)
for line in p.stdout:
m = PAT.search(line)
if m:
n = m.group(1)
if JGIT.match(n):
n = CELL + n[1:]
if args.src and n.endswith('__download_bin'):
n = n[:-13] + 'src'
targets.add(n)
r = p.wait()
if r != 0:
exit(r)
try:
check_call(['buck', 'build'] + sorted(targets))
except CalledProcessError as err:
exit(1)
#!/usr/bin/env python
# Copyright (C) 2013 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
from hashlib import sha1
from optparse import OptionParser
from os import link, makedirs, path, remove
import shutil
from subprocess import check_call, CalledProcessError
from sys import stderr
from util import hash_file, resolve_url
from zipfile import ZipFile, BadZipfile, LargeZipFile
GERRIT_HOME = path.expanduser('~/.gerritcodereview')
CACHE_DIR = path.join(GERRIT_HOME, 'buck-cache', 'downloaded-artifacts')
# LEGACY_CACHE_DIR is only used to allow existing workspaces to move already
# downloaded files to the new cache directory.
# Please remove after 3 months (2015-10-07).
LEGACY_CACHE_DIR = path.join(GERRIT_HOME, 'buck-cache')
LOCAL_PROPERTIES = 'local.properties'
def safe_mkdirs(d):
if path.isdir(d):
return
try:
makedirs(d)
except OSError as err:
if not path.isdir(d):
raise err
def download_properties(root_dir):
""" Get the download properties.
First tries to find the properties file in the given root directory,
and if not found there, tries in the Gerrit settings folder in the
user's home directory.
Returns a set of download properties, which may be empty.
"""
p = {}
local_prop = path.join(root_dir, LOCAL_PROPERTIES)
if not path.isfile(local_prop):
local_prop = path.join(GERRIT_HOME, LOCAL_PROPERTIES)
if path.isfile(local_prop):
try:
with open(local_prop) as fd:
for line in fd:
if line.startswith('download.'):
d = [e.strip() for e in line.split('=', 1)]
name, url = d[0], d[1]
p[name[len('download.'):]] = url
except OSError:
pass
return p
def cache_entry(args):
if args.v:
h = args.v
else:
h = sha1(args.u.encode('utf-8')).hexdigest()
name = '%s-%s' % (path.basename(args.o), h)
return path.join(CACHE_DIR, name)
# Please remove after 3 months (2015-10-07). See LEGACY_CACHE_DIR above.
def legacy_cache_entry(args):
if args.v:
h = args.v
else:
h = sha1(args.u.encode('utf-8')).hexdigest()
name = '%s-%s' % (path.basename(args.o), h)
return path.join(LEGACY_CACHE_DIR, name)
opts = OptionParser()
opts.add_option('-o', help='local output file')
opts.add_option('-u', help='URL to download')
opts.add_option('-v', help='expected content SHA-1')
opts.add_option('-x', action='append', help='file to delete from ZIP')
opts.add_option('--exclude_java_sources', action='store_true')
opts.add_option('--unsign', action='store_true')
args, _ = opts.parse_args()
root_dir = args.o
while root_dir:
root_dir, n = path.split(root_dir)
if n == 'buck-out':
break
redirects = download_properties(root_dir)
cache_ent = cache_entry(args)
legacy_cache_ent = legacy_cache_entry(args)
src_url = resolve_url(args.u, redirects)
# Please remove after 3 months (2015-10-07). See LEGACY_CACHE_DIR above.
if not path.exists(cache_ent) and path.exists(legacy_cache_ent):
try:
safe_mkdirs(path.dirname(cache_ent))
except OSError as err:
print('error creating directory %s: %s' %
(path.dirname(cache_ent), err), file=stderr)
exit(1)
shutil.move(legacy_cache_ent, cache_ent)
if not path.exists(cache_ent):
try:
safe_mkdirs(path.dirname(cache_ent))
except OSError as err:
print('error creating directory %s: %s' %
(path.dirname(cache_ent), err), file=stderr)
exit(1)
print('Download %s' % src_url, file=stderr)
try:
check_call(['curl', '--proxy-anyauth', '-ksfo', cache_ent, src_url])
except OSError as err:
print('could not invoke curl: %s\nis curl installed?' % err, file=stderr)
exit(1)
except CalledProcessError as err:
print('error using curl: %s' % err, file=stderr)
exit(1)
if args.v:
have = hash_file(sha1(), cache_ent).hexdigest()
if args.v != have:
print((
'%s:\n' +
'expected %s\n' +
'received %s\n') % (src_url, args.v, have), file=stderr)
try:
remove(cache_ent)
except OSError as err:
if path.exists(cache_ent):
print('error removing %s: %s' % (cache_ent, err), file=stderr)
exit(1)
exclude = []
if args.x:
exclude += args.x
if args.exclude_java_sources:
try:
with ZipFile(cache_ent, 'r') as zf:
for n in zf.namelist():
if n.endswith('.java'):
exclude.append(n)
except (BadZipfile, LargeZipFile) as err:
print('error opening %s: %s' % (cache_ent, err), file=stderr)
exit(1)
if args.unsign:
try:
with ZipFile(cache_ent, 'r') as zf:
for n in zf.namelist():
if (n.endswith('.RSA')
or n.endswith('.SF')
or n.endswith('.LIST')):
exclude.append(n)
except (BadZipfile, LargeZipFile) as err:
print('error opening %s: %s' % (cache_ent, err), file=stderr)
exit(1)
safe_mkdirs(path.dirname(args.o))
if exclude:
try:
shutil.copyfile(cache_ent, args.o)
except (shutil.Error, IOError) as err:
print('error copying to %s: %s' % (args.o, err), file=stderr)
exit(1)
try:
check_call(['zip', '-d', args.o] + exclude)
except CalledProcessError as err:
print('error removing files from zip: %s' % err, file=stderr)
exit(1)
else:
try:
link(cache_ent, args.o)
except OSError as err:
try:
shutil.copyfile(cache_ent, args.o)
except (shutil.Error, IOError) as err:
print('error copying to %s: %s' % (args.o, err), file=stderr)
exit(1)
def java_doc(
name,
title,
pkgs,
paths,
srcs = [],
deps = [],
visibility = [],
do_it_wrong = False,
):
if do_it_wrong:
sourcepath = paths
else:
sourcepath = ['$SRCDIR/' + n for n in paths]
genrule(
name = name,
cmd = ' '.join([
'while ! test -f .buckconfig; do cd ..; done;',
'javadoc',
'-quiet',
'-protected',
'-encoding UTF-8',
'-charset UTF-8',
'-notimestamp',
'-windowtitle "' + title + '"',
'-link http://docs.oracle.com/javase/7/docs/api',
'-subpackages ',
':'.join(pkgs),
'-sourcepath ',
':'.join(sourcepath),
' -classpath ',
':'.join(['$(classpath %s)' % n for n in deps]),
'-d $TMP',
]) + ';jar cf $OUT -C $TMP .',
srcs = srcs,
out = name + '.jar',
visibility = visibility,
)
def java_sources(
name,
srcs,
visibility = []
):
java_library(
name = name,
resources = srcs,
visibility = visibility,
)
#!/usr/bin/env python
# Copyright (C) 2013 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
from optparse import OptionParser
from os import makedirs, path, symlink
from subprocess import check_call
import sys
opts = OptionParser()
opts.add_option('-o', help='path to write WAR to')
opts.add_option('--lib', action='append', help='target for WEB-INF/lib')
opts.add_option('--pgmlib', action='append', help='target for WEB-INF/pgm-lib')
opts.add_option('--tmp', help='temporary directory')
args, ctx = opts.parse_args()
war = args.tmp
jars = set()
basenames = set()
def prune(l):
return [j for e in l for j in e.split(':')]
def link_jars(libs, directory):
makedirs(directory)
for j in libs:
if j not in jars:
# When jgit is consumed from its own cell,
# potential duplicates should be filtered.
# e.g. jsch.jar will be reached through:
# 1. /home/username/projects/gerrit/buck-out/gen/lib/jsch.jar
# 2. /home/username/projects/jgit/buck-out/gen/lib/jsch.jar
if (j.find('jgit/buck-out/gen/lib') > 0
and path.basename(j) in basenames):
continue
jars.add(j)
n = path.basename(j)
if j.find('buck-out/gen/gerrit-') > 0:
n = j[j.find('buck-out'):].split('/')[2] + '-' + n
basenames.add(n)
symlink(j, path.join(directory, n))
if args.lib:
link_jars(prune(args.lib), path.join(war, 'WEB-INF', 'lib'))
if args.pgmlib:
link_jars(prune(args.pgmlib), path.join(war, 'WEB-INF', 'pgm-lib'))
try:
for s in ctx:
check_call(['unzip', '-q', '-d', war, s])
check_call(['zip', '-9qr', args.o, '.'], cwd=war)
except KeyboardInterrupt:
print('Interrupted by user', file=sys.stderr)
exit(1)
# Copyright (C) 2013 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
from os import path
REPO_ROOTS = {
'GERRIT': 'http://gerrit-maven.storage.googleapis.com',
'GERRIT_API': 'https://gerrit-api.commondatastorage.googleapis.com/release',
'MAVEN_CENTRAL': 'http://repo1.maven.org/maven2',
'MAVEN_LOCAL': 'file://' + path.expanduser('~/.m2/repository'),
}
def resolve_url(url, redirects):
""" Resolve URL of a Maven artifact.
prefix:path is passed as URL. prefix identifies known or custom
repositories that can be rewritten in redirects set, passed as
second arguments.
A special case is supported, when prefix neither exists in
REPO_ROOTS, no in redirects set: the url is returned as is.
This enables plugins to pass custom maven_repository URL as is
directly to maven_jar().
Returns a resolved path for Maven artifact.
"""
s = url.find(':')
if s < 0:
return url
scheme, rest = url[:s], url[s+1:]
if scheme in redirects:
root = redirects[scheme]
elif scheme in REPO_ROOTS:
root = REPO_ROOTS[scheme]
else:
return url
root = root.rstrip('/')
rest = rest.lstrip('/')
return '/'.join([root, rest])
def hash_file(hash_obj, path):
"""Hash the contents of a file.
Args:
hash_obj: an open hash object, e.g. hashlib.sha1().
path: path to the file to hash.
Returns:
The passed-in hash_obj.
"""
with open(path, 'rb') as f:
while True:
b = f.read(8192)
if not b:
break
hash_obj.update(b)
return hash_obj
def hash_bower_component(hash_obj, path):
"""Hash the contents of a bower component directory.
This is a stable hash of a directory downloaded with `bower install`, minus
the .bower.json file, which is autogenerated each time by bower. Used in lieu
of hashing a zipfile of the contents, since zipfiles are difficult to hash in
a stable manner.
Args:
hash_obj: an open hash object, e.g. hashlib.sha1().
path: path to the directory to hash.
Returns:
The passed-in hash_obj.
"""
if not os.path.isdir(path):
raise ValueError('Not a directory: %s' % path)
path = os.path.abspath(path)
for root, dirs, files in os.walk(path):
dirs.sort()
for f in sorted(files):
if f == '.bower.json':
continue
p = os.path.join(root, f)
hash_obj.update(p[len(path)+1:])
hash_file(hash_obj, p)
return hash_obj
# Copyright (C) 2013 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
GERRIT = 'GERRIT:'
GERRIT_API = 'GERRIT_API:'
MAVEN_CENTRAL = 'MAVEN_CENTRAL:'
MAVEN_LOCAL = 'MAVEN_LOCAL:'
def define_license(name):
n = 'LICENSE-' + name
genrule(
name = n,
cmd = 'ln -s $SRCS $OUT',
srcs = [n],
out = n,
visibility = ['PUBLIC'],
)
def maven_jar(
name,
id,
license,
exclude = [],
exclude_java_sources = False,
unsign = False,
deps = [],
exported_deps = [],
sha1 = '', bin_sha1 = '', src_sha1 = '',
repository = MAVEN_CENTRAL,
attach_source = True,
visibility = ['PUBLIC'],
local_license = False,
full_url = ''):
from os import path
parts = id.split(':')
if len(parts) not in [3, 4]:
raise NameError('%s:\nexpected id="groupId:artifactId:version[:classifier]"'
% id)
if len(parts) == 4:
group, artifact, version, classifier = parts
else:
group, artifact, version = parts
classifier = None
# SNAPSHOT artifacts are handled differently on Google storage bucket:
# 'SNAPSHOT' is discarded from the directory name. However on other
# Maven repositories, most notable local repository located in
# ~/.m2/repository (and is supported through MAVEN_LOCAL repository)
# it must be preserved, otherwise the artifact wouldn't be found.
# Atm the SNAPSHOT part is only discarded for Google storage bucket.
if 'SNAPSHOT' in version and repository.startswith(GERRIT):
file_version = version.replace('-SNAPSHOT', '')
version = version.split('-SNAPSHOT')[0] + '-SNAPSHOT'
else:
file_version = version
if classifier is not None:
file_version += '-' + classifier
jar = path.join(name, artifact.lower() + '-' + file_version)
url = '/'.join([
repository,
group.replace('.', '/'), artifact, version,
artifact + '-' + file_version])
if full_url != '':
url = full_url
binjar = jar + '.jar'
binurl = url + '.jar'
srcjar = jar + '-src.jar'
srcurl = url + '-sources.jar'
cmd = ['$(exe //buck-tools:download_file)', '-o', '$OUT', '-u', binurl]
if sha1:
cmd.extend(['-v', sha1])
elif bin_sha1:
cmd.extend(['-v', bin_sha1])
for x in exclude:
cmd.extend(['-x', x])
if exclude_java_sources:
cmd.append('--exclude_java_sources')
if unsign:
cmd.append('--unsign')
genrule(
name = '%s__download_bin' % name,
cmd = ' '.join(cmd),
out = binjar,
)
license = ':LICENSE-' + license
if not local_license:
license = '//lib' + license
license = [license]
if src_sha1 or attach_source:
cmd = ['$(exe //buck-tools:download_file)', '-o', '$OUT', '-u', srcurl]
if src_sha1:
cmd.extend(['-v', src_sha1])
genrule(
name = '%s__download_src' % name,
cmd = ' '.join(cmd),
out = srcjar,
)
prebuilt_jar(
name = '%s_src' % name,
binary_jar = ':%s__download_src' % name,
deps = license,
visibility = visibility,
)
else:
srcjar = None
genrule(
name = '%s_src' % name,
cmd = ':>$OUT',
out = '__%s__no_src' % name,
)
if exported_deps:
prebuilt_jar(
name = '%s__jar' % name,
deps = deps + license,
binary_jar = ':%s__download_bin' % name,
source_jar = ':%s__download_src' % name if srcjar else None,
)
java_library(
name = name,
exported_deps = exported_deps + [':' + name + '__jar'],
visibility = visibility,
)
else:
prebuilt_jar(
name = name,
deps = deps + license,
binary_jar = ':%s__download_bin' % name,
source_jar = ':%s__download_src' % name if srcjar else None,
visibility = visibility,
)
def merge_maven_jars(
name,
srcs,
visibility = []):
def cmd(jars):
return ('$(location //buck-tools:merge_jars) $OUT '
+ ' '.join(['$(location %s)' % j for j in jars]))
genrule(
name = '%s__merged_bin' % name,
cmd = cmd(['%s__download_bin' % s for s in srcs]),
out = '%s__merged.jar' % name,
)
genrule(
name = '%s__merged_src' % name,
cmd = cmd(['%s__download_src' % s for s in srcs]),
# buck-tools/eclipse/project.py requires -src.jar suffix.
out = '%s__merged-src.jar' % name,
)
prebuilt_jar(
name = name,
binary_jar = ':%s__merged_bin' % name,
source_jar = ':%s__merged_src' % name,
visibility = visibility,
)
SRC = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-cli'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:org.apache.karaf.shell.console',
'//incubator/api:onos-incubator-api',
'//utils/rest:onlab-rest',
'//core/common:onos-core-common',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
resources_root = 'src/main/resources',
resources = glob(['src/main/resources/**']),
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-api'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:COMPILE',
'//utils/misc:onlab-misc',
'//utils/osgi:onlab-osgi',
'//utils/rest:onlab-rest',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
deps = COMPILE_DEPS,
resources_root = 'src/test/resources',
resources = glob(['src/test/resources/**']),
visibility = ['PUBLIC'],
)
java_test(
name = 'onos-api-tests',
visibility = ['PUBLIC'],
srcs = glob([TEST + '/*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[CURRENT_TARGET],
source_under_test = [CURRENT_TARGET],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-core-common'
CURRENT_TARGET = ':' + CURRENT_NAME
SRC_DEPS = [
'//lib:CORE_DEPS',
'//incubator/api:onos-incubator-api',
]
TEST_DEPS = [
'//lib:TEST',
'//core/api:onos-api-tests',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
deps = SRC_DEPS,
visibility = ['PUBLIC'],
)
java_test(
name = 'onos-core-common-tests',
visibility = ['PUBLIC'],
srcs = glob([TEST + '/*.java']),
resources_root = 'src/test/resources',
resources = glob(['src/test/resources/**']),
deps = SRC_DEPS +
TEST_DEPS +
[CURRENT_TARGET],
source_under_test = [CURRENT_TARGET],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-core-net'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//incubator/api:onos-incubator-api',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
......@@ -25,9 +25,10 @@ import org.apache.felix.scr.annotations.Deactivate;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.ReferenceCardinality;
import org.apache.felix.scr.annotations.Service;
import org.onosproject.utils.Comparators;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.Device;
import org.onosproject.net.ElementId;
import org.onosproject.net.Port;
import org.onosproject.net.PortNumber;
import org.onosproject.net.device.DeviceService;
......@@ -49,6 +50,7 @@ import org.onosproject.net.statistic.TypedFlowEntryWithLoad;
import org.slf4j.Logger;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -81,6 +83,33 @@ public class FlowStatisticManager implements FlowStatisticService {
private final InternalFlowRuleStatsListener frListener = new InternalFlowRuleStatsListener();
// FIXME: refactor these comparators to be shared with the CLI implmentations
public static final Comparator<ElementId> ELEMENT_ID_COMPARATOR = new Comparator<ElementId>() {
@Override
public int compare(ElementId id1, ElementId id2) {
return id1.toString().compareTo(id2.toString());
}
};
public static final Comparator<ConnectPoint> CONNECT_POINT_COMPARATOR = new Comparator<ConnectPoint>() {
@Override
public int compare(ConnectPoint o1, ConnectPoint o2) {
int compareId = ELEMENT_ID_COMPARATOR.compare(o1.elementId(), o2.elementId());
return (compareId != 0) ?
compareId :
Long.signum(o1.port().toLong() - o2.port().toLong());
}
};
public static final Comparator<TypedFlowEntryWithLoad> TYPEFLOWENTRY_WITHLOAD_COMPARATOR =
new Comparator<TypedFlowEntryWithLoad>() {
@Override
public int compare(TypedFlowEntryWithLoad fe1, TypedFlowEntryWithLoad fe2) {
long delta = fe1.load().rate() - fe2.load().rate();
return delta == 0 ? 0 : (delta > 0 ? -1 : +1);
}
};
@Activate
public void activate() {
flowRuleService.addListener(frListener);
......@@ -97,7 +126,7 @@ public class FlowStatisticManager implements FlowStatisticService {
public Map<ConnectPoint, SummaryFlowEntryWithLoad> loadSummary(Device device) {
checkPermission(STATISTIC_READ);
Map<ConnectPoint, SummaryFlowEntryWithLoad> summaryLoad = new TreeMap<>(Comparators.CONNECT_POINT_COMPARATOR);
Map<ConnectPoint, SummaryFlowEntryWithLoad> summaryLoad = new TreeMap<>(CONNECT_POINT_COMPARATOR);
if (device == null) {
return summaryLoad;
......@@ -128,7 +157,7 @@ public class FlowStatisticManager implements FlowStatisticService {
Instruction.Type instType) {
checkPermission(STATISTIC_READ);
Map<ConnectPoint, List<TypedFlowEntryWithLoad>> allLoad = new TreeMap<>(Comparators.CONNECT_POINT_COMPARATOR);
Map<ConnectPoint, List<TypedFlowEntryWithLoad>> allLoad = new TreeMap<>(CONNECT_POINT_COMPARATOR);
if (device == null) {
return allLoad;
......@@ -162,7 +191,7 @@ public class FlowStatisticManager implements FlowStatisticService {
int topn) {
checkPermission(STATISTIC_READ);
Map<ConnectPoint, List<TypedFlowEntryWithLoad>> allLoad = new TreeMap<>(Comparators.CONNECT_POINT_COMPARATOR);
Map<ConnectPoint, List<TypedFlowEntryWithLoad>> allLoad = new TreeMap<>(CONNECT_POINT_COMPARATOR);
if (device == null) {
return allLoad;
......@@ -373,7 +402,7 @@ public class FlowStatisticManager implements FlowStatisticService {
// Sort with descending order of load
List<TypedFlowEntryWithLoad> tfel =
fel.stream().sorted(Comparators.TYPEFLOWENTRY_WITHLOAD_COMPARATOR).
fel.stream().sorted(TYPEFLOWENTRY_WITHLOAD_COMPARATOR).
limit(topn).collect(Collectors.toList());
return tfel;
......
SRC = 'src/main/java/org/onosproject/security/**/'
TEST = 'src/test/java/org/onosproject/security/**/'
CURRENT_NAME = 'onos-security'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//core/store/serializers:onos-core-serializers',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-core-dist'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//core/common:onos-core-common',
'//utils/rest:onlab-rest',
'//core/store/serializers:onos-core-serializers',
'//lib:netty-transport',
'//lib:netty-codec',
'//lib:netty-buffer',
'//lib:netty-handler',
'//lib:netty-transport-native-epoll',
'//lib:commons-math3',
]
TEST_DEPS = [
'//lib:TEST',
'//core/api:onos-api-tests',
'//core/common:onos-core-common-tests',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-core-persistence'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:catalyst-serializer',
'//lib:mapdb',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-core-primitives'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//core/common:onos-core-common',
'//incubator/api:onos-incubator-api',
'//core/store/serializers:onos-core-serializers',
'//lib:copycat-client',
'//lib:copycat-server',
'//lib:copycat-protocol',
'//lib:copycat-core',
'//lib:typesafe-config',
'//lib:copycat-api',
'//lib:copycat-state-machine',
'//lib:copycat-state-log',
'//lib:catalyst-transport',
'//lib:catalyst-buffer',
'//lib:catalyst-common',
'//lib:catalyst-local',
'//lib:catalyst-serializer',
'//lib:atomix',
'//lib:atomix-resource',
'//lib:atomix-variables',
'//lib:atomix-resource-manager',
]
TEST_DEPS = [
'//lib:TEST',
'//core/api:onos-api-tests',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-core-serializers'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//incubator/api:onos-incubator-api',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-drivers-ciena'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//incubator/api:onos-incubator-api',
'//utils/rest:onlab-rest',
'//drivers/utilities:onos-drivers-utilities',
'//protocols/rest/api:onos-restsb-api',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
resources_root = 'src/main/resources',
resources = glob(['src/main/resources/**']),
)
SRC = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-drivers-cisco'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//drivers/utilities:onos-drivers-utilities',
'//protocols/netconf/api:onos-netconf-api',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
resources_root = 'src/main/resources',
resources = glob(['src/main/resources/**']),
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-drivers-default'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:openflowj',
'//drivers/utilities:onos-drivers-utilities',
'//protocols/openflow/api:onos-of-api',
'//core/store/serializers:onos-core-serializers',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-drivers-fujitsu'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//drivers/utilities:onos-drivers-utilities',
'//protocols/netconf/api:onos-netconf-api',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
resources_root = 'src/main/resources',
resources = glob(['src/main/resources/**']),
)
SRC = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-drivers-lumentum'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:org.apache.servicemix.bundles.snmp4j',
'//drivers/utilities:onos-drivers-utilities',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
resources_root = 'src/main/resources',
resources = glob(['src/main/resources/**']),
)
SRC = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-drivers-netconf'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//drivers/utilities:onos-drivers-utilities',
'//protocols/netconf/api:onos-netconf-api',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
resources_root = 'src/main/resources',
resources = glob(['src/main/resources/**']),
)
SRC = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-drivers-ovsdb'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//drivers/utilities:onos-drivers-utilities',
'//protocols/ovsdb/api:onos-ovsdb-api',
'//protocols/ovsdb/rfc:onos-ovsdb-rfc',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
resources_root = 'src/main/resources',
resources = glob(['src/main/resources/**']),
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-drivers-utilities'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//core/net:onos-core-net',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
resources_root = 'src/main/resources',
resources = glob(['src/main/resources/**']),
)
java_test(
name = 'onos-drivers-utilities-tests',
visibility = ['PUBLIC'],
resources_root = 'src/test/resources',
resources = glob(['src/test/resources/**']),
srcs = glob([TEST + '/*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[CURRENT_TARGET],
source_under_test = [CURRENT_TARGET],
)
SRC = 'src/main/java/org/onosproject/incubator/**/'
TEST = 'src/main/java/org/onosproject/incubator/**/'
CURRENT_NAME = 'onos-incubator-api'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/incubator/net/**/'
TEST = 'src/main/java/org/onosproject/incubator/net/**/'
CURRENT_NAME = 'onos-incubator-net'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//incubator/api:onos-incubator-api',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
This diff is collapsed. Click to expand it.
File mode changed
SRC = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-bgp-api'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//protocols/bgp/bgpio:onos-bgpio',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-bgpio'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-bgp-ctl'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:jersey-client',
'//lib:httpclient-osgi',
'//lib:httpcore-osgi',
'//lib:javax.ws.rs-api',
'//protocols/bgp/api:onos-bgp-api',
'//protocols/bgp/bgpio:onos-bgpio',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-netconf-api'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-netconf-ctl'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:ganymed-ssh2',
'//protocols/netconf/api:onos-netconf-api'
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-of-api'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:openflowj',
]
TEST_DEPS = [
'//lib:TEST',
'//core/api:onos-api-tests',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-of-ctl'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:openflowj',
'//protocols/openflow/api:onos-of-api'
]
TEST_DEPS = [
'//lib:TEST',
'//core/api:onos-api-tests',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
......@@ -144,7 +144,7 @@ public class OpenFlowControllerImplTest {
replay(mockConfigService);
ComponentContext mockContext = EasyMock.createMock(ComponentContext.class);
Dictionary<String, String> properties = new Hashtable<>();
Dictionary<String, Object> properties = new Hashtable<>();
properties.put("openflowPorts",
Integer.toString(TestTools.findAvailablePort(0)));
expect(mockContext.getProperties()).andReturn(properties);
......
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-ospf-api'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-ospf-ctl'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//protocols/ospf/api:onos-ospf-api',
'//protocols/ospf/protocol:onos-ospf-protocol',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-ospf-protocol'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//protocols/ospf/api:onos-ospf-api',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-ovsdb-api'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:netty-transport',
'//protocols/ovsdb/rfc:onos-ovsdb-rfc',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-ovsdb-ctl'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:netty-transport',
'//lib:netty-buffer',
'//lib:netty-codec',
'//lib:netty-handler',
'//protocols/ovsdb/rfc:onos-ovsdb-rfc',
'//protocols/ovsdb/api:onos-ovsdb-api',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-ovsdb-rfc'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:netty-buffer',
'//lib:netty-codec',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
)
SRC = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-pcep-controller-api'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//protocols/pcep/pcepio:onos-pcep-pcepio',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
)
SRC = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-pcep-ctl'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//protocols/pcep/pcepio:onos-pcep-pcepio',
'//protocols/pcep/api:onos-pcep-controller-api',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-pcep-pcepio'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-restsb-api'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//incubator/api:onos-incubator-api',
'//utils/rest:onlab-rest',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
)
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
CURRENT_NAME = 'onos-restsb-ctl'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:jersey-client',
'//lib:jersey-common',
'//lib:httpclient-osgi',
'//lib:httpcore-osgi',
'//lib:javax.ws.rs-api',
'//lib:hk2-api',
'//lib:jersey-guava',
'//lib:aopalliance-repackaged',
'//lib:javax.inject',
'//protocols/rest/api:onos-restsb-api',
]
TEST_DEPS = [
'//lib:TEST',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
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],
)
SRC = 'src/main/java/org/onosproject/**/'
CURRENT_NAME = 'onos-bgp-provider-cfg'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//protocols/bgp/api:onos-bgp-api',
]
java_library(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
)
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.