blob: 2da1679fe45bd70f6f6e355d3c3bc47facdd09f7 [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
Jian Lia5a312b2016-01-15 17:59:12 -080018import com.fasterxml.jackson.databind.JsonNode;
weibit38c42ed2014-10-09 19:03:54 -070019import org.onlab.util.HexString;
20
Jian Lia5a312b2016-01-15 17:59:12 -080021import java.util.Map;
22
weibit38c42ed2014-10-09 19:03:54 -070023/**
24 * Public class corresponding to JSON described data model.
Sho SHIMIZUbe63b232015-06-30 10:57:58 -070025 *
26 * @deprecated in Cardinal Release
weibit38c42ed2014-10-09 19:03:54 -070027 */
Thomas Vachuska112c7032014-11-16 11:05:14 -080028@Deprecated
weibit38c42ed2014-10-09 19:03:54 -070029public class OpticalLinkDescription {
30 protected String type;
31 protected Boolean allowed;
32 protected long dpid1;
33 protected long dpid2;
34 protected String nodeDpid1;
35 protected String nodeDpid2;
36 protected Map<String, JsonNode> params;
37 protected Map<String, String> publishAttributes;
38
39 public String getType() {
40 return type;
41 }
42
43 public void setType(String type) {
44 this.type = type;
45 }
46
47 public Boolean isAllowed() {
48 return allowed;
49 }
50
51 public void setAllowed(Boolean allowed) {
52 this.allowed = allowed;
53 }
54
55 public String getNodeDpid1() {
56 return nodeDpid1;
57 }
58
59 public void setNodeDpid1(String nodeDpid1) {
60 this.nodeDpid1 = nodeDpid1;
61 this.dpid1 = HexString.toLong(nodeDpid1);
62 }
63
64 public String getNodeDpid2() {
65 return nodeDpid2;
66 }
67
68 public void setNodeDpid2(String nodeDpid2) {
69 this.nodeDpid2 = nodeDpid2;
70 this.dpid2 = HexString.toLong(nodeDpid2);
71 }
72
73 public long getDpid1() {
74 return dpid1;
75 }
76
77 public void setDpid1(long dpid1) {
78 this.dpid1 = dpid1;
79 this.nodeDpid1 = HexString.toHexString(dpid1);
80 }
81
82 public long getDpid2() {
83 return dpid2;
84 }
85
86 public void setDpid2(long dpid2) {
87 this.dpid2 = dpid2;
88 this.nodeDpid2 = HexString.toHexString(dpid2);
89 }
90
91 public Map<String, JsonNode> getParams() {
92 return params;
93 }
94
95 public void setParams(Map<String, JsonNode> params) {
96 this.params = params;
97 }
98
99 public Map<String, String> getPublishAttributes() {
100 return publishAttributes;
101 }
102
103 public void setPublishAttributes(Map<String, String> publishAttributes) {
104 this.publishAttributes = publishAttributes;
105 }
106
107}
108