Uploaded image for project: 'ONOS'
  1. ONOS
  2. ONOS-4597

Error is not mentioned when value exceeds limit for min and max-element.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.6.0
    • Component/s: None
    • Labels:
      None
    • Story Points:
      9

      Description

      Hi,

      Pls check this issue and confirm,

      Defect : Error is not mentioned when value exceeds limit for min and max-element.

      P.S : Error is mentioned when value is negative.

      Yang :
      module moduletest {
      yang-version 1;
      namespace "onos-yang-10:level1:newlevel";
      prefix test;

      organization "huawei";
      contact "adarsh.m@huawei.com";
      description "Containers and list scenario";

      revision 2015-02-05;
      container INTERFACES {
      list INTERFACE {

      config false;
      min-elements 7777777777777777;
      leaf name

      { type string; }


      leaf speed { type string; }

      }

      }
      }
      }

      No Error for exceeding :
      oot1@root1-HP-EliteBook-840-G2:/opt/onos-master/onos/utils/test$ mvn clean install
      [INFO] Scanning for projects...
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building onlab-test 1.6.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ onlab-test —
      [INFO] Deleting /opt/onos-master/onos/utils/test/target
      [INFO]
      [INFO] — jacoco-maven-plugin:0.7.5.201505241946:prepare-agent (default-prepare-agent) @ onlab-test —
      [INFO] argLine set to -javaagent:/home/root1/.m2/repository/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946-runtime.jar=destfile=/opt/onos-master/onos/utils/test/target/jacoco.exec -Duser.language=en -Duser.region=US
      [INFO]
      [INFO] — yangutils-maven-plugin:1.0.0-SNAPSHOT:yang2java (default) @ onlab-test —
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 1.793 s
      [INFO] Finished at: 2016-05-17T12:49:37+05:30
      [INFO] Final Memory: 19M/312M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.onosproject:yangutils-maven-plugin:1.0.0-SNAPSHOT:yang2java (default) on project onlab-test: Execution default of goal org.onosproject:yangutils-maven-plugin:1.0.0-SNAPSHOT:yang2java failed. NullPointerException -> [Help 1]
      [ERROR]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR]
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

      Error when value is negative:

      root1@root1-HP-EliteBook-840-G2:/opt/onos-master/onos/utils/test$ mvn clean install
      [INFO] Scanning for projects...
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building onlab-test 1.6.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ onlab-test —
      [INFO]
      [INFO] — jacoco-maven-plugin:0.7.5.201505241946:prepare-agent (default-prepare-agent) @ onlab-test —
      [INFO] argLine set to -javaagent:/home/root1/.m2/repository/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946-runtime.jar=destfile=/opt/onos-master/onos/utils/test/target/jacoco.exec -Duser.language=en -Duser.region=US
      [INFO]
      [INFO] — yangutils-maven-plugin:1.0.0-SNAPSHOT:yang2java (default) @ onlab-test —
      [INFO] Error in file: /opt/YangTest/YangFiles/Onos_Yang_10.yang at line: 16 at position: 0
      YANG file error : min-elements value -1 is not valid.
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 1.851 s
      [INFO] Finished at: 2016-05-17T12:51:22+05:30
      [INFO] Final Memory: 19M/313M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.onosproject:yangutils-maven-plugin:1.0.0-SNAPSHOT:yang2java (default) on project onlab-test: Execution default of goal org.onosproject:yangutils-maven-plugin:1.0.0-SNAPSHOT:yang2java failed. NullPointerException -> [Help 1]
      [ERROR]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR]
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
      root1@root1-HP-EliteBook-840-G2:/opt/onos-master/onos/utils/test$

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              Vidyashree-Huawei Vidyashree Rama
              Reporter:
              huawei-adarsh Adarsh m
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: