blob: 46179edd6040c2dc4f8430d249dab785211a8842 [file] [log] [blame]
hirokib8ddc3f2018-06-02 08:29:42 -07001/*
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
17package org.onosproject.odtn.behaviour;
18
19import com.google.common.annotations.Beta;
20import org.onosproject.net.DeviceId;
21import org.onosproject.net.PortNumber;
22
23/**
24 * Device driver interface for ODTN Phase1.0.
25 */
26@Beta
27public interface OdtnTerminalDeviceDriver {
28
29 enum Operation {
30 CREATE("create"),
31 MERGE("merge"),
32 DELETE("delete");
33
34 private final String value;
35
36 Operation(String op) {
37 this.value = op;
38 }
39
40 public String value() {
41 return this.value;
42 }
43
44 }
45
46 /**
47 * Configure terminal device.
48 *
49 * @param did Device ID
50 * @param client side port of transceiver to enable/disable
51 * @param line side port of transceiver to enable/disable
52 * @param enable or disable
53 */
54 void apply(DeviceId did, PortNumber client, PortNumber line, boolean enable);
55}