blob: acbc486b8a6d857b4fbf7934d0999d8f8fd788bb [file] [log] [blame]
Marc De Leenheer1afa2a02015-05-13 09:18:07 -07001/*
2 * Copyright 2015 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 */
Brian O'Connor6de2e202015-05-21 14:30:41 -070016package org.onosproject.net.resource.device;
Marc De Leenheer1afa2a02015-05-13 09:18:07 -070017
18import org.onosproject.net.Port;
19import org.onosproject.net.intent.Intent;
20import org.onosproject.net.intent.IntentId;
21
22import java.util.Set;
23
24/**
25 * Service for providing device resources.
26 */
27public interface DeviceResourceService {
28 /**
29 * Request a set of ports needed to satisfy the intent.
30 *
31 * @param intent the intent
32 * @return set of ports
33 */
34 Set<Port> requestPorts(Intent intent);
35
36 /**
37 * Release ports associated with given intent ID.
38 *
39 * @param intentId intent ID
40 */
41 void releasePorts(IntentId intentId);
42}