Mahesh Poojary S | 335e7c3 | 2015-10-29 10:16:51 +0530 | [diff] [blame] | 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.manager.impl; |
| 17 | |
| 18 | import static org.slf4j.LoggerFactory.getLogger; |
| 19 | |
| 20 | import org.apache.felix.scr.annotations.Activate; |
| 21 | import org.apache.felix.scr.annotations.Component; |
| 22 | import org.apache.felix.scr.annotations.Deactivate; |
| 23 | import org.apache.felix.scr.annotations.Service; |
| 24 | import org.onosproject.sfc.manager.SfcService; |
| 25 | import org.onosproject.vtnrsc.PortChain; |
| 26 | import org.slf4j.Logger; |
| 27 | |
| 28 | /** |
| 29 | * Provides implementation of SFC Service. |
| 30 | */ |
| 31 | @Component(immediate = true) |
| 32 | @Service |
| 33 | public class SfcManager implements SfcService { |
| 34 | |
| 35 | private final Logger log = getLogger(getClass()); |
| 36 | |
| 37 | @Activate |
| 38 | public void activate() { |
| 39 | log.info("Started"); |
| 40 | } |
| 41 | |
| 42 | @Deactivate |
| 43 | public void deactivate() { |
| 44 | log.info("Stopped"); |
| 45 | } |
| 46 | |
| 47 | @Override |
| 48 | public void onPortPairCreated() { |
| 49 | log.debug("onPortPairCreated"); |
| 50 | // TODO: Process port-pair on creation. |
| 51 | // TODO: Parameter also needs to be modified. |
| 52 | } |
| 53 | |
| 54 | @Override |
| 55 | public void onPortPairDeleted() { |
| 56 | log.debug("onPortPairDeleted"); |
| 57 | // TODO: Process port-pair on deletion. |
| 58 | // TODO: Parameter also needs to be modified. |
| 59 | } |
| 60 | |
| 61 | @Override |
| 62 | public void onPortPairGroupCreated() { |
| 63 | log.debug("onPortPairGroupCreated"); |
| 64 | // TODO: Process port-pair-group on creation. |
| 65 | // TODO: Parameter also needs to be modified. |
| 66 | } |
| 67 | |
| 68 | @Override |
| 69 | public void onPortPairGroupDeleted() { |
| 70 | log.debug("onPortPairGroupDeleted"); |
| 71 | // TODO: Process port-pair-group on deletion. |
| 72 | // TODO: Parameter also needs to be modified. |
| 73 | } |
| 74 | |
| 75 | @Override |
| 76 | public void onFlowClassifierCreated() { |
| 77 | log.debug("onFlowClassifierCreated"); |
| 78 | // TODO: Process flow-classifier on creation. |
| 79 | // TODO: Parameter also needs to be modified. |
| 80 | } |
| 81 | |
| 82 | @Override |
| 83 | public void onFlowClassifierDeleted() { |
| 84 | log.debug("onFlowClassifierDeleted"); |
| 85 | // TODO: Process flow-classifier on deletion. |
| 86 | // TODO: Parameter also needs to be modified. |
| 87 | } |
| 88 | |
| 89 | @Override |
| 90 | public void onPortChainCreated() { |
| 91 | log.debug("onPortChainCreated"); |
| 92 | // TODO: Process port-chain on creation. |
| 93 | // TODO: Parameter also needs to be modified. |
| 94 | |
| 95 | } |
| 96 | |
| 97 | @Override |
| 98 | public void onPortChainDeleted() { |
| 99 | log.debug("onPortChainDeleted"); |
| 100 | // TODO: Process port-chain on deletion. |
| 101 | // TODO: Parameter also needs to be modified. |
| 102 | } |
| 103 | |
| 104 | /** |
| 105 | * Install SF Forwarding rule into OVS. |
| 106 | * |
| 107 | * @param portChain |
| 108 | * port chain |
| 109 | */ |
| 110 | public void installForwardingRule(PortChain portChain) { |
| 111 | log.debug("installForwardingRule"); |
| 112 | // TODO: Installation of SF Forwarding rule into OVS. |
| 113 | } |
| 114 | |
| 115 | /** |
| 116 | * Uninstall SF Forwarding rule from OVS. |
| 117 | * |
| 118 | * @param portChain |
| 119 | * port chain |
| 120 | */ |
| 121 | public void unInstallForwardingRule(PortChain portChain) { |
| 122 | log.debug("unInstallForwardingRule"); |
| 123 | // TODO: Uninstallation of SF Forwarding rule from OVS. |
| 124 | } |
| 125 | } |