cheng fan | 48e832c | 2015-05-29 01:54:47 +0800 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
cheng fan | 48e832c | 2015-05-29 01:54:47 +0800 | [diff] [blame] | 3 | * |
| 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 | */ |
| 16 | package org.onosproject.pcep.api; |
| 17 | |
| 18 | /* |
| 19 | * Represent to provider facing side of a switch |
| 20 | */ |
| 21 | public interface PcepSwitch extends PcepOperator { |
| 22 | |
chengfan | 373aac5 | 2015-08-17 15:36:44 -0500 | [diff] [blame] | 23 | enum DeviceType { |
cheng fan | 48e832c | 2015-05-29 01:54:47 +0800 | [diff] [blame] | 24 | /* optical device */ |
| 25 | ROADM, |
| 26 | |
| 27 | /* electronic device */ |
| 28 | OTN, |
| 29 | |
| 30 | /* router */ |
| 31 | ROUTER, |
| 32 | |
| 33 | /* unkown type */ |
| 34 | UNKNOW, |
| 35 | } |
| 36 | |
| 37 | /** |
| 38 | * Gets a string version of the ID for this switch. |
| 39 | * @return string version of the ID |
| 40 | */ |
chengfan | 373aac5 | 2015-08-17 15:36:44 -0500 | [diff] [blame] | 41 | String getStringId(); |
cheng fan | 48e832c | 2015-05-29 01:54:47 +0800 | [diff] [blame] | 42 | |
| 43 | /** |
| 44 | * Gets the datapathId of the switch. |
| 45 | * @return the switch dpid in long format |
| 46 | */ |
chengfan | 373aac5 | 2015-08-17 15:36:44 -0500 | [diff] [blame] | 47 | long getId(); |
cheng fan | 48e832c | 2015-05-29 01:54:47 +0800 | [diff] [blame] | 48 | |
chengfan | 373aac5 | 2015-08-17 15:36:44 -0500 | [diff] [blame] | 49 | long getNeId(); |
cheng fan | 48e832c | 2015-05-29 01:54:47 +0800 | [diff] [blame] | 50 | |
| 51 | /** |
| 52 | * Gets the sub type of the device. |
| 53 | * @return the sub type |
| 54 | */ |
chengfan | 373aac5 | 2015-08-17 15:36:44 -0500 | [diff] [blame] | 55 | DeviceType getDeviceType(); |
cheng fan | 48e832c | 2015-05-29 01:54:47 +0800 | [diff] [blame] | 56 | |
| 57 | /** |
| 58 | * fetch the manufacturer description. |
| 59 | * @return the description |
| 60 | */ |
chengfan | 373aac5 | 2015-08-17 15:36:44 -0500 | [diff] [blame] | 61 | String manufacturerDescription(); |
cheng fan | 48e832c | 2015-05-29 01:54:47 +0800 | [diff] [blame] | 62 | |
| 63 | /** |
| 64 | * fetch the datapath description. |
| 65 | * @return the description |
| 66 | */ |
chengfan | 373aac5 | 2015-08-17 15:36:44 -0500 | [diff] [blame] | 67 | String datapathDescription(); |
cheng fan | 48e832c | 2015-05-29 01:54:47 +0800 | [diff] [blame] | 68 | |
| 69 | /** |
| 70 | * fetch the hardware description. |
| 71 | * @return the description |
| 72 | */ |
chengfan | 373aac5 | 2015-08-17 15:36:44 -0500 | [diff] [blame] | 73 | String hardwareDescription(); |
cheng fan | 48e832c | 2015-05-29 01:54:47 +0800 | [diff] [blame] | 74 | |
| 75 | /** |
| 76 | * fetch the software description. |
| 77 | * @return the description |
| 78 | */ |
chengfan | 373aac5 | 2015-08-17 15:36:44 -0500 | [diff] [blame] | 79 | String softwareDescription(); |
cheng fan | 48e832c | 2015-05-29 01:54:47 +0800 | [diff] [blame] | 80 | |
| 81 | /** |
| 82 | * fetch the serial number. |
| 83 | * @return the serial |
| 84 | */ |
chengfan | 373aac5 | 2015-08-17 15:36:44 -0500 | [diff] [blame] | 85 | String serialNumber(); |
cheng fan | 48e832c | 2015-05-29 01:54:47 +0800 | [diff] [blame] | 86 | |
| 87 | /** |
| 88 | * Indicates if this switch is optical. |
| 89 | * @return true if optical |
| 90 | */ |
chengfan | 373aac5 | 2015-08-17 15:36:44 -0500 | [diff] [blame] | 91 | boolean isOptical(); |
cheng fan | 48e832c | 2015-05-29 01:54:47 +0800 | [diff] [blame] | 92 | } |