gyewan.an | 91d7e7e | 2019-01-17 15:12:48 +0900 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright 2018-present Open Networking Foundation |
| 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.netconf; |
| 18 | |
| 19 | import org.onosproject.net.DeviceId; |
| 20 | |
| 21 | import java.util.List; |
| 22 | |
| 23 | /** |
| 24 | * Interface representing a NETCONF proxy message. |
| 25 | */ |
| 26 | public interface NetconfProxyMessage { |
| 27 | |
| 28 | enum SubjectType { |
| 29 | RPC, |
| 30 | // FIXME in the final form there should only be (async) RPC |
| 31 | // and REQUEST, REQUEST_SYNC should go away |
| 32 | // once NetconfSession methods got cleaned up. |
| 33 | REQUEST, |
| 34 | REQUEST_SYNC, |
| 35 | START_SUBSCRIPTION, |
| 36 | END_SUBSCRIPTION, |
| 37 | GET_SESSION_ID, |
| 38 | GET_DEVICE_CAPABILITIES_SET, |
| 39 | SET_ONOS_CAPABILITIES |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * Returns the subject of the message. |
| 44 | * |
| 45 | * @return subject in enum subject type |
| 46 | */ |
| 47 | NetconfProxyMessage.SubjectType subjectType(); |
| 48 | |
| 49 | /** |
| 50 | * Returns the device id of the device to which the message is intended. |
| 51 | * @return device id |
| 52 | */ |
| 53 | DeviceId deviceId(); |
| 54 | |
| 55 | /** |
| 56 | * Returns the arguments of the intended method call in order. |
| 57 | * @return arguments |
| 58 | */ |
| 59 | List<String> arguments(); |
| 60 | } |