Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 1 | /* |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 2 | * Copyright 2014 Open Networking Laboratory |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 3 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 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 |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 7 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 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. |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 15 | */ |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 16 | package org.onosproject.optical.cfg; |
weibit | 38c42ed | 2014-10-09 19:03:54 -0700 | [diff] [blame] | 17 | |
Jian Li | a5a312b | 2016-01-15 17:59:12 -0800 | [diff] [blame^] | 18 | import com.fasterxml.jackson.databind.JsonNode; |
weibit | 38c42ed | 2014-10-09 19:03:54 -0700 | [diff] [blame] | 19 | import org.onlab.util.HexString; |
| 20 | |
Jian Li | a5a312b | 2016-01-15 17:59:12 -0800 | [diff] [blame^] | 21 | import java.util.Map; |
| 22 | |
weibit | 38c42ed | 2014-10-09 19:03:54 -0700 | [diff] [blame] | 23 | /** |
| 24 | * Public class corresponding to JSON described data model. |
Sho SHIMIZU | be63b23 | 2015-06-30 10:57:58 -0700 | [diff] [blame] | 25 | * |
| 26 | * @deprecated in Cardinal Release |
weibit | 38c42ed | 2014-10-09 19:03:54 -0700 | [diff] [blame] | 27 | */ |
Thomas Vachuska | 112c703 | 2014-11-16 11:05:14 -0800 | [diff] [blame] | 28 | @Deprecated |
weibit | 38c42ed | 2014-10-09 19:03:54 -0700 | [diff] [blame] | 29 | public 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 | |