blob: 0b5f3e4102e78452007876f8af4027758efebb85 [file] [log] [blame]
Sho SHIMIZUb1681bd2016-02-22 12:47:50 -08001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Sho SHIMIZUb1681bd2016-02-22 12:47:50 -08003 *
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.net.intent;
17
18import com.google.common.annotations.Beta;
Sho SHIMIZUe18cb122016-02-22 21:04:56 -080019import org.onosproject.net.resource.Resource;
Sho SHIMIZUb1681bd2016-02-22 12:47:50 -080020
21/**
22 * Class providing resource information to constraints.
23 * This class is subject to be removed during refactorings on Constraint.
24 */
25@Beta
26public interface ResourceContext {
27 /**
28 * Returns the availability of the specified resource.
29 *
30 * @param resource resource to check the availability
31 * @return true if available, otherwise false
32 */
33 boolean isAvailable(Resource resource);
34}