blob: 03f27989a518c68f06a9c5b2442316c109132c7a [file] [log] [blame]
Yuta HIGUCHId0f8d892018-04-09 12:14:00 -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 */
16package org.onosproject.odtn.behaviour;
17
Yuta HIGUCHI9ee86642018-05-15 15:25:00 -070018import java.util.Collections;
Yuta HIGUCHId0f8d892018-04-09 12:14:00 -070019import java.util.List;
20
Yuta HIGUCHI9ee86642018-05-15 15:25:00 -070021import org.onosproject.net.PortNumber;
Yuta HIGUCHId0f8d892018-04-09 12:14:00 -070022import org.onosproject.net.driver.HandlerBehaviour;
23
24import com.google.common.annotations.Beta;
25
26/**
27 * Behaviour for Transceiver.
28 */
29@Beta
30public interface ConfigurableTransceiver extends HandlerBehaviour {
31
32 /**
33 * Generate configuration to enable/disable transceiver.
34 *
Yuta HIGUCHI01c66eb2018-05-22 12:12:35 -070035 * @param client side port of transceiver to enable/disable
36 * @param line side port of transceiver to enable/disable
Yuta HIGUCHId0f8d892018-04-09 12:14:00 -070037 * @param enable or disable
38 * @return XML documents (List to handle configuration with multiple-roots)
39 */
40 // return type and how component get specified are likely to change in future
41 @Beta
Yuta HIGUCHI01c66eb2018-05-22 12:12:35 -070042 List<CharSequence> enable(PortNumber client, PortNumber line, boolean enable);
Yuta HIGUCHI9ee86642018-05-15 15:25:00 -070043
44 // defined only for the purpose of test command without device.
45 @Deprecated
46 default List<CharSequence> enable(String name, boolean enable) {
47 return Collections.emptyList();
48 }
49
Yuta HIGUCHId0f8d892018-04-09 12:14:00 -070050}