2 * Copyright (c) 2015 Red Hat, 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.ovsdb.utils.mdsal.node;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeBuilder;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
16 public class NodeUtils {
18 public static String getId (String identifier) {
19 String id = identifier;
21 String[] pair = identifier.split("\\|");
22 if ((pair.length > 1) && (pair[0].equals("OVS"))) {
28 public static Node getOpenFlowNode (String identifier) {
29 NodeId nodeId = new NodeId(identifier);
30 NodeKey nodeKey = new NodeKey(nodeId);
32 return new NodeBuilder()