Committed by
Gerrit Code Review
[ONOS-3119] FlowClassifier installer impl.
Change-Id: I48b2378ad185528f5775f547bc965ebbbd009116
Showing
4 changed files
with
40 additions
and
91 deletions
apps/vtn/sfcmgr/src/main/java/org/onosproject/sfc/installer/FlowClassifierInstaller.java
deleted
100644 → 0
| 1 | -/* | ||
| 2 | - * Copyright 2015 Open Networking Laboratory | ||
| 3 | - * | ||
| 4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | - * you may not use this file except in compliance with the License. | ||
| 6 | - * You may obtain a copy of the License at | ||
| 7 | - * | ||
| 8 | - * http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | - * | ||
| 10 | - * Unless required by applicable law or agreed to in writing, software | ||
| 11 | - * distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | - * See the License for the specific language governing permissions and | ||
| 14 | - * limitations under the License. | ||
| 15 | - */ | ||
| 16 | -package org.onosproject.sfc.installer; | ||
| 17 | - | ||
| 18 | -import org.onosproject.core.ApplicationId; | ||
| 19 | -import org.onosproject.net.flowobjective.Objective; | ||
| 20 | -import org.onosproject.vtnrsc.FlowClassifier; | ||
| 21 | -import org.onosproject.vtnrsc.PortPair; | ||
| 22 | - | ||
| 23 | -/** | ||
| 24 | - * Abstraction of an entity which installs flow classification rules in ovs. | ||
| 25 | - */ | ||
| 26 | -public interface FlowClassifierInstaller { | ||
| 27 | - | ||
| 28 | - /** | ||
| 29 | - * Install flow classifier rules. | ||
| 30 | - * | ||
| 31 | - * @param flowClassifier Flow Classifier | ||
| 32 | - * @param portPair Port pair | ||
| 33 | - */ | ||
| 34 | - void install(FlowClassifier flowClassifier, PortPair portPair); | ||
| 35 | - | ||
| 36 | - /** | ||
| 37 | - * Programs forwarding object for flow classifier. | ||
| 38 | - * | ||
| 39 | - * @param flowClassifier flow classifier | ||
| 40 | - * @param portPair port pair | ||
| 41 | - * @param appid application id | ||
| 42 | - * @param type forwarding objective operation type | ||
| 43 | - */ | ||
| 44 | - void programFlowClassification(FlowClassifier flowClassifier, PortPair portPair, ApplicationId appid, | ||
| 45 | - Objective.Operation type); | ||
| 46 | -} |
apps/vtn/sfcmgr/src/main/java/org/onosproject/sfc/installer/FlowClassifierInstallerService.java
0 → 100644
| 1 | +package org.onosproject.sfc.installer; | ||
| 2 | + | ||
| 3 | +import org.onosproject.net.NshServicePathId; | ||
| 4 | +import org.onosproject.net.flowobjective.Objective.Operation; | ||
| 5 | +import org.onosproject.vtnrsc.FlowClassifier; | ||
| 6 | +import org.onosproject.vtnrsc.PortChain; | ||
| 7 | +import org.onosproject.vtnrsc.PortPair; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * Abstraction of an entity which installs flow classification rules in ovs. | ||
| 11 | + */ | ||
| 12 | +public interface FlowClassifierInstallerService { | ||
| 13 | + | ||
| 14 | + /** | ||
| 15 | + * Install Flow-Classifier. | ||
| 16 | + * | ||
| 17 | + * @param portChain port-chain | ||
| 18 | + * @param nshSpiId nsh spi-id | ||
| 19 | + */ | ||
| 20 | + void installFlowClassifier(PortChain portChain, NshServicePathId nshSpiId); | ||
| 21 | + | ||
| 22 | + /** | ||
| 23 | + * Uninstall Flow-Classifier. | ||
| 24 | + * | ||
| 25 | + * @param portChain port-chain | ||
| 26 | + * @param nshSpiId nsh spi-id | ||
| 27 | + */ | ||
| 28 | + void unInstallFlowClassifier(PortChain portChain, NshServicePathId nshSpiId); | ||
| 29 | + | ||
| 30 | + /** | ||
| 31 | + * Prepare forwarding object for flow classifier. | ||
| 32 | + * | ||
| 33 | + * @param flowClassifier flow classifier | ||
| 34 | + * @param portPair port pair | ||
| 35 | + * @param nshSpiId nsh spi id | ||
| 36 | + * @param type forwarding objective operation type | ||
| 37 | + */ | ||
| 38 | + void prepareFlowClassification(FlowClassifier flowClassifier, PortPair portPair, NshServicePathId nshSpiId, | ||
| 39 | + Operation type); | ||
| 40 | +} |
| 1 | -/* | ||
| 2 | - * Copyright 2015 Open Networking Laboratory | ||
| 3 | - * | ||
| 4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | - * you may not use this file except in compliance with the License. | ||
| 6 | - * You may obtain a copy of the License at | ||
| 7 | - * | ||
| 8 | - * http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | - * | ||
| 10 | - * Unless required by applicable law or agreed to in writing, software | ||
| 11 | - * distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | - * See the License for the specific language governing permissions and | ||
| 14 | - * limitations under the License. | ||
| 15 | - */ | ||
| 16 | -package org.onosproject.sfc.installer.impl; | ||
| 17 | - | ||
| 18 | -import org.onosproject.core.ApplicationId; | ||
| 19 | -import org.onosproject.net.flowobjective.Objective.Operation; | ||
| 20 | -import org.onosproject.sfc.installer.FlowClassifierInstaller; | ||
| 21 | -import org.onosproject.vtnrsc.FlowClassifier; | ||
| 22 | -import org.onosproject.vtnrsc.PortPair; | ||
| 23 | - | ||
| 24 | -/** | ||
| 25 | - * Provides flow classifier installer. | ||
| 26 | - */ | ||
| 27 | -public class DefaultFlowClassifierInstaller implements FlowClassifierInstaller { | ||
| 28 | - | ||
| 29 | - /** | ||
| 30 | - * Default constructor. | ||
| 31 | - */ | ||
| 32 | - public DefaultFlowClassifierInstaller() { | ||
| 33 | - } | ||
| 34 | - | ||
| 35 | - @Override | ||
| 36 | - public void install(FlowClassifier flowClassifier, PortPair portPair) { | ||
| 37 | - // TODO: Process flow-classifier for installation. | ||
| 38 | - } | ||
| 39 | - | ||
| 40 | - @Override | ||
| 41 | - public void programFlowClassification(FlowClassifier flowClassifier, PortPair portPair, ApplicationId appid, | ||
| 42 | - Operation type) { | ||
| 43 | - // TODO: program forwarding objective for flow-classifier installation. | ||
| 44 | - } | ||
| 45 | -} |
apps/vtn/sfcmgr/src/main/java/org/onosproject/sfc/installer/impl/FlowClassifierInstallerImpl.java
0 → 100644
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment