blob: 5b1eea330893b079fe07846541c48cdf98d3cee4 [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 com.google.common.collect.Maps;
import org.apache.felix.scr.annotations.Component;
import org.onosproject.net.DeviceId;
import org.onosproject.net.Host;
import org.onosproject.net.PortNumber;
import org.onosproject.net.flow.FlowRule;
import org.onosproject.net.topology.Topology;
import org.onosproject.pi.demo.app.common.AbstractUpgradableFabricApp;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* Implementation of an upgradable fabric app for TOR configuration.
*/
//TODO implement
@Component(immediate = true)
public class TorApp extends AbstractUpgradableFabricApp {
private static final String APP_NAME = "org.onosproject.pi-tor";
private static final Map<DeviceId, Map<Set<PortNumber>, Short>> DEVICE_GROUP_ID_MAP = Maps.newHashMap();
public TorApp() {
super(APP_NAME, TorPipeconfFactory.getAll());
}
@Override
public boolean initDevice(DeviceId deviceId) {
// Nothing to do.
return true;
}
@Override
public List<FlowRule> generateLeafRules(DeviceId leaf, Host srcHost, Collection<Host> dstHosts,
Collection<DeviceId> availableSpines, Topology topo)
throws FlowRuleGeneratorException {
return ImmutableList.of();
}
@Override
public List<FlowRule> generateSpineRules(DeviceId deviceId, Collection<Host> dstHosts, Topology topo)
throws FlowRuleGeneratorException {
return ImmutableList.of();
}
}