2 * Copyright © 2017 Orange, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.transportpce.stubpce;
11 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.routing.constraints.sp.HardConstraints;
12 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.routing.constraints.sp.SoftConstraints;
13 import org.slf4j.Logger;
14 import org.slf4j.LoggerFactory;
17 * Class to check coherency between hard and soft constraints.
18 * @author <a href="mailto:martial.coulibaly@gfi.com">Martial Coulibaly</a> on
22 public class CheckCoherencyHardSoft {
24 private static final Logger LOG = LoggerFactory.getLogger(CheckCoherencyHardSoft.class);
25 /** Hard Constraints. */
26 private HardConstraints hard;
27 /** Soft Constraints. */
28 private SoftConstraints soft;
30 public CheckCoherencyHardSoft(HardConstraints hard, SoftConstraints soft) {
36 * function to check coherency between hard and soft constraints.
37 * @return <code> true </code> if coherent
38 * <code> false </code> else
40 public boolean check() {
41 boolean result = false;
42 if (hard != null && soft != null) {
44 * Check coherency with hard/soft constraints
45 * hard/soft include/exclude coherency
49 LOG.info("HardConstraints or/and SoftConstraints is null !");