blob: 7e289f0faed3b07433eb45f0e29c902dc7b1c10f [file] [log] [blame]
Thomas Vachuska781d18b2014-10-27 10:31:25 -07001/*
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07002 * Copyright 2014 Open Networking Laboratory
Thomas Vachuska781d18b2014-10-27 10:31:25 -07003 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07004 * 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
Thomas Vachuska781d18b2014-10-27 10:31:25 -07007 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07008 * 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.
Thomas Vachuska781d18b2014-10-27 10:31:25 -070015 */
weibit38c42ed2014-10-09 19:03:54 -070016package org.onlab.onos.optical.cfg;
17
18import java.util.Map;
19import org.codehaus.jackson.JsonNode;
20import org.onlab.util.HexString;
21
22/**
23 * Public class corresponding to JSON described data model.
24 */
Thomas Vachuska112c7032014-11-16 11:05:14 -080025@Deprecated
weibit38c42ed2014-10-09 19:03:54 -070026public class OpticalLinkDescription {
27 protected String type;
28 protected Boolean allowed;
29 protected long dpid1;
30 protected long dpid2;
31 protected String nodeDpid1;
32 protected String nodeDpid2;
33 protected Map<String, JsonNode> params;
34 protected Map<String, String> publishAttributes;
35
36 public String getType() {
37 return type;
38 }
39
40 public void setType(String type) {
41 this.type = type;
42 }
43
44 public Boolean isAllowed() {
45 return allowed;
46 }
47
48 public void setAllowed(Boolean allowed) {
49 this.allowed = allowed;
50 }
51
52 public String getNodeDpid1() {
53 return nodeDpid1;
54 }
55
56 public void setNodeDpid1(String nodeDpid1) {
57 this.nodeDpid1 = nodeDpid1;
58 this.dpid1 = HexString.toLong(nodeDpid1);
59 }
60
61 public String getNodeDpid2() {
62 return nodeDpid2;
63 }
64
65 public void setNodeDpid2(String nodeDpid2) {
66 this.nodeDpid2 = nodeDpid2;
67 this.dpid2 = HexString.toLong(nodeDpid2);
68 }
69
70 public long getDpid1() {
71 return dpid1;
72 }
73
74 public void setDpid1(long dpid1) {
75 this.dpid1 = dpid1;
76 this.nodeDpid1 = HexString.toHexString(dpid1);
77 }
78
79 public long getDpid2() {
80 return dpid2;
81 }
82
83 public void setDpid2(long dpid2) {
84 this.dpid2 = dpid2;
85 this.nodeDpid2 = HexString.toHexString(dpid2);
86 }
87
88 public Map<String, JsonNode> getParams() {
89 return params;
90 }
91
92 public void setParams(Map<String, JsonNode> params) {
93 this.params = params;
94 }
95
96 public Map<String, String> getPublishAttributes() {
97 return publishAttributes;
98 }
99
100 public void setPublishAttributes(Map<String, String> publishAttributes) {
101 this.publishAttributes = publishAttributes;
102 }
103
104}
105