Initial opendaylight infrastructure commit!!
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / utils / NodeCreator.java
1
2 /*
3  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7  * and is available at http://www.eclipse.org/legal/epl-v10.html
8  */
9
10 package org.opendaylight.controller.sal.utils;
11
12 import org.opendaylight.controller.sal.core.ConstructionException;
13 import org.opendaylight.controller.sal.core.Node;
14 import org.opendaylight.controller.sal.core.Node.NodeIDType;
15
16 /**
17  * Utility class for creating a Node object
18  *
19  *
20  *
21  */
22 public abstract class NodeCreator {
23     public static Node createOFNode(Long switchId) {
24         try {
25             return new Node(NodeIDType.OPENFLOW, switchId);
26         } catch (ConstructionException e1) {
27             e1.printStackTrace();
28             return null;
29         }
30     }
31 }