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