blob: 1673335a40eb9c010bf9979cbe24f8c7b391af9c [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 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.optical.cfg;
weibit38c42ed2014-10-09 19:03:54 -070017
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.
Sho SHIMIZUbe63b232015-06-30 10:57:58 -070024 *
25 * @deprecated in Cardinal Release
weibit38c42ed2014-10-09 19:03:54 -070026 */
Thomas Vachuska112c7032014-11-16 11:05:14 -080027@Deprecated
weibit38c42ed2014-10-09 19:03:54 -070028public class OpticalLinkDescription {
29 protected String type;
30 protected Boolean allowed;
31 protected long dpid1;
32 protected long dpid2;
33 protected String nodeDpid1;
34 protected String nodeDpid2;
35 protected Map<String, JsonNode> params;
36 protected Map<String, String> publishAttributes;
37
38 public String getType() {
39 return type;
40 }
41
42 public void setType(String type) {
43 this.type = type;
44 }
45
46 public Boolean isAllowed() {
47 return allowed;
48 }
49
50 public void setAllowed(Boolean allowed) {
51 this.allowed = allowed;
52 }
53
54 public String getNodeDpid1() {
55 return nodeDpid1;
56 }
57
58 public void setNodeDpid1(String nodeDpid1) {
59 this.nodeDpid1 = nodeDpid1;
60 this.dpid1 = HexString.toLong(nodeDpid1);
61 }
62
63 public String getNodeDpid2() {
64 return nodeDpid2;
65 }
66
67 public void setNodeDpid2(String nodeDpid2) {
68 this.nodeDpid2 = nodeDpid2;
69 this.dpid2 = HexString.toLong(nodeDpid2);
70 }
71
72 public long getDpid1() {
73 return dpid1;
74 }
75
76 public void setDpid1(long dpid1) {
77 this.dpid1 = dpid1;
78 this.nodeDpid1 = HexString.toHexString(dpid1);
79 }
80
81 public long getDpid2() {
82 return dpid2;
83 }
84
85 public void setDpid2(long dpid2) {
86 this.dpid2 = dpid2;
87 this.nodeDpid2 = HexString.toHexString(dpid2);
88 }
89
90 public Map<String, JsonNode> getParams() {
91 return params;
92 }
93
94 public void setParams(Map<String, JsonNode> params) {
95 this.params = params;
96 }
97
98 public Map<String, String> getPublishAttributes() {
99 return publishAttributes;
100 }
101
102 public void setPublishAttributes(Map<String, String> publishAttributes) {
103 this.publishAttributes = publishAttributes;
104 }
105
106}
107