示例#1
0
  /**
   * TODO
   *
   * @param attributeValue TODO
   * @param requiredAttributeValue TODO
   * @param attributeMatchPattern TODO
   * @return TODO
   */
  private boolean checkAttributeRangeValueSatisfied(
      Long attributeValue,
      RangeValue requiredAttributeValue,
      PhysicalResourceRequirement.AttributeMatchPattern attributeMatchPattern)
      throws VNMappingException {
    switch (attributeMatchPattern) {
      case Between:
        return attributeValue > requiredAttributeValue.getMin()
            && attributeValue < requiredAttributeValue.getMax();

      default:
        throw new VNMappingException(
            "Unsupported attribute match pattern "
                + attributeMatchPattern
                + " for the attribute range value.");
        //                break;
    }

    //        return false;
  }
示例#2
0
  /**
   * TODO
   *
   * @param attributeValue TODO
   * @param requiredAttributeValue TODO
   * @param attributeMatchPattern TODO
   * @return TODO
   */
  private boolean checkAttributeRangeValueSatisfied(
      Long attributeValue,
      RangeValue requiredAttributeValue,
      org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network
              .rev151010.virtual.node.instance.PhysicalResourceRequirement.AttributeMatchPattern
          attributeMatchPattern)
      throws VNMappingException {
    switch (attributeMatchPattern) {
      case Between:
        return attributeValue > requiredAttributeValue.getMin()
            && attributeValue < requiredAttributeValue.getMax();

      default:
        throw new VNMappingException(
            "Unsupported attribute match pattern "
                + attributeMatchPattern
                + " for the attribute range value.");
        //                break;
    }

    //        return false;
  }