Open Kilda Java Documentation
ISwitchManager.java
Go to the documentation of this file.
1 /* Copyright 2017 Telstra Open Source
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 package org.openkilda.floodlight.switchmanager;
17 
21 
22 import net.floodlightcontroller.core.IOFSwitch;
23 import net.floodlightcontroller.core.module.IFloodlightService;
24 import org.projectfloodlight.openflow.protocol.OFFlowStatsEntry;
25 import org.projectfloodlight.openflow.protocol.OFMeterConfigStatsReply;
26 import org.projectfloodlight.openflow.types.DatapathId;
27 
28 import java.util.List;
29 import java.util.Map;
30 
31 
32 public interface ISwitchManager extends IFloodlightService {
34  String OVS_MANUFACTURER = "Nicira, Inc.";
35  long DROP_RULE_COOKIE = 0x8000000000000001L;
36  long VERIFICATION_BROADCAST_RULE_COOKIE = 0x8000000000000002L;
37  long VERIFICATION_UNICAST_RULE_COOKIE = 0x8000000000000003L;
38 
46 
47 
55  void installDefaultRules(final DatapathId dpid) throws SwitchOperationException;
56 
62  void installVerificationRule(final DatapathId dpid, final boolean isBroadcast)
64 
71  void installDropFlow(final DatapathId dpid) throws SwitchOperationException;
72 
82  void installDropFlowCustom(final DatapathId dpid, String dstMac, String dstMask,
83  final long cookie, final int priority) throws SwitchOperationException;
84 
85 
98  long installIngressFlow(final DatapathId dpid, final String flowId, final Long cookie,
99  final int inputPort, final int outputPort, final int inputVlanId,
100  final int transitVlanId, final OutputVlanType outputVlanType,
101  final long meterId) throws SwitchOperationException;
102 
116  long installEgressFlow(final DatapathId dpid, final String flowId, final Long cookie,
117  final int inputPort, final int outputPort, final int transitVlanId,
118  final int outputVlanId, final OutputVlanType outputVlanType)
120 
132  long installTransitFlow(final DatapathId dpid, final String flowId, final Long cookie,
133  final int inputPort, final int outputPort, final int transitVlanId)
135 
149  long installOneSwitchFlow(final DatapathId dpid, final String flowId, final Long cookie,
150  final int inputPort, final int outputPort, int inputVlanId,
151  int outputVlanId, final OutputVlanType outputVlanType,
152  final long meterId) throws SwitchOperationException;
153 
160  List<OFFlowStatsEntry> dumpFlowTable(final DatapathId dpid);
161 
169  OFMeterConfigStatsReply dumpMeters(final DatapathId dpid) throws SwitchOperationException;
170 
182  long installMeter(final DatapathId dpid, final long bandwidth, final long burstSize,
183  final long meterId) throws SwitchOperationException;
184 
193  long deleteMeter(final DatapathId dpid, final long meterId) throws SwitchOperationException;
194 
195 
196  Map<DatapathId, IOFSwitch> getAllSwitchMap();
197 
205  List<Long> deleteAllNonDefaultRules(DatapathId dpid) throws SwitchOperationException;
206 
214  List<Long> deleteDefaultRules(DatapathId dpid) throws SwitchOperationException;
215 
224  List<Long> deleteRulesByCriteria(DatapathId dpid, DeleteRulesCriteria... criteria) throws SwitchOperationException;
225 
229  void startSafeMode(final DatapathId dpid) throws SwitchOperationException;
230 
234  void stopSafeMode(final DatapathId dpid);
235 
236  void safeModeTick();
237 
238  void sendSwitchActivate(final IOFSwitch sw) throws SwitchOperationException;
239 
240  void sendPortUpEvents(final IOFSwitch sw) throws SwitchOperationException;
241 
255  void configurePort(DatapathId dpId, int portNumber, Boolean portAdminDown) throws SwitchOperationException;
256 }
List< Long > deleteDefaultRules(DatapathId dpid)
long installMeter(final DatapathId dpid, final long bandwidth, final long burstSize, final long meterId)
long installIngressFlow(final DatapathId dpid, final String flowId, final Long cookie, final int inputPort, final int outputPort, final int inputVlanId, final int transitVlanId, final OutputVlanType outputVlanType, final long meterId)
void installDropFlowCustom(final DatapathId dpid, String dstMac, String dstMask, final long cookie, final int priority)
void installVerificationRule(final DatapathId dpid, final boolean isBroadcast)
List< OFFlowStatsEntry > dumpFlowTable(final DatapathId dpid)
Map< DatapathId, IOFSwitch > getAllSwitchMap()
List< Long > deleteRulesByCriteria(DatapathId dpid, DeleteRulesCriteria... criteria)
long installEgressFlow(final DatapathId dpid, final String flowId, final Long cookie, final int inputPort, final int outputPort, final int transitVlanId, final int outputVlanId, final OutputVlanType outputVlanType)
long installTransitFlow(final DatapathId dpid, final String flowId, final Long cookie, final int inputPort, final int outputPort, final int transitVlanId)
long deleteMeter(final DatapathId dpid, final long meterId)
ConnectModeRequest.Mode connectMode(final ConnectModeRequest.Mode mode)
long installOneSwitchFlow(final DatapathId dpid, final String flowId, final Long cookie, final int inputPort, final int outputPort, int inputVlanId, int outputVlanId, final OutputVlanType outputVlanType, final long meterId)
void configurePort(DatapathId dpId, int portNumber, Boolean portAdminDown)
net
Definition: plan-b.py:46
List< Long > deleteAllNonDefaultRules(DatapathId dpid)
OFMeterConfigStatsReply dumpMeters(final DatapathId dpid)