blob: b69e32139ae45fc40afc7d8c95a39e567b7116b7 [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 HIGUCHI9ee86642018-05-15 15:25:00 -070035 * @param port to enable/disable
Yuta HIGUCHId0f8d892018-04-09 12:14:00 -070036 * @param enable or disable
37 * @return XML documents (List to handle configuration with multiple-roots)
38 */
39 // return type and how component get specified are likely to change in future
40 @Beta
Yuta HIGUCHI9ee86642018-05-15 15:25:00 -070041 List<CharSequence> enable(PortNumber port, boolean enable);
42
43 // defined only for the purpose of test command without device.
44 @Deprecated
45 default List<CharSequence> enable(String name, boolean enable) {
46 return Collections.emptyList();
47 }
48
Yuta HIGUCHId0f8d892018-04-09 12:14:00 -070049}