2 * Copyright (c) 2016 Hewlett Packard Enterprise, Co. 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.netvirt.vpnmanager;
11 import java.math.BigInteger;
12 import javax.inject.Inject;
13 import javax.inject.Singleton;
14 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
15 import org.opendaylight.netvirt.vpnmanager.api.ICentralizedSwitchProvider;
18 public class CentralizedSwitchProvider implements ICentralizedSwitchProvider {
20 private final DataBroker dataBroker;
23 public CentralizedSwitchProvider(DataBroker dataBroker) {
24 this.dataBroker = dataBroker;
28 public BigInteger getPrimarySwitchForRouter(String routerName) {
29 return VpnUtil.getPrimarySwitchForRouter(dataBroker, routerName);