diff options
author | CNlucius <lukai1@huawei.com> | 2016-09-13 11:40:12 +0800 |
---|---|---|
committer | CNlucius <lukai1@huawei.com> | 2016-09-13 11:41:53 +0800 |
commit | b731e2f1dd0972409b136aebc7b463dd72c9cfad (patch) | |
tree | 5107d7d80c19ad8076c2c97c2b5ef8d1cf3ab903 /framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/event | |
parent | ee93993458266114c29271a481ef9ce7ce621b2a (diff) |
ONOSFW-171
O/S-SFC-ONOS scenario documentation
Change-Id: I51ae1cf736ea24ab6680f8edca1b2bf5dd598365
Signed-off-by: CNlucius <lukai1@huawei.com>
Diffstat (limited to 'framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/event')
4 files changed, 0 insertions, 423 deletions
diff --git a/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/event/VtnRscEvent.java b/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/event/VtnRscEvent.java deleted file mode 100644 index ce3faae7..00000000 --- a/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/event/VtnRscEvent.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * 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.vtnrsc.event; - -import org.onosproject.event.AbstractEvent; - - -/** - * Describes network vtnrsc event. - */ -public class VtnRscEvent - extends AbstractEvent<VtnRscEvent.Type, VtnRscEventFeedback> { - - /** - * Type of vtnrsc events. - */ - public enum Type { - /** - * Signifies that floating IP has create. - */ - FLOATINGIP_PUT, - /** - * Signifies that floating IP has delete. - */ - FLOATINGIP_DELETE, - /** - * Signifies that router has create. - */ - ROUTER_PUT, - /** - * Signifies that router has delete. - */ - ROUTER_DELETE, - /** - * Signifies that router interface has add. - */ - ROUTER_INTERFACE_PUT, - /** - * Signifies that router interface has remove. - */ - ROUTER_INTERFACE_DELETE, - /** - * Signifies that port-pair has add. - */ - PORT_PAIR_PUT, - /** - * Signifies that port-pair has remove. - */ - PORT_PAIR_DELETE, - /** - * Signifies that port-pair has update. - */ - PORT_PAIR_UPDATE, - /** - * Signifies that port-pair-group has add. - */ - PORT_PAIR_GROUP_PUT, - /** - * Signifies that port-pair-group has remove. - */ - PORT_PAIR_GROUP_DELETE, - /** - * Signifies that port-pair-group has update. - */ - PORT_PAIR_GROUP_UPDATE, - /** - * Signifies that flow-classifier has add. - */ - FLOW_CLASSIFIER_PUT, - /** - * Signifies that flow-classifier has remove. - */ - FLOW_CLASSIFIER_DELETE, - /** - * Signifies that flow-classifier has update. - */ - FLOW_CLASSIFIER_UPDATE, - /** - * Signifies that port-chain has add. - */ - PORT_CHAIN_PUT, - /** - * Signifies that port-chain has remove. - */ - PORT_CHAIN_DELETE, - /** - * Signifies that port-chain has update. - */ - PORT_CHAIN_UPDATE - } - - /** - * Creates an event of a given type and for the specified vtn event feedback. - * - * @param type Vtnrsc event type - * @param vtnFeedback event VtnrscEventFeedback subject - */ - public VtnRscEvent(Type type, VtnRscEventFeedback vtnFeedback) { - super(type, vtnFeedback); - } - - /** - * Creates an event of a given type and for the specified vtn event feedback. - * - * @param type Vtnrsc event type - * @param vtnFeedback event VtnrscEventFeedback subject - * @param time occurrence time - */ - public VtnRscEvent(Type type, VtnRscEventFeedback vtnFeedback, long time) { - super(type, vtnFeedback, time); - } -} diff --git a/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/event/VtnRscEventFeedback.java b/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/event/VtnRscEventFeedback.java deleted file mode 100644 index 112c6411..00000000 --- a/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/event/VtnRscEventFeedback.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * 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.vtnrsc.event; - -import java.util.Objects; - -import org.onosproject.vtnrsc.FloatingIp; -import org.onosproject.vtnrsc.Router; -import org.onosproject.vtnrsc.RouterInterface; -import org.onosproject.vtnrsc.PortPair; -import org.onosproject.vtnrsc.PortPairGroup; -import org.onosproject.vtnrsc.FlowClassifier; -import org.onosproject.vtnrsc.PortChain; - -import static com.google.common.base.MoreObjects.toStringHelper; -import static com.google.common.base.Preconditions.checkNotNull; - -/** - * Representation of a VtnRsc event feedback. - */ -public class VtnRscEventFeedback { - private final FloatingIp floaingtIp; - private final Router router; - private final RouterInterface routerInterface; - private final PortPair portPair; - private final PortPairGroup portPairGroup; - private final FlowClassifier flowClassifier; - private final PortChain portChain; - - /** - * Creates VtnRscEventFeedback object. - * - * @param floatingIp the floating Ip - */ - public VtnRscEventFeedback(FloatingIp floatingIp) { - this.floaingtIp = checkNotNull(floatingIp, "floaintIp cannot be null"); - this.router = null; - this.routerInterface = null; - this.portPair = null; - this.portPairGroup = null; - this.flowClassifier = null; - this.portChain = null; - } - - /** - * Creates VtnRscEventFeedback object. - * - * @param router the router - */ - public VtnRscEventFeedback(Router router) { - this.floaingtIp = null; - this.router = checkNotNull(router, "router cannot be null"); - this.routerInterface = null; - this.portPair = null; - this.portPairGroup = null; - this.flowClassifier = null; - this.portChain = null; - } - - /** - * Creates VtnRscEventFeedback object. - * - * @param routerInterface the router interface - */ - public VtnRscEventFeedback(RouterInterface routerInterface) { - this.floaingtIp = null; - this.router = null; - this.routerInterface = checkNotNull(routerInterface, - "routerInterface cannot be null"); - this.portPair = null; - this.portPairGroup = null; - this.flowClassifier = null; - this.portChain = null; - } - - /** - * Creates VtnRscEventFeedback object. - * - * @param portPair the Port-Pair - */ - public VtnRscEventFeedback(PortPair portPair) { - this.floaingtIp = null; - this.router = null; - this.routerInterface = null; - this.portPair = checkNotNull(portPair, - "Port-Pair cannot be null"); - this.portPairGroup = null; - this.flowClassifier = null; - this.portChain = null; - } - - /** - * Creates VtnRscEventFeedback object. - * - * @param portPairGroup the Port-Pair-Group - */ - public VtnRscEventFeedback(PortPairGroup portPairGroup) { - this.floaingtIp = null; - this.router = null; - this.routerInterface = null; - this.portPair = null; - this.portPairGroup = checkNotNull(portPairGroup, - "Port-Pair-Group cannot be null"); - this.flowClassifier = null; - this.portChain = null; - } - - /** - * Creates VtnRscEventFeedback object. - * - * @param flowClassifier the Flow-Classifier - */ - public VtnRscEventFeedback(FlowClassifier flowClassifier) { - this.floaingtIp = null; - this.router = null; - this.routerInterface = null; - this.portPair = null; - this.portPairGroup = null; - this.flowClassifier = checkNotNull(flowClassifier, - "Flow-Classifier cannot be null"); - this.portChain = null; - } - - /** - * Creates VtnRscEventFeedback object. - * - * @param portChain the Port-Chain - */ - public VtnRscEventFeedback(PortChain portChain) { - this.floaingtIp = null; - this.router = null; - this.routerInterface = null; - this.portPair = null; - this.portPairGroup = null; - this.flowClassifier = null; - this.portChain = checkNotNull(portChain, - "Port-Chain cannot be null"); - } - - /** - * Returns floating IP. - * - * @return floaingtIp the floating IP - */ - public FloatingIp floatingIp() { - return floaingtIp; - } - - /** - * Returns router. - * - * @return router the router - */ - public Router router() { - return router; - } - - /** - * Returns router interface. - * - * @return routerInterface the router interface - */ - public RouterInterface routerInterface() { - return routerInterface; - } - - /** - * Returns Port-Pair. - * - * @return portPair the Port-Pair - */ - public PortPair portPair() { - return portPair; - } - - /** - * Returns Port-Pair-Group. - * - * @return portPairGroup the Port-Pair-Group - */ - public PortPairGroup portPairGroup() { - return portPairGroup; - } - - /** - * Returns Flow-Classifier. - * - * @return flowClassifier the Flow-Classifier - */ - public FlowClassifier flowClassifier() { - return flowClassifier; - } - - /** - * Returns Port-Chain. - * - * @return portChain the Port-Chain - */ - public PortChain portChain() { - return portChain; - } - - @Override - public int hashCode() { - return Objects.hash(floaingtIp, router, routerInterface, portPair, - portPairGroup, flowClassifier, portChain); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj instanceof VtnRscEventFeedback) { - final VtnRscEventFeedback that = (VtnRscEventFeedback) obj; - return Objects.equals(this.floaingtIp, that.floaingtIp) - && Objects.equals(this.router, that.router) - && Objects.equals(this.routerInterface, that.routerInterface) - && Objects.equals(this.portPair, that.portPair) - && Objects.equals(this.portPairGroup, that.portPairGroup) - && Objects.equals(this.flowClassifier, that.flowClassifier) - && Objects.equals(this.portChain, that.portChain); - } - return false; - } - - @Override - public String toString() { - return toStringHelper(this) - .add("router", router) - .add("floaingtIp", floaingtIp) - .add("routerInterface", routerInterface) - .add("portPair", portPair) - .add("portPairGroup", portPairGroup) - .add("flowClassifier", flowClassifier) - .add("portChain", portChain) - .toString(); - } -} diff --git a/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/event/VtnRscListener.java b/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/event/VtnRscListener.java deleted file mode 100644 index fdd67552..00000000 --- a/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/event/VtnRscListener.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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.vtnrsc.event; - -import org.onosproject.event.EventListener; - -/** - * Entity capable of VtnRsc related events. - */ -public interface VtnRscListener extends EventListener<VtnRscEvent> { - -} diff --git a/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/event/package-info.java b/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/event/package-info.java deleted file mode 100644 index c1575ad3..00000000 --- a/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/event/package-info.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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. - */ - -/** - * Event of VtnRsc for VtnRsc service. - */ -package org.onosproject.vtnrsc.event; |