/*
* Copyright © 2017 Orange, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
package org.opendaylight.transportpce.stubpce;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.routing.constraints.sp.HardConstraints;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev170426.routing.constraints.sp.SoftConstraints;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Class to check coherency between hard and soft constraints.
* @author Martial Coulibaly on
* behalf of Orange
*
*/
public class CheckCoherencyHardSoft {
/** Logging. */
private static final Logger LOG = LoggerFactory.getLogger(CheckCoherencyHardSoft.class);
/** Hard Constraints. */
private HardConstraints hard;
/** Soft Constraints. */
private SoftConstraints soft;
public CheckCoherencyHardSoft(HardConstraints hard, SoftConstraints soft) {
this.hard = hard;
this.soft = soft;
}
/**
* function to check coherency between hard and soft constraints.
* @return true
if coherent
* false
else
*/
public boolean check() {
boolean result = false;
if (hard != null && soft != null) {
/**
* Check coherency with hard/soft constraints
* hard/soft include/exclude coherency
*
*/
} else {
LOG.info("HardConstraints or/and SoftConstraints is null !");
result = true;
}
return result;
}
}