+++ /dev/null
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-
-package org.opendaylight.controller.sal.binding.codegen.impl;
-
-public class BrokerImplClassLoader extends ClassLoader {
- private final ClassLoader spiClassLoader;
-
- public BrokerImplClassLoader(final ClassLoader model, final ClassLoader spi) {
- super(model);
- this.spiClassLoader = spi;
- }
-
- @Override
- public Class<? extends Object> loadClass(final String name) throws ClassNotFoundException {
- try {
- return super.loadClass(name);
- } catch (ClassNotFoundException e) {
- return this.spiClassLoader.loadClass(name);
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.sal.binding.impl.connect.dom;
-
-public class CompositeNodeUtils {
-
-}
+++ /dev/null
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.sal.binding.impl.connect.dom;
-
-public class Constants {
- public static final Class<byte[]> BYTES_CLASS = byte[].class;
-}
+++ /dev/null
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.sal.binding.impl.connect.dom;
-
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-
-import org.opendaylight.controller.md.sal.common.api.data.DataModification;
-import org.opendaylight.yangtools.concepts.Path;
-
-public final class DataModificationTracker<P extends Path<P>,D> {
- ConcurrentMap<Object, DataModification<P,D>> trackedTransactions = new ConcurrentHashMap<>();
-
- public void startTrackingModification(DataModification<P,D> modification) {
- trackedTransactions.putIfAbsent(modification.getIdentifier(), modification);
- }
-
- public boolean containsIdentifier(Object identifier) {
- return trackedTransactions.containsKey(identifier);
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.sal.binding.impl;
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.sal.binding.spi;
-
-public interface DelegateProxy<T> {
-
- void setDelegate(T delegate);
- T getDelegate();
-}
+++ /dev/null
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.sal.binding.spi.remote;
-
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
-
-public interface RemoteRpcRouter {
-
-
-
-
-
-
- ListenerRegistration<RouteChangeListener> registerRouteChangeListener(RouteChangeListener listener);
-
-
-
-
-}
+++ /dev/null
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.sal.binding.spi.remote;
-
-import java.util.EventListener;
-
-import org.opendaylight.controller.md.sal.common.api.routing.RouteChange;
-import org.opendaylight.yangtools.yang.binding.BaseIdentity;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-
-public interface RouteChangeListener extends EventListener {
-
- void onRouteChange(RouteChange<Class<? extends BaseIdentity>, InstanceIdentifier<?>> change);
-
-}
+++ /dev/null
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.sal.compability;
-
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnector;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortFeatures;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector;
-
-public class ToSalPropertyClassUtils {
- public static Bandwidth salAdvertisedBandwidthFrom(NodeConnector nodeConnector) {
- FlowCapableNodeConnector flowCapNodeConn = nodeConnector.getAugmentation(FlowCapableNodeConnector.class);
- PortFeatures portFeatures = flowCapNodeConn.getAdvertisedFeatures();
- return new AdvertisedBandwidth(resolveBandwidth(portFeatures));
- }
-
- public static Bandwidth salPeerBandwidthFrom(NodeConnector nodeConnector) {
- FlowCapableNodeConnector flowCapNodeConn = nodeConnector.getAugmentation(FlowCapableNodeConnector.class);
- PortFeatures portFeatures = flowCapNodeConn.getPeerFeatures();
- return new PeerBandwidth(resolveBandwidth(portFeatures));
- }
-
- public static Bandwidth salSupportedBandwidthFrom(NodeConnector nodeConnector) {
- FlowCapableNodeConnector flowCapNodeConn = nodeConnector.getAugmentation(FlowCapableNodeConnector.class);
- PortFeatures portFeatures = flowCapNodeConn.getSupported();
- return new SupportedBandwidth(resolveBandwidth(portFeatures));
- }
-
- public static MacAddress salMacAddressFrom(NodeConnector nodeConnector) {
- FlowCapableNodeConnector flowCapNodeConn = nodeConnector.getAugmentation(FlowCapableNodeConnector.class);
- String hwAddress = flowCapNodeConn.getHardwareAddress().getValue();
- return new MacAddress(bytesFrom(hwAddress));
- }
-
-
- public static Name salNameFrom(NodeConnector nodeConnector) {
- FlowCapableNodeConnector flowCapNodeConn = nodeConnector.getAugmentation(FlowCapableNodeConnector.class);
- return new Name(flowCapNodeConn.getName());
- }
-
-
-
- private static byte[] bytesFrom(String hwAddress) {
- String[] mac = hwAddress.split(":");
- byte[] macAddress = new byte[6]; // mac.length == 6 bytes
- for (int i = 0; i < mac.length; i++) {
- macAddress[i] = Integer.decode("0x" + mac[i]).byteValue();
- }
- return macAddress;
- }
-
- private static long resolveBandwidth(PortFeatures portFeatures) {
- if (portFeatures.is_1tbFd()) {
- return Bandwidth.BW1Tbps;
- } else if (portFeatures.is_100gbFd()) {
- return Bandwidth.BW100Gbps;
- } else if (portFeatures.is_40gbFd()) {
- return Bandwidth.BW40Gbps;
- } else if (portFeatures.is_10gbFd()) {
- return Bandwidth.BW10Gbps;
- } else if (portFeatures.is_1gbHd() || portFeatures.is_1gbFd()) {
- return Bandwidth.BW1Gbps;
- } else if (portFeatures.is_100mbHd() || portFeatures.is_100mbFd()) {
- return Bandwidth.BW100Mbps;
- } else if (portFeatures.is_10mbHd() || portFeatures.is_10mbFd()) {
- return Bandwidth.BW10Mbps;
- } else {
- return Bandwidth.BWUNK;
- }
- }
-
-}