sangyun-han | 8df84bc | 2016-10-12 17:16:33 +0900 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016-present 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 | */ |
| 16 | |
| 17 | package org.onosproject.incubator.net.virtual; |
| 18 | |
| 19 | import org.onosproject.net.device.PortDescription; |
| 20 | |
| 21 | /** |
| 22 | * Information about a virtual port. |
| 23 | */ |
| 24 | public interface VirtualPortDescription extends PortDescription { |
| 25 | |
| 26 | // TODO: Add something about a requirement of virtual port. |
| 27 | |
| 28 | /** |
| 29 | * Representation of the virtual port. |
| 30 | */ |
| 31 | enum State { |
| 32 | /** |
| 33 | * Signifies that a virtual port is currently start. |
| 34 | */ |
| 35 | START, |
| 36 | |
| 37 | /** |
| 38 | * Signifies that a virtual port is currently stop. |
| 39 | */ |
| 40 | STOP, |
| 41 | |
| 42 | /** |
| 43 | * Signifies that a virtual port is pause for a moment. |
| 44 | */ |
| 45 | PAUSE |
| 46 | } |
| 47 | |
| 48 | /** |
| 49 | * Starts the virtual port. |
| 50 | */ |
| 51 | void start(); |
| 52 | |
| 53 | /** |
| 54 | * Stops the virtual port. |
| 55 | */ |
| 56 | void stop(); |
| 57 | |
| 58 | /** |
| 59 | * Pauses the virtual port for stopping a network or device. |
| 60 | * e.g. snapshot. |
| 61 | */ |
| 62 | void pause(); |
| 63 | |
| 64 | /** |
| 65 | * Returns the virtual port state. |
| 66 | * |
| 67 | * @return state of virtual port |
| 68 | */ |
| 69 | State state(); |
| 70 | } |