2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.groupbasedpolicy.renderer.ofoverlay;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.ofoverlay.rev140528.OfOverlayNodeConfig;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
18 * Mock version of switch manager suitable for unit tests
20 public class MockSwitchManager extends SwitchManager {
22 public MockSwitchManager() {
26 public void addSwitch(NodeId node,
27 NodeConnectorId tunnelPort,
28 Set<NodeConnectorId> externalPorts,
29 OfOverlayNodeConfig nodeConfig) {
30 SwitchState state = new SwitchState(node, tunnelPort,
31 externalPorts, nodeConfig);
32 state.status = SwitchStatus.READY;
33 switches.put(node, state);
34 for (SwitchListener listener : listeners) {
35 listener.switchReady(node);