blob: e6fc8d9855fdd629bb59ea71ac4c67a0bc4a7c6b [file] [log] [blame]
/*
* Copyright 2017-present Open Networking Foundation
*
* 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.pi.demo.app.tor;
import com.google.common.collect.ImmutableList;
import org.onosproject.net.DeviceId;
import org.onosproject.net.driver.AbstractHandlerBehaviour;
import org.onosproject.net.flow.TrafficTreatment;
import org.onosproject.net.flow.criteria.Criterion;
import org.onosproject.net.packet.InboundPacket;
import org.onosproject.net.packet.OutboundPacket;
import org.onosproject.net.pi.model.PiPipelineInterpreter;
import org.onosproject.net.pi.runtime.PiAction;
import org.onosproject.net.pi.runtime.PiCounterId;
import org.onosproject.net.pi.runtime.PiHeaderFieldId;
import org.onosproject.net.pi.runtime.PiPacketOperation;
import org.onosproject.net.pi.runtime.PiTableId;
import java.util.Collection;
import java.util.Optional;
/**
* Implementation of a PiPipeline interpreter for TOR configuration.
*/
//TODO implement
public class TorInterpreter extends AbstractHandlerBehaviour implements PiPipelineInterpreter {
@Override
public Optional<Integer> mapPiTableId(PiTableId piTableId) {
return Optional.empty();
}
@Override
public PiAction mapTreatment(TrafficTreatment treatment, PiTableId piTableId) throws PiInterpreterException {
return null;
}
@Override
public Optional<PiCounterId> mapTableCounter(PiTableId piTableId) {
return Optional.empty();
}
@Override
public Collection<PiPacketOperation> mapOutboundPacket(OutboundPacket packet) throws PiInterpreterException {
return ImmutableList.of();
}
@Override
public InboundPacket mapInboundPacket(DeviceId deviceId, PiPacketOperation packetInOperation)
throws PiInterpreterException {
return null;
}
@Override
public Optional<PiHeaderFieldId> mapCriterionType(Criterion.Type type) {
return Optional.empty();
}
@Override
public Optional<Criterion.Type> mapPiHeaderFieldId(PiHeaderFieldId headerFieldId) {
return Optional.empty();
}
@Override
public Optional<PiTableId> mapFlowRuleTableId(int flowRuleTableId) {
return Optional.empty();
}
}