blob: bb30a5a69d7edc8af05d68ebade8c8ed1312ab2a [file] [log] [blame]
Yuta HIGUCHIe37560f2017-02-02 19:53:26 -08001/*
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.net.intent.constraint;
17
18import org.onosproject.net.Link;
19import org.onosproject.net.intent.Constraint;
20import org.onosproject.net.intent.ResourceContext;
21
22/**
23 * Abstract Constraint for constraints intended to influence
24 * only path viability and not influence individual link cost
25 * during path computation.
26 */
27public abstract class PathViabilityConstraint implements Constraint {
28
29 @Override
30 public final double cost(Link link, ResourceContext context) {
31 // random value, should never be used.
32 return 1.0;
33 }
34
35}