blob: b26e1f391abd118ee4c16ef6522eaa7ff18e1e37 [file] [log] [blame]
Jonathan Hart2b5ceec2017-12-04 13:57:19 -08001/*
2 * Copyright 2016-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.opencord.cordconfig;
18
19import org.onosproject.event.ListenerService;
20import org.onosproject.net.DeviceId;
21import org.opencord.cordconfig.access.AccessAgentData;
22import org.opencord.cordconfig.access.AccessDeviceData;
23
24import java.util.Optional;
25import java.util.Set;
26
27/**
28 * Provides access to the common CORD configuration.
29 */
30public interface CordConfigService
31 extends ListenerService<CordConfigEvent, CordConfigListener> {
32
33 /**
34 * Retrieves the set of all access devices in the system.
35 *
36 * @return set of access devices
37 */
38 Set<AccessDeviceData> getAccessDevices();
39
40 /**
41 * Retrieves the access device with the given device ID.
42 *
43 * @param deviceId device ID
44 * @return access device
45 */
46 Optional<AccessDeviceData> getAccessDevice(DeviceId deviceId);
47
48 /**
49 * Retrieves the set of all access agents in the system.
50 *
51 * @return set of access agents
52 */
53 Set<AccessAgentData> getAccessAgents();
54
55 /**
56 * Retrieves the access agent for the given device ID.
57 *
58 * @param deviceId device ID
59 * @return access agent
60 */
61 Optional<AccessAgentData> getAccessAgent(DeviceId deviceId);
62}