diff options
Diffstat (limited to 'framework/src/onos/core/api/src')
100 files changed, 311 insertions, 291 deletions
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/cluster/ClusterDefinitionService.java b/framework/src/onos/core/api/src/main/java/org/onosproject/cluster/ClusterDefinitionService.java index dbe5f71c..1ee78b15 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/cluster/ClusterDefinitionService.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/cluster/ClusterDefinitionService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2015 Open Networking Laboratory + * + * 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. + */ package org.onosproject.cluster; import java.util.Set; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/cluster/ControllerNode.java b/framework/src/onos/core/api/src/main/java/org/onosproject/cluster/ControllerNode.java index 3cfc9367..2f74ae69 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/cluster/ControllerNode.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/cluster/ControllerNode.java @@ -23,7 +23,7 @@ import org.onlab.packet.IpAddress; public interface ControllerNode { /** Represents the operational state of the instance. */ - public enum State { + enum State { /** * Signifies that the instance is active and operating normally. */ diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/core/CoreService.java b/framework/src/onos/core/api/src/main/java/org/onosproject/core/CoreService.java index 3dfc6b26..303ad395 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/core/CoreService.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/core/CoreService.java @@ -27,12 +27,12 @@ public interface CoreService { /** * Name of the core "application". */ - static final String CORE_APP_NAME = "org.onosproject.core"; + String CORE_APP_NAME = "org.onosproject.core"; /** * Identifier of the core "provider". */ - static final ProviderId CORE_PROVIDER_ID = new ProviderId("core", CORE_APP_NAME); + ProviderId CORE_PROVIDER_ID = new ProviderId("core", CORE_APP_NAME); /** * Returns the product version. diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/core/MetricsHelper.java b/framework/src/onos/core/api/src/main/java/org/onosproject/core/MetricsHelper.java index b5be0944..8de05439 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/core/MetricsHelper.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/core/MetricsHelper.java @@ -32,7 +32,7 @@ public interface MetricsHelper { * * @return MetricService instance */ - abstract MetricsService metricsService(); + MetricsService metricsService(); /** diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/Device.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/Device.java index d9001825..ffbf7f96 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/Device.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/Device.java @@ -25,7 +25,7 @@ public interface Device extends Element { /** * Coarse classification of the type of the infrastructure device. */ - public enum Type { + enum Type { SWITCH, ROUTER, ROADM, OTN, ROADM_OTN, FIREWALL, BALANCER, IPS, IDS, CONTROLLER, VIRTUAL, FIBER_SWITCH, MICROWAVE, OTHER } diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/IpElementId.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/IpElementId.java index 9e19b624..aba8ae47 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/IpElementId.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/IpElementId.java @@ -1,3 +1,18 @@ +/* + * Copyright 2015 Open Networking Laboratory + * + * 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. + */ package org.onosproject.net; import java.util.Objects; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/config/basics/BasicLinkConfig.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/config/basics/BasicLinkConfig.java index b6068ee7..e962110c 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/config/basics/BasicLinkConfig.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/config/basics/BasicLinkConfig.java @@ -17,6 +17,7 @@ package org.onosproject.net.config.basics; import org.onosproject.net.Link; import org.onosproject.net.LinkKey; +import com.fasterxml.jackson.databind.JsonNode; import java.time.Duration; @@ -28,6 +29,7 @@ public class BasicLinkConfig extends AllowedEntityConfig<LinkKey> { public static final String TYPE = "type"; public static final String LATENCY = "latency"; public static final String BANDWIDTH = "bandwidth"; + public static final String IS_DURABLE = "durable"; /** * Returns the link type. @@ -87,4 +89,26 @@ public class BasicLinkConfig extends AllowedEntityConfig<LinkKey> { return (BasicLinkConfig) setOrClear(BANDWIDTH, bandwidth); } + /** + * Returns if link is durable in the network model or not. + * + * @return true for durable, false otherwise + */ + public Boolean isDurable() { + JsonNode res = object.path(IS_DURABLE); + if (res.isMissingNode()) { + return null; + } + return res.asBoolean(); + } + + /** + * Sets durability for this link. + * + * @param isDurable true for durable, false otherwise + * @return this BasicLinkConfig + */ + public BasicLinkConfig isDurable(Boolean isDurable) { + return (BasicLinkConfig) setOrClear(IS_DURABLE, isDurable); + } } diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/config/basics/OpticalPortConfig.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/config/basics/OpticalPortConfig.java index b06c4228..dfb494d6 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/config/basics/OpticalPortConfig.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/config/basics/OpticalPortConfig.java @@ -1,3 +1,18 @@ +/* + * Copyright 2015 Open Networking Laboratory + * + * 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. + */ package org.onosproject.net.config.basics; import java.util.Optional; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/DefaultFlowRule.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/DefaultFlowRule.java index 44a4d364..5492fa98 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/DefaultFlowRule.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/DefaultFlowRule.java @@ -291,6 +291,7 @@ public class DefaultFlowRule implements FlowRule { public static final class Builder implements FlowRule.Builder { private FlowId flowId; + private ApplicationId appId; private Integer priority; private DeviceId deviceId; private Integer tableId = 0; @@ -307,7 +308,7 @@ public class DefaultFlowRule implements FlowRule { @Override public FlowRule.Builder fromApp(ApplicationId appId) { - this.flowId = computeFlowId(appId); + this.appId = appId; return this; } @@ -357,16 +358,22 @@ public class DefaultFlowRule implements FlowRule { @Override public FlowRule build() { - checkNotNull(flowId != null, "Either an application" + + checkArgument(flowId != null || appId != null, "Either an application" + " id or a cookie must be supplied"); - checkNotNull(selector != null, "Traffic selector cannot be null"); - checkNotNull(timeout != null || permanent != null, "Must either have " + + checkNotNull(selector, "Traffic selector cannot be null"); + checkArgument(timeout != null || permanent != null, "Must either have " + "a timeout or be permanent"); - checkNotNull(deviceId != null, "Must refer to a device"); - checkNotNull(priority != null, "Priority cannot be null"); + checkNotNull(deviceId, "Must refer to a device"); + checkNotNull(priority, "Priority cannot be null"); checkArgument(priority >= MIN_PRIORITY, "Priority cannot be less than " + MIN_PRIORITY); + // Computing a flow ID based on appId takes precedence over setting + // the flow ID directly + if (appId != null) { + flowId = computeFlowId(appId); + } + return new DefaultFlowRule(deviceId, selector, treatment, priority, flowId, permanent, timeout, tableId); } diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/FlowRule.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/FlowRule.java index e446a9fe..a487cbc4 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/FlowRule.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/FlowRule.java @@ -25,8 +25,8 @@ import org.onosproject.net.DeviceId; */ public interface FlowRule { - static final int MAX_TIMEOUT = 60; - static final int MIN_PRIORITY = 0; + int MAX_TIMEOUT = 60; + int MIN_PRIORITY = 0; /** * The FlowRule type is used to determine in which table the flow rule needs @@ -36,7 +36,7 @@ public interface FlowRule { * @deprecated in Cardinal Release */ @Deprecated - static enum Type { + enum Type { /* * Default type - used in flow rule for single table switch NOTE: this * setting should not be used as Table 0 in a multi-table pipeline diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/FlowRuleExtPayLoad.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/FlowRuleExtPayLoad.java index 8d36be49..d4d2d9ec 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/FlowRuleExtPayLoad.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/FlowRuleExtPayLoad.java @@ -1,3 +1,18 @@ +/* + * Copyright 2015 Open Networking Laboratory + * + * 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. + */ package org.onosproject.net.flow; import static com.google.common.base.MoreObjects.toStringHelper; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/FlowRuleService.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/FlowRuleService.java index e2971158..d4f959c3 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/FlowRuleService.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/FlowRuleService.java @@ -32,7 +32,7 @@ public interface FlowRuleService /** * The topic used for obtaining globally unique ids. */ - static String FLOW_OP_TOPIC = "flow-ops-ids"; + String FLOW_OP_TOPIC = "flow-ops-ids"; /** * Returns the number of flow rules in the system. diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/TrafficSelector.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/TrafficSelector.java index f2de9a0f..534f6b9e 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/TrafficSelector.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/TrafficSelector.java @@ -24,7 +24,6 @@ import org.onlab.packet.MplsLabel; import org.onlab.packet.TpPort; import org.onlab.packet.VlanId; import org.onosproject.net.PortNumber; -import org.onosproject.net.flow.DefaultTrafficSelector.Builder; import org.onosproject.net.flow.criteria.Criterion; /** diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/criteria/MplsBosCriterion.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/criteria/MplsBosCriterion.java index 1ace8931..c8b6690d 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/criteria/MplsBosCriterion.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/flow/criteria/MplsBosCriterion.java @@ -1,3 +1,18 @@ +/* + * Copyright 2015 Open Networking Laboratory + * + * 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. + */ package org.onosproject.net.flow.criteria; import static com.google.common.base.MoreObjects.toStringHelper; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/flowobjective/Objective.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/flowobjective/Objective.java index 090c298c..6ac7a7a2 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/flowobjective/Objective.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/flowobjective/Objective.java @@ -26,9 +26,9 @@ import java.util.Optional; @Beta public interface Objective { - static final boolean DEFAULT_PERMANENT = true; - static final int DEFAULT_TIMEOUT = 0; - static final int DEFAULT_PRIORITY = 32768; + boolean DEFAULT_PERMANENT = true; + int DEFAULT_TIMEOUT = 0; + int DEFAULT_PRIORITY = 32768; /** * Type of operation. diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/host/HostAdminService.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/host/HostAdminService.java index d620fedb..8676e46a 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/host/HostAdminService.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/host/HostAdminService.java @@ -15,7 +15,6 @@ */ package org.onosproject.net.host; -import org.onosproject.net.ConnectPoint; import org.onosproject.net.HostId; /** @@ -30,37 +29,4 @@ public interface HostAdminService extends HostService { */ void removeHost(HostId hostId); - /** - * Binds IP and MAC addresses to the given connection point. - * <p> - * The addresses are added to the set of addresses already bound to the - * connection point. - * - * @param addresses address object containing addresses to add and the port - * to add them to - * @deprecated in Drake release: address info now stored in InterfaceService - */ - @Deprecated - void bindAddressesToPort(PortAddresses addresses); - - /** - * Removes the addresses contained in the given PortAddresses object from - * the set of addresses bound to the port. - * - * @param portAddresses set of addresses to remove and port to remove them - * from - * @deprecated in Drake release: address info now stored in InterfaceService - */ - @Deprecated - void unbindAddressesFromPort(PortAddresses portAddresses); - - /** - * Removes all address information for the given connection point. - * - * @param connectPoint the connection point to remove address information - * @deprecated in Drake release: address info now stored in InterfaceService - */ - @Deprecated - void clearAddresses(ConnectPoint connectPoint); - } diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/host/HostProviderService.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/host/HostProviderService.java index 8678a297..f7b7c499 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/host/HostProviderService.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/host/HostProviderService.java @@ -30,7 +30,20 @@ public interface HostProviderService extends ProviderService<HostProvider> { * @param hostId id of the host that been detected * @param hostDescription description of host and its location */ - void hostDetected(HostId hostId, HostDescription hostDescription); + @Deprecated + default void hostDetected(HostId hostId, HostDescription hostDescription) { + hostDetected(hostId, hostDescription, false); + } + + /** + * Notifies the core when a host has been detected on a network along with + * information that identifies the host location. + * + * @param hostId id of the host that been detected + * @param hostDescription description of host and its location + * @param replaceIps replace IP set if true, merge IP set otherwise + */ + void hostDetected(HostId hostId, HostDescription hostDescription, boolean replaceIps); /** * Notifies the core when a host is no longer detected on a network. diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/host/HostService.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/host/HostService.java index be114f05..39012159 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/host/HostService.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/host/HostService.java @@ -123,24 +123,4 @@ public interface HostService */ void requestMac(IpAddress ip); - /** - * Returns the addresses information for all connection points. - * - * @return the set of address bindings for all connection points - * @deprecated in Drake release: use InterfaceService instead - */ - @Deprecated - Set<PortAddresses> getAddressBindings(); - - /** - * Retrieves the addresses that have been bound to the given connection - * point. - * - * @param connectPoint the connection point to retrieve address bindings for - * @return addresses bound to the port - * @deprecated in Drake release: use InterfaceService instead - */ - @Deprecated - Set<PortAddresses> getAddressBindingsForPort(ConnectPoint connectPoint); - } diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/host/HostStore.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/host/HostStore.java index ca11a942..5894fe92 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/host/HostStore.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/host/HostStore.java @@ -39,12 +39,13 @@ public interface HostStore extends Store<HostEvent, HostStoreDelegate> { * @param providerId provider identification * @param hostId host identification * @param hostDescription host description data + * @param replaceIps replace IP set if true, merge IP set otherwise * @return appropriate event or null if no change resulted */ HostEvent createOrUpdateHost(ProviderId providerId, HostId hostId, - HostDescription hostDescription); + HostDescription hostDescription, + boolean replaceIps); - // FIXME: API to remove only IpAddress is missing /** * Removes the specified host from the inventory. * @@ -115,53 +116,4 @@ public interface HostStore extends Store<HostEvent, HostStoreDelegate> { */ Set<Host> getConnectedHosts(DeviceId deviceId); - /** - * Updates the address information for a given port. The given address - * information is added to any previously held information for the port. - * - * @param addresses the port and address information - * @deprecated in Drake release: address info now stored in InterfaceService - */ - @Deprecated - void updateAddressBindings(PortAddresses addresses); - - /** - * Removes the given addresses from the set of address information held for - * a port. - * - * @param addresses the port and address information - * @deprecated in Drake release: address info now stored in InterfaceService - */ - @Deprecated - void removeAddressBindings(PortAddresses addresses); - - /** - * Removes any previously stored address information for a given connection - * point. - * - * @param connectPoint the connection point - * @deprecated in Drake release: address info now stored in InterfaceService - */ - @Deprecated - void clearAddressBindings(ConnectPoint connectPoint); - - /** - * Returns the address bindings stored for all connection points. - * - * @return the set of address bindings - * @deprecated in Drake release: address info now stored in InterfaceService - */ - @Deprecated - Set<PortAddresses> getAddressBindings(); - - /** - * Returns the address bindings for a particular connection point. - * - * @param connectPoint the connection point to return address information - * for - * @return address information for the connection point - * @deprecated in Drake release: address info now stored in InterfaceService - */ - @Deprecated - Set<PortAddresses> getAddressBindingsForPort(ConnectPoint connectPoint); } diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/intent/MplsIntent.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/intent/MplsIntent.java index bf469dbe..7df3c81e 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/intent/MplsIntent.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/intent/MplsIntent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2015 Open Networking Laboratory + * + * 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. + */ package org.onosproject.net.intent; import java.util.Collections; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/intent/MplsPathIntent.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/intent/MplsPathIntent.java index 3c3c45ce..caa5fbb9 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/intent/MplsPathIntent.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/intent/MplsPathIntent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2015 Open Networking Laboratory + * + * 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. + */ package org.onosproject.net.intent; import java.util.List; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/intent/PathIntent.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/intent/PathIntent.java index dffbabfe..0c831fd5 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/intent/PathIntent.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/intent/PathIntent.java @@ -25,7 +25,6 @@ import org.onosproject.net.flow.TrafficSelector; import org.onosproject.net.flow.TrafficTreatment; import com.google.common.base.MoreObjects; -import com.google.common.base.Predicate; import com.google.common.collect.Iterables; import static com.google.common.base.Preconditions.checkArgument; @@ -159,12 +158,8 @@ public class PathIntent extends ConnectivityIntent { * @param links links to be validated */ public static void validate(List<Link> links) { - checkArgument(Iterables.all(links, new Predicate<Link>() { - @Override - public boolean apply(Link link) { - return !link.src().elementId().equals(link.dst().elementId()); - } - }), "element of src and dst in a link must be different: {}", links); + checkArgument(Iterables.all(links, link -> !link.src().elementId().equals(link.dst().elementId())), + "element of src and dst in a link must be different: {}", links); boolean adjacentSame = true; for (int i = 0; i < links.size() - 1; i++) { diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/newresource/ResourceStore.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/newresource/ResourceStore.java index fc2eba70..5a034b4d 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/newresource/ResourceStore.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/newresource/ResourceStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2015 Open Networking Laboratory + * + * 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. + */ package org.onosproject.net.newresource; import com.google.common.annotations.Beta; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/packet/PacketPriority.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/packet/PacketPriority.java index 68c0a838..3eab9386 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/packet/PacketPriority.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/packet/PacketPriority.java @@ -34,7 +34,7 @@ public enum PacketPriority { private final int priorityValue; - private PacketPriority(int priorityValue) { + PacketPriority(int priorityValue) { this.priorityValue = priorityValue; } @@ -50,4 +50,4 @@ public enum PacketPriority { public String toString() { return String.valueOf(priorityValue); } -}
\ No newline at end of file +} diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/packet/PacketProcessor.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/packet/PacketProcessor.java index 98886775..0eba1b4e 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/packet/PacketProcessor.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/packet/PacketProcessor.java @@ -22,9 +22,9 @@ import static com.google.common.base.Preconditions.checkArgument; */ public interface PacketProcessor { - static final int ADVISOR_MAX = Integer.MAX_VALUE / 3; - static final int DIRECTOR_MAX = (Integer.MAX_VALUE / 3) * 2; - static final int OBSERVER_MAX = Integer.MAX_VALUE; + int ADVISOR_MAX = Integer.MAX_VALUE / 3; + int DIRECTOR_MAX = (Integer.MAX_VALUE / 3) * 2; + int OBSERVER_MAX = Integer.MAX_VALUE; /** * Returns a priority in the ADVISOR range, where processors can take early action and @@ -38,7 +38,7 @@ public interface PacketProcessor { static int advisor(int priority) { int overallPriority = priority + 1; checkArgument(overallPriority > 0 && overallPriority <= ADVISOR_MAX, - "Priority not within ADVISOR range"); + "Priority not within ADVISOR range"); return overallPriority; } @@ -53,7 +53,7 @@ public interface PacketProcessor { static int director(int priority) { int overallPriority = ADVISOR_MAX + priority + 1; checkArgument(overallPriority > ADVISOR_MAX && overallPriority <= DIRECTOR_MAX, - "Priority not within DIRECTOR range"); + "Priority not within DIRECTOR range"); return overallPriority; } @@ -68,8 +68,8 @@ public interface PacketProcessor { */ static int observer(int priority) { int overallPriority = DIRECTOR_MAX + priority + 1; - checkArgument(overallPriority > DIRECTOR_MAX && overallPriority <= OBSERVER_MAX, - "Priority not within OBSERVER range"); + checkArgument(overallPriority > DIRECTOR_MAX, + "Priority not within OBSERVER range"); return overallPriority; } diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/packet/PacketService.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/packet/PacketService.java index 06c416ec..98f4d8e0 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/packet/PacketService.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/packet/PacketService.java @@ -15,9 +15,13 @@ */ package org.onosproject.net.packet; +import com.google.common.annotations.Beta; import org.onosproject.core.ApplicationId; import org.onosproject.net.flow.TrafficSelector; +import java.util.List; +import java.util.Map; + /** * Service for intercepting data plane packets and for emitting synthetic * outbound packets. @@ -48,6 +52,15 @@ public interface PacketService { void removeProcessor(PacketProcessor processor); /** + * Returns priority bindings of all registered packet processors. + * + * @return list of existing packet processors + */ + @Beta + // TODO: Consider returning list of PacketProcessorEntry with processor, priority and stats + Map<Integer, PacketProcessor> getProcessors(); + + /** * Requests that packets matching the given selector are punted from the * dataplane to the controller. * @@ -70,6 +83,13 @@ public interface PacketService { ApplicationId appId); /** + * Returns list of all existing requests ordered by priority. + * + * @return list of existing packet requests + */ + List<PacketRequest> getRequests(); + + /** * Emits the specified outbound packet onto the network. * * @param packet outbound packet diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/packet/PacketStore.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/packet/PacketStore.java index ff45cc0c..97f7cb55 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/packet/PacketStore.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/packet/PacketStore.java @@ -17,7 +17,7 @@ package org.onosproject.net.packet; import org.onosproject.store.Store; -import java.util.Set; +import java.util.List; /** * Manages routing of outbound packets. @@ -52,8 +52,8 @@ public interface PacketStore extends Store<PacketEvent, PacketStoreDelegate> { /** * Obtains all existing requests in the system. * - * @return a set of packet requests + * @return list of packet requests in order of priority */ - Set<PacketRequest> existingRequests(); + List<PacketRequest> existingRequests(); } diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/proxyarp/ProxyArpService.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/proxyarp/ProxyArpService.java index 8ffe17a4..9b27f4f8 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/proxyarp/ProxyArpService.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/proxyarp/ProxyArpService.java @@ -21,7 +21,7 @@ import org.onosproject.net.ConnectPoint; import org.onosproject.net.packet.PacketContext; /** - * Service for processing arp requests on behalf of applications. + * Service for processing ARP or NDP requests on behalf of applications. */ // TODO: move to the peer host package public interface ProxyArpService { diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/security/AppGuard.java b/framework/src/onos/core/api/src/main/java/org/onosproject/security/AppGuard.java index 800135f4..4b80dfcd 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/security/AppGuard.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/security/AppGuard.java @@ -17,9 +17,12 @@ package org.onosproject.security; +import com.google.common.annotations.Beta; + /** * Aids SM-ONOS to perform API-level permission checking. */ +@Beta public final class AppGuard { private AppGuard() { diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/security/AppPermission.java b/framework/src/onos/core/api/src/main/java/org/onosproject/security/AppPermission.java index 21a70d2b..09fe17a8 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/security/AppPermission.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/security/AppPermission.java @@ -16,11 +16,14 @@ package org.onosproject.security; +import com.google.common.annotations.Beta; + import java.security.BasicPermission; /** * Implementation of API access permission. */ +@Beta public class AppPermission extends BasicPermission { public enum Type { diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/security/Permission.java b/framework/src/onos/core/api/src/main/java/org/onosproject/security/Permission.java index 75d9433f..0c874c9d 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/security/Permission.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/security/Permission.java @@ -16,6 +16,9 @@ package org.onosproject.security; +import com.google.common.annotations.Beta; + +@Beta public class Permission { protected String classname; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/security/SecurityAdminService.java b/framework/src/onos/core/api/src/main/java/org/onosproject/security/SecurityAdminService.java index 16ea94d1..30d143c0 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/security/SecurityAdminService.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/security/SecurityAdminService.java @@ -16,6 +16,7 @@ package org.onosproject.security; +import com.google.common.annotations.Beta; import org.onosproject.core.ApplicationId; import java.security.Permission; @@ -25,6 +26,7 @@ import java.util.Map; /** * Security-Mode ONOS service. */ +@Beta public interface SecurityAdminService { /** diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/security/SecurityUtil.java b/framework/src/onos/core/api/src/main/java/org/onosproject/security/SecurityUtil.java index 34b4e78a..444b6bb5 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/security/SecurityUtil.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/security/SecurityUtil.java @@ -16,6 +16,7 @@ package org.onosproject.security; +import com.google.common.annotations.Beta; import org.onlab.osgi.DefaultServiceDirectory; import org.onlab.osgi.ServiceDirectory; import org.onlab.osgi.ServiceNotFoundException; @@ -24,6 +25,7 @@ import org.onosproject.core.ApplicationId; /** * Utility class to aid Security-Mode ONOS. */ +@Beta public final class SecurityUtil { protected static ServiceDirectory serviceDirectory = new DefaultServiceDirectory(); diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/store/service/DatabaseUpdate.java b/framework/src/onos/core/api/src/main/java/org/onosproject/store/service/DatabaseUpdate.java index 8cac5968..a62d3823 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/store/service/DatabaseUpdate.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/store/service/DatabaseUpdate.java @@ -31,7 +31,7 @@ public final class DatabaseUpdate { /** * Type of database update operation. */ - public static enum Type { + public enum Type { /** * Insert/Update entry without any checks. */ diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/UiTopoOverlay.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/UiTopoOverlay.java index 2889422a..e0d7d239 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/UiTopoOverlay.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/UiTopoOverlay.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/UiTopoOverlayFactory.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/UiTopoOverlayFactory.java index bd2f2fe6..61bc0c23 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/UiTopoOverlayFactory.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/UiTopoOverlayFactory.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/CellComparator.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/CellComparator.java index 84d11344..1c42c97a 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/CellComparator.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/CellComparator.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.table; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/CellFormatter.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/CellFormatter.java index 854ac27f..895c9d93 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/CellFormatter.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/CellFormatter.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.table; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/AbstractCellComparator.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/AbstractCellComparator.java index 6113fc3f..31d9f634 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/AbstractCellComparator.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/AbstractCellComparator.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.table.cell; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/AbstractCellFormatter.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/AbstractCellFormatter.java index 33ce2ab5..08822b7b 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/AbstractCellFormatter.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/AbstractCellFormatter.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.table.cell; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/AppIdFormatter.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/AppIdFormatter.java index 42d684b6..0e1c248b 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/AppIdFormatter.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/AppIdFormatter.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.table.cell; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/ConnectPointFormatter.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/ConnectPointFormatter.java index fee26154..4af6fe2f 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/ConnectPointFormatter.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/ConnectPointFormatter.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.table.cell; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/DefaultCellComparator.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/DefaultCellComparator.java index 093a20d3..2386f8f3 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/DefaultCellComparator.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/DefaultCellComparator.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.table.cell; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/DefaultCellFormatter.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/DefaultCellFormatter.java index 0efa2ebd..8309c545 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/DefaultCellFormatter.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/DefaultCellFormatter.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.table.cell; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/HexFormatter.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/HexFormatter.java index e09982ea..981a81bb 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/HexFormatter.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/HexFormatter.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.table.cell; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/HostLocationFormatter.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/HostLocationFormatter.java index fe87c61b..95a7cc23 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/HostLocationFormatter.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/HostLocationFormatter.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.table.cell; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/TimeFormatter.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/TimeFormatter.java index 44dc1940..58c70930 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/TimeFormatter.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/table/cell/TimeFormatter.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.table.cell; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/AbstractHighlight.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/AbstractHighlight.java index ab2ced36..d30ba2f6 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/AbstractHighlight.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/AbstractHighlight.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/BaseLink.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/BaseLink.java index c37c129b..a40383b8 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/BaseLink.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/BaseLink.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/BaseLinkMap.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/BaseLinkMap.java index 720eca49..cc2cf4af 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/BaseLinkMap.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/BaseLinkMap.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/BiLink.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/BiLink.java index 8c95e15d..1217faae 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/BiLink.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/BiLink.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/BiLinkMap.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/BiLinkMap.java index 7bc0e65d..9a42e107 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/BiLinkMap.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/BiLinkMap.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/ButtonId.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/ButtonId.java index ca2ecccd..05b7317d 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/ButtonId.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/ButtonId.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/DeviceHighlight.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/DeviceHighlight.java index 2985d3d4..0ce6592c 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/DeviceHighlight.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/DeviceHighlight.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/Highlights.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/Highlights.java index be59c26b..12d3b629 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/Highlights.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/Highlights.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/HostHighlight.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/HostHighlight.java index 76669a84..48959496 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/HostHighlight.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/HostHighlight.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/LinkHighlight.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/LinkHighlight.java index b4e43304..a734c6b7 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/LinkHighlight.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/LinkHighlight.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/Mod.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/Mod.java index d21a8724..b11ddecd 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/Mod.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/Mod.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/NodeHighlight.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/NodeHighlight.java index 735f8166..61e10c56 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/NodeHighlight.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/NodeHighlight.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/NodeSelection.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/NodeSelection.java index b284de1b..4aed9038 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/NodeSelection.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/NodeSelection.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/PropertyPanel.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/PropertyPanel.java index 121e0834..a165be33 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/PropertyPanel.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/PropertyPanel.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/TopoConstants.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/TopoConstants.java index 38a8f036..0f42b628 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/TopoConstants.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/TopoConstants.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/TopoElementType.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/TopoElementType.java index dc327464..39947440 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/TopoElementType.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/TopoElementType.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/TopoJson.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/TopoJson.java index a94068ee..8df03169 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/TopoJson.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/TopoJson.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/TopoUtils.java b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/TopoUtils.java index f92d5798..b38a7f7d 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/TopoUtils.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/ui/topo/TopoUtils.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/event/EventDeliveryServiceAdapter.java b/framework/src/onos/core/api/src/test/java/org/onosproject/event/EventDeliveryServiceAdapter.java index 6d5e8934..b81155e6 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/event/EventDeliveryServiceAdapter.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/event/EventDeliveryServiceAdapter.java @@ -17,8 +17,6 @@ package org.onosproject.event; import java.util.Set; -import static org.junit.Assert.*; - /** * Testing adapter for the event delivery service. */ diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/net/OchSignalTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/net/OchSignalTest.java index c171d523..1ab17293 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/net/OchSignalTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/net/OchSignalTest.java @@ -18,8 +18,6 @@ package org.onosproject.net; import com.google.common.testing.EqualsTester; import org.junit.Test; -import static org.junit.Assert.*; - /** * Test for OchSignal. */ diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/net/device/DeviceClockServiceAdapter.java b/framework/src/onos/core/api/src/test/java/org/onosproject/net/device/DeviceClockServiceAdapter.java index 5bfdd76b..7b43da6a 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/net/device/DeviceClockServiceAdapter.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/net/device/DeviceClockServiceAdapter.java @@ -1,3 +1,18 @@ +/* + * Copyright 2015 Open Networking Laboratory + * + * 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. + */ package org.onosproject.net.device; import org.onosproject.net.DeviceId; diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/net/device/DeviceServiceAdapter.java b/framework/src/onos/core/api/src/test/java/org/onosproject/net/device/DeviceServiceAdapter.java index 795e4c0a..5f52f6db 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/net/device/DeviceServiceAdapter.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/net/device/DeviceServiceAdapter.java @@ -15,7 +15,6 @@ */ package org.onosproject.net.device; -import com.google.common.base.Predicate; import com.google.common.collect.FluentIterable; import org.onosproject.net.Device; @@ -45,13 +44,7 @@ public class DeviceServiceAdapter implements DeviceService { @Override public Iterable<Device> getAvailableDevices() { return FluentIterable.from(getDevices()) - .filter(new Predicate<Device>() { - - @Override - public boolean apply(Device input) { - return isAvailable(input.id()); - } - }); + .filter(input -> isAvailable(input.id())); } @Override diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/net/flow/FlowRuleExtPayLoadTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/net/flow/FlowRuleExtPayLoadTest.java index 30326a2e..7a61f823 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/net/flow/FlowRuleExtPayLoadTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/net/flow/FlowRuleExtPayLoadTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2015 Open Networking Laboratory + * + * 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. + */ package org.onosproject.net.flow; import static org.onlab.junit.ImmutableClassChecker.assertThatClassIsImmutable; diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/net/host/HostServiceAdapter.java b/framework/src/onos/core/api/src/test/java/org/onosproject/net/host/HostServiceAdapter.java index 226dad06..0fad54a8 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/net/host/HostServiceAdapter.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/net/host/HostServiceAdapter.java @@ -15,15 +15,15 @@ */ package org.onosproject.net.host; -import java.util.Set; - +import org.onlab.packet.IpAddress; +import org.onlab.packet.MacAddress; +import org.onlab.packet.VlanId; import org.onosproject.net.ConnectPoint; import org.onosproject.net.DeviceId; import org.onosproject.net.Host; import org.onosproject.net.HostId; -import org.onlab.packet.IpAddress; -import org.onlab.packet.MacAddress; -import org.onlab.packet.VlanId; + +import java.util.Set; /** * Test adapter for host service. @@ -89,14 +89,4 @@ public class HostServiceAdapter implements HostService { public void removeListener(HostListener listener) { } - @Override - public Set<PortAddresses> getAddressBindings() { - return null; - } - - @Override - public Set<PortAddresses> getAddressBindingsForPort(ConnectPoint connectPoint) { - return null; - } - } diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/net/intent/FakeIntentManager.java b/framework/src/onos/core/api/src/test/java/org/onosproject/net/intent/FakeIntentManager.java index 9b9f7cec..a33d3692 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/net/intent/FakeIntentManager.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/net/intent/FakeIntentManager.java @@ -49,30 +49,23 @@ public class FakeIntentManager implements TestableIntentService { // Provides an out-of-thread simulation of intent submit life-cycle private void executeSubmit(final Intent intent) { registerSubclassCompilerIfNeeded(intent); - executor.execute(new Runnable() { - @Override - public void run() { - try { - executeCompilingPhase(intent); - } catch (IntentException e) { - exceptions.add(e); - } + executor.execute(() -> { + try { + executeCompilingPhase(intent); + } catch (IntentException e) { + exceptions.add(e); } }); } // Provides an out-of-thread simulation of intent withdraw life-cycle private void executeWithdraw(final Intent intent) { - executor.execute(new Runnable() { - @Override - public void run() { - try { - List<Intent> installable = getInstallable(intent.key()); - executeWithdrawingPhase(intent, installable); - } catch (IntentException e) { - exceptions.add(e); - } - + executor.execute(() -> { + try { + List<Intent> installable = getInstallable(intent.key()); + executeWithdrawingPhase(intent, installable); + } catch (IntentException e) { + exceptions.add(e); } }); } diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/net/intent/IntentServiceTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/net/intent/IntentServiceTest.java index 60857cac..0067fb2d 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/net/intent/IntentServiceTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/net/intent/IntentServiceTest.java @@ -79,13 +79,8 @@ public class IntentServiceTest { service.submit(intent); // Allow a small window of time until the intent is in the expected state - TestTools.assertAfter(GRACE_MS, new Runnable() { - @Override - public void run() { - assertEquals("incorrect intent state", IntentState.INSTALLED, - service.getIntentState(intent.key())); - } - }); + TestTools.assertAfter(GRACE_MS, () -> + assertEquals("incorrect intent state", IntentState.INSTALLED, service.getIntentState(intent.key()))); // Make sure that all expected events have been emitted validateEvents(intent, INSTALL_REQ, INSTALLED); @@ -100,13 +95,8 @@ public class IntentServiceTest { service.withdraw(intent); // Allow a small window of time until the event is in the expected state - TestTools.assertAfter(GRACE_MS, new Runnable() { - @Override - public void run() { - assertEquals("incorrect intent state", IntentState.WITHDRAWN, - service.getIntentState(intent.key())); - } - }); + TestTools.assertAfter(GRACE_MS, () -> + assertEquals("incorrect intent state", IntentState.WITHDRAWN, service.getIntentState(intent.key()))); // Make sure that all expected events have been emitted validateEvents(intent, WITHDRAWN); @@ -128,13 +118,8 @@ public class IntentServiceTest { service.submit(intent); // Allow a small window of time until the intent is in the expected state - TestTools.assertAfter(GRACE_MS, new Runnable() { - @Override - public void run() { - assertEquals("incorrect intent state", IntentState.FAILED, - service.getIntentState(intent.key())); - } - }); + TestTools.assertAfter(GRACE_MS, () -> + assertEquals("incorrect intent state", IntentState.FAILED, service.getIntentState(intent.key()))); // Make sure that all expected events have been emitted validateEvents(intent, INSTALL_REQ, FAILED); @@ -196,13 +181,8 @@ public class IntentServiceTest { service.submit(intent); // Allow some time for the intent to be compiled and installed - TestTools.assertAfter(GRACE_MS, new Runnable() { - @Override - public void run() { - assertEquals("incorrect intent state", IntentState.INSTALLED, - service.getIntentState(intent.key())); - } - }); + TestTools.assertAfter(GRACE_MS, () -> + assertEquals("incorrect intent state", IntentState.INSTALLED, service.getIntentState(intent.key()))); // Make sure that now we have an implicit registration of the compiler // under the intent subclass diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/net/intent/PartitionServiceAdapter.java b/framework/src/onos/core/api/src/test/java/org/onosproject/net/intent/PartitionServiceAdapter.java index ffb2635e..2a38cbb3 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/net/intent/PartitionServiceAdapter.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/net/intent/PartitionServiceAdapter.java @@ -17,8 +17,6 @@ package org.onosproject.net.intent; import org.onosproject.cluster.NodeId; -import static org.junit.Assert.*; - /** * Testing adapter for the partition service. */ diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/net/link/LinkServiceAdapter.java b/framework/src/onos/core/api/src/test/java/org/onosproject/net/link/LinkServiceAdapter.java index 5cb84b31..7cd87cd1 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/net/link/LinkServiceAdapter.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/net/link/LinkServiceAdapter.java @@ -22,7 +22,6 @@ import org.onosproject.net.DeviceId; import org.onosproject.net.Link; import org.onosproject.net.Link.State; -import com.google.common.base.Predicate; import com.google.common.collect.FluentIterable; /** @@ -42,13 +41,7 @@ public class LinkServiceAdapter implements LinkService { @Override public Iterable<Link> getActiveLinks() { return FluentIterable.from(getLinks()) - .filter(new Predicate<Link>() { - - @Override - public boolean apply(Link input) { - return input.state() == State.ACTIVE; - } - }); + .filter(input -> input.state() == State.ACTIVE); } @Override diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/net/packet/PacketServiceAdapter.java b/framework/src/onos/core/api/src/test/java/org/onosproject/net/packet/PacketServiceAdapter.java index afe936b7..c4386593 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/net/packet/PacketServiceAdapter.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/net/packet/PacketServiceAdapter.java @@ -18,6 +18,9 @@ package org.onosproject.net.packet; import org.onosproject.core.ApplicationId; import org.onosproject.net.flow.TrafficSelector; +import java.util.List; +import java.util.Map; + /** * Test adapter for packet service. */ @@ -31,6 +34,16 @@ public class PacketServiceAdapter implements PacketService { } @Override + public Map<Integer, PacketProcessor> getProcessors() { + return null; + } + + @Override + public List<PacketRequest> getRequests() { + return null; + } + + @Override public void requestPackets(TrafficSelector selector, PacketPriority priority, ApplicationId appId) { } diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/store/service/DatabaseUpdateTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/store/service/DatabaseUpdateTest.java index b498c1c7..ad439d66 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/store/service/DatabaseUpdateTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/store/service/DatabaseUpdateTest.java @@ -16,7 +16,6 @@ package org.onosproject.store.service; import com.google.common.testing.EqualsTester; -import junit.framework.TestCase; import org.junit.Test; import static org.hamcrest.MatcherAssert.assertThat; @@ -26,7 +25,7 @@ import static org.hamcrest.Matchers.is; * Unit Tests for DatabseUpdate class. */ -public class DatabaseUpdateTest extends TestCase { +public class DatabaseUpdateTest { private final DatabaseUpdate stats1 = DatabaseUpdate.newBuilder() .withCurrentValue("1".getBytes()) @@ -124,4 +123,4 @@ public class DatabaseUpdateTest extends TestCase { assertThat(stats1.toString(), is(stats1.toString())); } -}
\ No newline at end of file +} diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/store/service/MapEventTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/store/service/MapEventTest.java index c241c0e0..47fba6c9 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/store/service/MapEventTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/store/service/MapEventTest.java @@ -16,7 +16,6 @@ package org.onosproject.store.service; import com.google.common.testing.EqualsTester; -import junit.framework.TestCase; import org.junit.Test; import static org.hamcrest.MatcherAssert.assertThat; @@ -25,7 +24,7 @@ import static org.hamcrest.Matchers.is; /** * MapEvent unit tests. */ -public class MapEventTest extends TestCase { +public class MapEventTest { private final Versioned<Integer> vStats = new Versioned<>(2, 1); @@ -58,4 +57,4 @@ public class MapEventTest extends TestCase { .testEquals(); } -}
\ No newline at end of file +} diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/store/service/MultiValuedTimestampTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/store/service/MultiValuedTimestampTest.java index 5d991a26..43475e45 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/store/service/MultiValuedTimestampTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/store/service/MultiValuedTimestampTest.java @@ -16,7 +16,6 @@ package org.onosproject.store.service; import com.google.common.testing.EqualsTester; -import junit.framework.TestCase; import org.junit.Assert; import org.junit.Test; @@ -31,7 +30,7 @@ import static org.hamcrest.Matchers.notNullValue; /** * MultiValuedTimestamp unit tests. */ -public class MultiValuedTimestampTest extends TestCase { +public class MultiValuedTimestampTest { private final MultiValuedTimestamp<Integer, Integer> stats1 = new MultiValuedTimestamp<>(1, 3); @@ -91,4 +90,4 @@ public class MultiValuedTimestampTest extends TestCase { Assert.fail("Exception looking up constructors"); } } -}
\ No newline at end of file +} diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/store/service/VersionedTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/store/service/VersionedTest.java index 8a401db2..fbe3271b 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/store/service/VersionedTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/store/service/VersionedTest.java @@ -16,7 +16,6 @@ package org.onosproject.store.service; import com.google.common.testing.EqualsTester; -import junit.framework.TestCase; import org.junit.Test; import static org.hamcrest.MatcherAssert.assertThat; @@ -25,7 +24,7 @@ import static org.hamcrest.Matchers.is; /** * Versioned unit tests. */ -public class VersionedTest extends TestCase { +public class VersionedTest { private final Versioned<Integer> stats1 = new Versioned<>(1, 2, 3); diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/TableUtilsTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/TableUtilsTest.java index 7c2f2d73..4456dd3d 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/TableUtilsTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/TableUtilsTest.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.table; diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/AbstractCellComparatorTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/AbstractCellComparatorTest.java index 0b9af23d..30125afb 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/AbstractCellComparatorTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/AbstractCellComparatorTest.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.table.cell; diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/AbstractCellFormatterTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/AbstractCellFormatterTest.java index 7a3c34bc..41fefd65 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/AbstractCellFormatterTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/AbstractCellFormatterTest.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.table.cell; diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/AppIdFormatterTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/AppIdFormatterTest.java index e74fb47c..a7befbdb 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/AppIdFormatterTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/AppIdFormatterTest.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.table.cell; diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/ConnectPointFormatterTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/ConnectPointFormatterTest.java index 65fd7843..f7ad2751 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/ConnectPointFormatterTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/ConnectPointFormatterTest.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.table.cell; diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/DefaultCellComparatorTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/DefaultCellComparatorTest.java index 87c95288..d77c1b2b 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/DefaultCellComparatorTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/DefaultCellComparatorTest.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.table.cell; diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/DefaultCellFormatterTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/DefaultCellFormatterTest.java index 6351a1f4..b63793b9 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/DefaultCellFormatterTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/DefaultCellFormatterTest.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.table.cell; diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/HexFormatterTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/HexFormatterTest.java index ad23b02c..2f70d43c 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/HexFormatterTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/HexFormatterTest.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.table.cell; diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/HostLocationFormatterTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/HostLocationFormatterTest.java index bfbe4541..25ec89cd 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/HostLocationFormatterTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/HostLocationFormatterTest.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.table.cell; diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/TimeFormatterTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/TimeFormatterTest.java index f41d82b3..1e05ded1 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/TimeFormatterTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/table/cell/TimeFormatterTest.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.table.cell; diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/BiLinkMapTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/BiLinkMapTest.java index 17fcc229..83f4809c 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/BiLinkMapTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/BiLinkMapTest.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/BiLinkTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/BiLinkTest.java index 1acc06fa..55f31ac9 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/BiLinkTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/BiLinkTest.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/BiLinkTestBase.java b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/BiLinkTestBase.java index b5bd41ef..a6beec86 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/BiLinkTestBase.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/BiLinkTestBase.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/ButtonIdTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/ButtonIdTest.java index 04c6dc18..01a1b975 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/ButtonIdTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/ButtonIdTest.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/HighlightsTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/HighlightsTest.java index 7d6dfe67..fe663a5b 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/HighlightsTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/HighlightsTest.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/LinkHighlightTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/LinkHighlightTest.java index 205f08ce..a88de33a 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/LinkHighlightTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/LinkHighlightTest.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/ModTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/ModTest.java index bb40279c..03a18f97 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/ModTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/ModTest.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/NodeSelectionTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/NodeSelectionTest.java index 60cada45..06a78580 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/NodeSelectionTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/NodeSelectionTest.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/PropertyPanelTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/PropertyPanelTest.java index b08ee4dc..7e6cc227 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/PropertyPanelTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/PropertyPanelTest.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/TopoJsonTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/TopoJsonTest.java index 6a3bfa43..ac0051cd 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/TopoJsonTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/ui/topo/TopoJsonTest.java @@ -12,7 +12,6 @@ * 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. - * */ package org.onosproject.ui.topo; |