Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014 Open Networking Laboratory |
| 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 | */ |
| 28 | public enum Type { |
Praseed Balakrishnan | a22eadf | 2014-10-20 14:21:45 -0700 | [diff] [blame] | 29 | SWITCH, ROUTER, ROADM, FIREWALL, BALANCER, IPS, IDS, CONTROLLER, OTHER |
tom | 18567e9 | 2014-08-26 01:39:47 -0700 | [diff] [blame] | 30 | } |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 31 | |
tom | 18567e9 | 2014-08-26 01:39:47 -0700 | [diff] [blame] | 32 | /** |
| 33 | * Returns the device identifier. |
| 34 | * |
| 35 | * @return device id |
| 36 | */ |
| 37 | DeviceId id(); |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 38 | |
tom | 18567e9 | 2014-08-26 01:39:47 -0700 | [diff] [blame] | 39 | /** |
| 40 | * Returns the type of the infrastructure device. |
| 41 | * |
| 42 | * @return type of the device |
| 43 | */ |
| 44 | Type type(); |
| 45 | |
| 46 | /** |
| 47 | * Returns the device manufacturer name. |
| 48 | * |
| 49 | * @return manufacturer name |
| 50 | */ |
| 51 | String manufacturer(); |
| 52 | |
| 53 | /** |
| 54 | * Returns the device hardware version. |
| 55 | * |
| 56 | * @return hardware version |
| 57 | */ |
| 58 | String hwVersion(); |
| 59 | |
| 60 | /** |
| 61 | * Returns the device software version. |
| 62 | * |
| 63 | * @return software version |
| 64 | */ |
| 65 | String swVersion(); |
| 66 | |
| 67 | /** |
| 68 | * Returns the device serial number. |
| 69 | * |
| 70 | * @return serial number |
| 71 | */ |
| 72 | String serialNumber(); |
| 73 | |
alshabib | 7911a05 | 2014-10-16 17:49:37 -0700 | [diff] [blame] | 74 | /** |
| 75 | * Returns the device chassis id. |
| 76 | * |
| 77 | * @return chassis id |
| 78 | */ |
| 79 | ChassisId chassisId(); |
| 80 | |
tom | 18567e9 | 2014-08-26 01:39:47 -0700 | [diff] [blame] | 81 | // Device realizedBy(); ? |
| 82 | |
| 83 | // ports are not provided directly, but rather via DeviceService.getPorts(Device device); |
| 84 | |
| 85 | // Set<Behavior> behaviours(); // set of supported behaviours |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 86 | |
| 87 | } |