blob: 48e2ca1bd571b2d1476d0bf5eedc839b80037a07 [file] [log] [blame]
Jonathan Hart90a02c22015-02-13 11:52:07 -08001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Jonathan Hart90a02c22015-02-13 11:52:07 -08003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.net;
17
18/**
19 * Networking domain tools.
Jonathan Hart195c0372016-07-25 18:02:47 -070020 *
21 * @deprecated in Hummingbird release
Jonathan Hart90a02c22015-02-13 11:52:07 -080022 */
Jonathan Hart195c0372016-07-25 18:02:47 -070023@Deprecated
Jonathan Hart90a02c22015-02-13 11:52:07 -080024public final class NetTools {
25
26 private NetTools() {
27 }
28
29 /**
30 * Converts DPIDs of the form xx:xx:xx:xx:xx:xx:xx to OpenFlow provider
31 * device URIs. The is helpful for converting DPIDs coming from configuration
32 * or REST to URIs that the core understands.
33 *
34 * @param dpid the DPID string to convert
35 * @return the URI string for this device
Jonathan Hart195c0372016-07-25 18:02:47 -070036 * @deprecated in Hummingbird release
Jonathan Hart90a02c22015-02-13 11:52:07 -080037 */
Jonathan Hart195c0372016-07-25 18:02:47 -070038 @Deprecated
Jonathan Hart90a02c22015-02-13 11:52:07 -080039 public static String dpidToUri(String dpid) {
40 return "of:" + dpid.replace(":", "");
41 }
42}