blob: c2b5e47e9ee063c0540c297674ccc760482712b4 [file] [log] [blame]
Hyunsun Moon90163ba2016-10-12 13:35:14 -07001/*
2 * Copyright 2017-present Open Networking Laboratory
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.ofagent.api;
17
18import org.onosproject.incubator.net.virtual.NetworkId;
19
20import java.util.Set;
21
22/**
23 * Service for administering OF agents for a virtual network.
24 */
25public interface OFAgentService {
26
27 /**
28 * Returns the OpenFlow agent list.
29 *
30 * @return set of openflow agents
31 */
32 Set<OFAgent> agents();
33
34 /**
35 * Creates an OpenFlow agent for a given virtual network with given controllers.
36 *
37 * @param networkId id of the virtual network
38 * @param controllers list of controllers
39 */
40 void createAgent(NetworkId networkId, OFController... controllers);
41
42 /**
43 * Removes the OpenFlow agent for the given virtual network.
44 *
45 * @param networkId virtual network identifier
46 */
47 void removeAgent(NetworkId networkId);
48
49 /**
50 * Starts the agent for the given network.
51 *
52 * @param networkId virtual network identifier
53 */
54 void startAgent(NetworkId networkId);
55
56 /**
57 * Stops the agent for the given network.
58 *
59 * @param networkId virtual network identifier
60 */
61 void stopAgent(NetworkId networkId);
62
63 /**
64 * Returns if the agent of the given network is active or not.
65 *
66 * @param networkId network id
67 * @return true if the agent is active
68 */
69 boolean isActive(NetworkId networkId);
70}