blob: 66a73b22272708e00e02fb726846b270f2af796a [file] [log] [blame]
gyewan.an91d7e7e2019-01-17 15:12:48 +09001/*
gyewan.an3c99ee72019-02-18 15:53:55 +09002 * Copyright 2019-present Open Networking Foundation
gyewan.an91d7e7e2019-01-17 15:12:48 +09003 *
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
17package org.onosproject.netconf;
18
gyewan.an3c99ee72019-02-18 15:53:55 +090019import org.onosproject.cluster.NodeId;
gyewan.an91d7e7e2019-01-17 15:12:48 +090020import org.onosproject.net.DeviceId;
21
22import java.util.List;
23
24/**
25 * Interface representing a NETCONF proxy message.
26 */
27public 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.an3c99ee72019-02-18 15:53:55 +090061
62 /**
63 * Returns the node id of proxymessage sender.
64 * @return NodeId
65 */
66 NodeId senderId();
gyewan.an91d7e7e2019-01-17 15:12:48 +090067}