Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2014-present Open Networking Laboratory |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [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 | */ |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 16 | package org.onosproject.net; |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 17 | |
alshabib | 7911a05 | 2014-10-16 17:49:37 -0700 | [diff] [blame] | 18 | import org.onlab.packet.ChassisId; |
| 19 | |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 20 | /** |
tom | 18567e9 | 2014-08-26 01:39:47 -0700 | [diff] [blame] | 21 | * Representation of a network infrastructure device. |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 22 | */ |
tom | b36046e | 2014-08-27 00:22:24 -0700 | [diff] [blame] | 23 | public interface Device extends Element { |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 24 | |
tom | 18567e9 | 2014-08-26 01:39:47 -0700 | [diff] [blame] | 25 | /** |
| 26 | * Coarse classification of the type of the infrastructure device. |
| 27 | */ |
Sho SHIMIZU | e2952e4 | 2015-09-11 17:11:21 -0700 | [diff] [blame] | 28 | enum Type { |
chengfan | 5dc1e07 | 2015-08-21 15:01:49 -0500 | [diff] [blame] | 29 | SWITCH, ROUTER, ROADM, OTN, ROADM_OTN, FIREWALL, BALANCER, IPS, IDS, CONTROLLER, |
jingjing zhang | 8056acd | 2016-01-21 15:30:36 -0600 | [diff] [blame] | 30 | VIRTUAL, FIBER_SWITCH, MICROWAVE, OLT, ONU, OTHER |
tom | 18567e9 | 2014-08-26 01:39:47 -0700 | [diff] [blame] | 31 | } |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 32 | |
tom | 18567e9 | 2014-08-26 01:39:47 -0700 | [diff] [blame] | 33 | /** |
| 34 | * Returns the device identifier. |
| 35 | * |
| 36 | * @return device id |
| 37 | */ |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 38 | @Override |
tom | 18567e9 | 2014-08-26 01:39:47 -0700 | [diff] [blame] | 39 | DeviceId id(); |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 40 | |
tom | 18567e9 | 2014-08-26 01:39:47 -0700 | [diff] [blame] | 41 | /** |
| 42 | * Returns the type of the infrastructure device. |
| 43 | * |
| 44 | * @return type of the device |
| 45 | */ |
| 46 | Type type(); |
| 47 | |
| 48 | /** |
| 49 | * Returns the device manufacturer name. |
| 50 | * |
| 51 | * @return manufacturer name |
| 52 | */ |
| 53 | String manufacturer(); |
| 54 | |
| 55 | /** |
| 56 | * Returns the device hardware version. |
| 57 | * |
| 58 | * @return hardware version |
| 59 | */ |
| 60 | String hwVersion(); |
| 61 | |
| 62 | /** |
| 63 | * Returns the device software version. |
| 64 | * |
| 65 | * @return software version |
| 66 | */ |
| 67 | String swVersion(); |
| 68 | |
| 69 | /** |
| 70 | * Returns the device serial number. |
| 71 | * |
| 72 | * @return serial number |
| 73 | */ |
| 74 | String serialNumber(); |
| 75 | |
alshabib | 7911a05 | 2014-10-16 17:49:37 -0700 | [diff] [blame] | 76 | /** |
| 77 | * Returns the device chassis id. |
| 78 | * |
| 79 | * @return chassis id |
| 80 | */ |
| 81 | ChassisId chassisId(); |
| 82 | |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 83 | } |