2 * Copyright (c) 2013 Big Switch Networks, Inc. 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.controller.protocol_plugin.openflow.internal;
11 import org.opendaylight.controller.sal.core.Node;
12 import org.opendaylight.controller.sal.core.NodeTable;
13 import org.opendaylight.controller.sal.utils.NodeTableCreator;
14 import org.slf4j.Logger;
15 import org.slf4j.LoggerFactory;
17 public class TableConverter {
18 private static final Logger log = LoggerFactory
19 .getLogger(TableConverter.class);
21 public static NodeTable toNodeTable(byte tableId, Node node) {
22 log.trace("Openflow table ID: {}", Byte.toString(tableId));
23 return NodeTableCreator.createNodeTable(tableId, node);
26 public static byte toOFTable(NodeTable salTable) {
27 log.trace("SAL Table: {}", salTable);
28 return (Byte) salTable.getID();