From ac6b1c788424ca50221ce7b243e4255a8b6fe4c4 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Sun, 4 Jun 2017 17:56:03 +0200 Subject: [PATCH] Revert "Bug 4640: Change semantic-version to openconfig-version" This reverts commit e826b441fd88057793b5cea7e784522ea7adcd40. Change-Id: I823a6789a02d47d03d7c2617310221a517c16ca0 Signed-off-by: Robert Varga --- .../yangtools/yang/model/api/Module.java | 4 +- .../yang/model/api/ModuleIdentifier.java | 13 +-- .../yang/model/api/ModuleImport.java | 6 +- ...ifier.java => SemVerSourceIdentifier.java} | 58 +++++------ .../yang/model/repo/api/SourceIdentifier.java | 10 +- .../model/repo/api/StatementParserMode.java | 6 +- .../yang/model/util/ModuleIdentifierImpl.java | 8 +- .../model/util/SchemaContextProxyTest.java | 4 +- .../impl/util/YangModelDependencyInfo.java | 25 ++--- .../yang/parser/repo/DependencyResolver.java | 2 +- ...ver.java => SemVerDependencyResolver.java} | 14 +-- .../repo/SharedSchemaContextFactory.java | 8 +- .../parser/spi/meta/ModelProcessingPhase.java | 2 +- ...va => SemanticVersionModuleNamespace.java} | 4 +- ...ace.java => SemanticVersionNamespace.java} | 4 +- .../yang/parser/spi/meta/StmtContext.java | 2 +- ...=> ImpPrefixToSemVerModuleIdentifier.java} | 4 +- .../spi/source/StatementStreamSource.java | 2 +- .../stmt/reactor/BuildGlobalContext.java | 16 +-- .../reactor/CrossSourceStatementReactor.java | 2 +- .../stmt/reactor/RootStatementContext.java | 4 +- .../stmt/reactor/SourceSpecificContext.java | 4 +- .../stmt/reactor/SubstatementContext.java | 4 +- .../rfc6020/ImportStatementDefinition.java | 28 +++--- .../stmt/rfc6020/ModuleStatementSupport.java | 20 ++-- ...java => SemanticVersionStatementImpl.java} | 22 ++--- .../rfc6020/SupportedExtensionsMapping.java | 8 +- .../stmt/rfc6020/YangInferencePipeline.java | 14 +-- .../effective/AbstractEffectiveModule.java | 8 +- .../ImportEffectiveStatementImpl.java | 14 +-- .../rfc6020/effective/ModuleImportImpl.java | 8 +- ...emanticVersionEffectiveStatementImpl.java} | 6 +- .../ImportStatementRfc7950Support.java | 2 +- .../ModuleStatementRfc7950Support.java | 2 +- .../yang/parser/util/ASTSchemaSource.java | 30 +++--- ... => SemVerSharedSchemaRepositoryTest.java} | 20 ++-- .../SemanticVersionBorderCaseTest.java} | 58 +++++------ .../SemanticVersionComplexTest.java} | 40 ++++---- .../SemanticVersionDefaultsTest.java} | 26 ++--- .../SemanticVersionIgnoringRevisionTest.java} | 28 +++--- .../SemanticVersionImportTest.java} | 44 ++++----- .../SemanticVersionMultipleImportTest.java} | 40 ++++---- .../SemanticVersionPositionTest.java} | 40 ++++---- .../SemanticVersionTest.java} | 82 ++++++++-------- .../yin/YinSemanticVersionTest.java} | 32 +++--- .../basic-2/openconfig-extensions.yang | 84 ---------------- .../openconfig-version/basic-3/foo.yang | 15 --- .../basic-import-1/foo.yang | 16 --- .../basic-import-invalid-1/foo.yang | 16 --- .../basic-import-invalid-2/foo.yang | 16 --- .../openconfig-extensions.yang | 84 ---------------- .../openconfig-version/basic/foo.yang | 16 --- .../basic/openconfig-extensions.yang | 84 ---------------- .../border-case-invalid-major/foo.yang | 16 --- .../openconfig-extensions.yang | 84 ---------------- .../border-case-invalid-minor/foo.yang | 16 --- .../openconfig-extensions.yang | 84 ---------------- .../bar@2016-01-01.yang | 15 --- .../border-case-invalid-patch/foo.yang | 16 --- .../openconfig-extensions.yang | 84 ---------------- .../bar@2016-01-01.yang | 15 --- .../border-case-valid-major/foo.yang | 16 --- .../openconfig-extensions.yang | 84 ---------------- .../bar@2016-01-01.yang | 15 --- .../bar@2016-01-02.yang | 15 --- .../bar@2016-01-03.yang | 15 --- .../border-case-valid-minor/foo.yang | 16 --- .../openconfig-extensions.yang | 84 ---------------- .../bar@2016-01-01.yang | 15 --- .../bar@2016-01-02.yang | 15 --- .../bar@2016-01-03.yang | 15 --- .../border-case-valid-patch/foo.yang | 16 --- .../openconfig-extensions.yang | 84 ---------------- .../complex/complex-1/foo.yang | 13 --- .../complex-1/openconfig-extensions.yang | 84 ---------------- .../complex/complex-2/foo.yang | 13 --- .../complex-2/openconfig-extensions.yang | 84 ---------------- .../openconfig-extensions.yang | 84 ---------------- .../defaults/default-major-valid/bar.yang | 15 --- .../openconfig-extensions.yang | 84 ---------------- .../ignoring-revision-2/bar@2016-01-01.yang | 15 --- .../ignoring-revision-2/foo.yang | 16 --- .../openconfig-extensions.yang | 84 ---------------- .../ignoring-revision/bar@2016-01-01.yang | 15 --- .../ignoring-revision/foo.yang | 16 --- .../openconfig-extensions.yang | 84 ---------------- .../openconfig-extensions.yang | 84 ---------------- .../openconfig-extensions.yang | 84 ---------------- .../openconfig-extensions.yang | 84 ---------------- .../openconfig-extensions.yang | 84 ---------------- .../import/import-valid/foo.yang | 14 --- .../import-valid/openconfig-extensions.yang | 84 ---------------- .../multiple-modules/bar@2016-01-01.yang | 15 --- .../multiple-modules/bar@2016-01-02.yang | 15 --- .../multiple-modules/bar@2016-01-03.yang | 15 --- .../multiple-modules/bar@2016-01-31.yang | 15 --- .../multiple-modules/foo.yang | 16 --- .../openconfig-extensions.yang | 84 ---------------- .../bar@2016-01-01.yang | 15 --- .../bar@2016-01-02.yang | 15 --- .../multiple-invalid-deprecated/foo.yang | 16 --- .../openconfig-extensions.yang | 84 ---------------- .../bar@2016-01-01.yang | 15 --- .../bar@2016-01-02.yang | 15 --- .../multiple-invalid-nosufficient/foo.yang | 16 --- .../openconfig-extensions.yang | 84 ---------------- .../bar@2016-01-01.yang | 15 --- .../bar@2016-01-02.yang | 15 --- .../openconfig-extensions.yang | 84 ---------------- .../bar@2016-01-01.yang | 15 --- .../bar@2016-01-02.yang | 15 --- .../multiple-valid-specified/foo.yang | 16 --- .../openconfig-extensions.yang | 84 ---------------- .../openconfig-version/node-test/foo.yang | 18 ---- .../node-test/openconfig-extensions.yang | 84 ---------------- .../bar@2016-01-01.yang | 15 --- .../foo.yang | 16 --- .../openconfig-extensions.yang | 84 ---------------- .../position/position-head/foo.yang | 17 ---- .../position/position-middle/bar.yang | 15 --- .../position/position-middle/foo.yang | 16 --- .../openconfig-extensions.yang | 84 ---------------- .../position/position-tail/foo.yang | 17 ---- .../position-tail/openconfig-extensions.yang | 84 ---------------- .../bar@2016-01-01.yang | 15 --- .../shared-schema-repository/foo.yang | 16 --- .../openconfig-extensions.yang | 84 ---------------- .../openconfig-extensions@2017-01-29.yin | 97 ------------------- .../openconfig-extensions@2016-01-29.yin | 97 ------------------- .../yin-input/basic/bar@2016-01-31.yin | 25 ----- .../openconfig-extensions@2017-01-29.yin | 97 ------------------- .../openconfig-version/complex-1/foo.yang | 13 --- .../complex-1/openconfig-extensions.yang | 84 ---------------- .../openconfig-version/complex-2/foo.yang | 13 --- .../complex-2/openconfig-extensions.yang | 84 ---------------- .../complex-1/bar@2016-01-03.yang | 6 +- .../complex-1/bar@2016-01-04.yang | 6 +- .../semantic-version/complex-1/foo.yang | 13 +++ .../complex-1/foobar@2016-01-31.yang | 4 +- .../complex-1/foobar@2016-02-28.yang | 4 +- .../complex-1/semantic-version.yang} | 57 ++--------- .../complex-2/bar@2016-01-03.yang | 6 +- .../complex-2/bar@2016-01-04.yang | 6 +- .../semantic-version/complex-2/foo.yang | 13 +++ .../complex-2/foobar@2016-01-31.yang | 4 +- .../complex-2/foobar@2016-02-27.yang | 4 +- .../complex-2/foobar@2016-02-28.yang | 4 +- .../complex-2/semantic-version.yang} | 57 ++--------- .../basic-2/bar.yang | 4 +- .../basic-2/foo.yang | 4 +- .../basic-2/semantic-version.yang | 47 +++++++++ .../semantic-version/basic-3/foo.yang | 15 +++ .../basic-3/semantic-version.yang | 47 +++++++++ .../basic-import-1}/bar@2016-01-01.yang | 4 +- .../basic-import-1/bar@2016-01-31.yang | 4 +- .../semantic-version/basic-import-1/foo.yang | 16 +++ .../basic-import-1/semantic-version.yang | 47 +++++++++ .../bar@2016-01-01.yang | 4 +- .../bar@2016-01-31.yang | 4 +- .../basic-import-invalid-1/foo.yang | 16 +++ .../semantic-version.yang | 47 +++++++++ .../basic-import-invalid-2}/bar.yang | 4 +- .../basic-import-invalid-2/foo.yang | 16 +++ .../semantic-version.yang | 47 +++++++++ .../basic}/bar.yang | 4 +- .../resources/semantic-version/basic/foo.yang | 16 +++ .../basic/semantic-version.yang | 47 +++++++++ .../bar@2016-01-01.yang | 4 +- .../bar@2016-01-02.yang | 4 +- .../bar@2016-01-03.yang | 4 +- .../border-case-invalid-major/foo.yang | 16 +++ .../semantic-version.yang | 47 +++++++++ .../bar@2016-01-01.yang | 4 +- .../bar@2016-01-02.yang | 4 +- .../bar@2016-01-03.yang | 4 +- .../border-case-invalid-minor/foo.yang | 16 +++ .../semantic-version.yang | 47 +++++++++ .../bar@2016-01-01.yang | 15 +++ .../bar@2016-01-02.yang | 4 +- .../bar@2016-01-03.yang | 4 +- .../border-case-invalid-patch/foo.yang | 16 +++ .../semantic-version.yang | 47 +++++++++ .../bar@2016-01-01.yang | 15 +++ .../bar@2016-01-02.yang | 4 +- .../bar@2016-01-03.yang | 4 +- .../border-case-valid-major/foo.yang | 16 +++ .../semantic-version.yang | 47 +++++++++ .../bar@2016-01-01.yang | 15 +++ .../bar@2016-01-02.yang | 15 +++ .../bar@2016-01-03.yang | 15 +++ .../border-case-valid-minor/foo.yang | 16 +++ .../semantic-version.yang | 47 +++++++++ .../bar@2016-01-01.yang | 15 +++ .../bar@2016-01-02.yang | 15 +++ .../bar@2016-01-03.yang | 15 +++ .../border-case-valid-patch/foo.yang | 16 +++ .../semantic-version.yang | 47 +++++++++ .../complex/complex-1/bar@2016-01-03.yang | 6 +- .../complex/complex-1/bar@2016-01-04.yang | 6 +- .../complex/complex-1/foo.yang | 13 +++ .../complex/complex-1/foobar@2016-01-31.yang | 4 +- .../complex/complex-1/foobar@2016-02-28.yang | 4 +- .../complex/complex-1/semantic-version.yang | 47 +++++++++ .../complex/complex-2/bar@2016-01-03.yang | 6 +- .../complex/complex-2/bar@2016-01-04.yang | 6 +- .../complex/complex-2/foo.yang | 13 +++ .../complex/complex-2/foobar@2016-01-31.yang | 4 +- .../complex/complex-2/foobar@2016-02-27.yang | 4 +- .../complex}/complex-2/foobar@2016-02-28.yang | 4 +- .../complex/complex-2/semantic-version.yang | 47 +++++++++ .../defaults/default-major-invalid}/bar.yang | 4 +- .../defaults/default-major-invalid/foo.yang | 2 +- .../semantic-version.yang | 47 +++++++++ .../defaults/default-major-valid/bar.yang | 15 +++ .../defaults/default-major-valid/foo.yang | 2 +- .../default-major-valid/semantic-version.yang | 47 +++++++++ .../defaults/defaults/bar.yang | 0 .../defaults/defaults/foo.yang | 0 .../ignoring-revision-2/bar@2016-01-01.yang | 15 +++ .../ignoring-revision-2/bar@2016-01-31.yang | 4 +- .../ignoring-revision-2/foo.yang | 16 +++ .../ignoring-revision-2/semantic-version.yang | 47 +++++++++ .../ignoring-revision/bar@2016-01-01.yang | 15 +++ .../ignoring-revision/foo.yang | 16 +++ .../ignoring-revision/semantic-version.yang | 47 +++++++++ .../import-invalid-deprecated-1}/foo.yang | 2 +- .../semantic-version.yang | 47 +++++++++ .../import-invalid-deprecated-2}/foo.yang | 2 +- .../semantic-version.yang | 47 +++++++++ .../import-invalid-notsufficient-1}/foo.yang | 2 +- .../semantic-version.yang | 47 +++++++++ .../import-invalid-notsufficient-2}/foo.yang | 2 +- .../semantic-version.yang | 47 +++++++++ .../import/import-valid/foo.yang | 14 +++ .../import/import-valid/semantic-version.yang | 47 +++++++++ .../multiple-modules/bar@2016-01-01.yang | 15 +++ .../multiple-modules/bar@2016-01-02.yang | 15 +++ .../multiple-modules/bar@2016-01-03.yang | 15 +++ .../multiple-modules/bar@2016-01-04.yang | 4 +- .../multiple-modules/bar@2016-01-31.yang | 15 +++ .../multiple-modules/bar@2016-02-28.yang | 4 +- .../multiple-modules/foo.yang | 16 +++ .../multiple-modules/semantic-version.yang | 47 +++++++++ .../bar@2016-01-01.yang | 15 +++ .../bar@2016-01-02.yang | 15 +++ .../bar@2016-02-01.yang | 4 +- .../bar@2016-02-02.yang | 4 +- .../multiple-invalid-deprecated/foo.yang | 16 +++ .../semantic-version.yang | 47 +++++++++ .../bar@2016-01-01.yang | 15 +++ .../bar@2016-01-02.yang | 15 +++ .../bar@2016-02-01.yang | 4 +- .../bar@2016-02-02.yang | 4 +- .../multiple-invalid-nosufficient/foo.yang | 16 +++ .../semantic-version.yang | 47 +++++++++ .../bar@2016-01-01.yang | 15 +++ .../bar@2016-01-02.yang | 15 +++ .../bar@2016-02-01.yang | 4 +- .../bar@2016-02-02.yang | 4 +- .../multiple/multiple-valid-defaults/foo.yang | 4 +- .../semantic-version.yang | 47 +++++++++ .../bar@2016-01-01.yang | 15 +++ .../bar@2016-01-02.yang | 15 +++ .../bar@2016-02-01.yang | 4 +- .../bar@2016-02-02.yang | 4 +- .../multiple-valid-specified/foo.yang | 16 +++ .../semantic-version.yang | 47 +++++++++ .../node-test/bar@20160404.yang | 4 +- .../node-test/bar@20160405.yang | 4 +- .../node-test/bar@20160406.yang | 4 +- .../node-test/bar@20170406.yang | 4 +- .../semantic-version/node-test/foo.yang | 18 ++++ .../node-test/semantic-version.yang | 47 +++++++++ .../position/position-head/bar.yang | 4 +- .../position/position-head/foo.yang | 17 ++++ .../position-head/semantic-version.yang} | 55 ++--------- .../position/position-middle/bar.yang | 15 +++ .../position/position-middle/foo.yang | 16 +++ .../position-middle/semantic-version.yang | 47 +++++++++ .../position/position-tail/bar.yang | 4 +- .../position/position-tail/foo.yang | 17 ++++ .../position-tail/semantic-version.yang} | 56 ++--------- .../bar@2016-01-01.yang | 15 +++ .../semver-shared-schema-repository/foo.yang | 16 +++ .../semantic-version.yang | 47 +++++++++ .../bar@2016-01-01.yang | 15 +++ .../shared-schema-repository/foo.yang | 16 +++ .../semantic-version.yang | 47 +++++++++ .../basic-import-invalid/bar@2016-01-01.yin | 10 +- .../basic-import-invalid/bar@2016-01-31.yin | 10 +- .../basic-import-invalid}/foo@2016-02-01.yin | 12 +-- .../semantic-version@2016-02-02.yin | 54 +++++++++++ .../yin-input/basic-import/bar@2016-01-01.yin | 10 +- .../yin-input/basic-import/bar@2016-01-31.yin | 10 +- .../basic-import}/foo@2016-02-01.yin | 12 +-- .../semantic-version@2016-02-02.yin | 54 +++++++++++ .../yin-input/basic/bar@2016-01-31.yin | 25 +++++ .../yin-input/basic/foo@2016-02-01.yin | 14 +-- .../basic/semantic-version@2016-02-02.yin | 54 +++++++++++ 299 files changed, 3111 insertions(+), 4567 deletions(-) rename yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/{OpenconfigVerSourceIdentifier.java => SemVerSourceIdentifier.java} (59%) rename yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/{OpenconfigVerDependencyResolver.java => SemVerDependencyResolver.java} (71%) rename yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/{OpenconfigVersionModuleNamespace.java => SemanticVersionModuleNamespace.java} (75%) rename yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/{OpenconfigVersionNamespace.java => SemanticVersionNamespace.java} (76%) rename yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/{ImpPrefixToOpenconfigVerModuleIdentifier.java => ImpPrefixToSemVerModuleIdentifier.java} (81%) rename yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/{OpenconfigVersionStatementImpl.java => SemanticVersionStatementImpl.java} (76%) rename yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/{OpenconfigVersionEffectiveStatementImpl.java => SemanticVersionEffectiveStatementImpl.java} (90%) rename yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/repo/{OpenconfigVerSharedSchemaRepositoryTest.java => SemVerSharedSchemaRepositoryTest.java} (86%) rename yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/{openconfigver/OpenconfigVersionBorderCaseTest.java => semver/SemanticVersionBorderCaseTest.java} (57%) rename yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/{openconfigver/OpenconfigVersionComplexTest.java => semver/SemanticVersionComplexTest.java} (79%) rename yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/{openconfigver/OpenconfigVersionDefaultsTest.java => semver/SemanticVersionDefaultsTest.java} (69%) rename yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/{openconfigver/OpenconfigVersionIgnoringRevisionTest.java => semver/SemanticVersionIgnoringRevisionTest.java} (60%) rename yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/{openconfigver/OpenconfigVersionImportTest.java => semver/SemanticVersionImportTest.java} (57%) rename yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/{openconfigver/OpenconfigVersionMultipleImportTest.java => semver/SemanticVersionMultipleImportTest.java} (66%) rename yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/{openconfigver/OpenconfigVersionPositionTest.java => semver/SemanticVersionPositionTest.java} (56%) rename yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/{openconfigver/OpenconfigVersionTest.java => semver/SemanticVersionTest.java} (63%) rename yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/{openconfigver/yin/YinOpenconfigVersionTest.java => semver/yin/YinSemanticVersionTest.java} (66%) delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/basic-2/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/basic-3/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-2/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-2/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/basic/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/basic/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-02.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-03.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-02.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-03.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-invalid/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-valid/bar.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-valid/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-1/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-2/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-1/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-2/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-valid/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-valid/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-02.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-03.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-31.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-01-02.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-01-02.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-01-02.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-01-02.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-head/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/bar.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-tail/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-tail/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/openconfig-extensions@2017-01-29.yin delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/openconfig-extensions@2016-01-29.yin delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic/bar@2016-01-31.yin delete mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic/openconfig-extensions@2017-01-29.yin delete mode 100644 yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/openconfig-extensions.yang rename yang/yang-parser-impl/src/test/resources/rfc7950/{openconfig-version => semantic-version}/complex-1/bar@2016-01-03.yang (64%) rename yang/yang-parser-impl/src/test/resources/rfc7950/{openconfig-version => semantic-version}/complex-1/bar@2016-01-04.yang (64%) create mode 100644 yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/foo.yang rename yang/yang-parser-impl/src/test/resources/rfc7950/{openconfig-version => semantic-version}/complex-1/foobar@2016-01-31.yang (74%) rename yang/yang-parser-impl/src/test/resources/rfc7950/{openconfig-version => semantic-version}/complex-1/foobar@2016-02-28.yang (74%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version/basic-import-invalid-1/openconfig-extensions.yang => rfc7950/semantic-version/complex-1/semantic-version.yang} (51%) rename yang/yang-parser-impl/src/test/resources/rfc7950/{openconfig-version => semantic-version}/complex-2/bar@2016-01-03.yang (64%) rename yang/yang-parser-impl/src/test/resources/rfc7950/{openconfig-version => semantic-version}/complex-2/bar@2016-01-04.yang (66%) create mode 100644 yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foo.yang rename yang/yang-parser-impl/src/test/resources/rfc7950/{openconfig-version => semantic-version}/complex-2/foobar@2016-01-31.yang (70%) rename yang/yang-parser-impl/src/test/resources/rfc7950/{openconfig-version => semantic-version}/complex-2/foobar@2016-02-27.yang (70%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version/complex => rfc7950/semantic-version}/complex-2/foobar@2016-02-28.yang (70%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version/basic-import-1/openconfig-extensions.yang => rfc7950/semantic-version/complex-2/semantic-version.yang} (51%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/basic-2/bar.yang (60%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/basic-2/foo.yang (66%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/basic-2/semantic-version.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/basic-3/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/basic-3/semantic-version.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version/border-case/border-case-invalid-minor => semantic-version/basic-import-1}/bar@2016-01-01.yang (53%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/basic-import-1/bar@2016-01-31.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/semantic-version.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version/border-case/border-case-invalid-major => semantic-version/basic-import-invalid-1}/bar@2016-01-01.yang (53%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/basic-import-invalid-1/bar@2016-01-31.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/semantic-version.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version/basic => semantic-version/basic-import-invalid-2}/bar.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-2/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-2/semantic-version.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version/defaults/default-major-invalid => semantic-version/basic}/bar.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/basic/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/basic/semantic-version.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version/basic-import-invalid-1 => semantic-version/border-case/border-case-invalid-major}/bar@2016-01-01.yang (53%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version/border-case/border-case-valid-major => semantic-version/border-case/border-case-invalid-major}/bar@2016-01-02.yang (53%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version/border-case/border-case-valid-major => semantic-version/border-case/border-case-invalid-major}/bar@2016-01-03.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/semantic-version.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version/basic-import-1 => semantic-version/border-case/border-case-invalid-minor}/bar@2016-01-01.yang (53%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version/border-case/border-case-invalid-major => semantic-version/border-case/border-case-invalid-minor}/bar@2016-01-02.yang (53%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version/border-case/border-case-invalid-major => semantic-version/border-case/border-case-invalid-minor}/bar@2016-01-03.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/semantic-version.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/bar@2016-01-01.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version/border-case/border-case-invalid-minor => semantic-version/border-case/border-case-invalid-patch}/bar@2016-01-02.yang (53%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version/border-case/border-case-invalid-minor => semantic-version/border-case/border-case-invalid-patch}/bar@2016-01-03.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/semantic-version.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/bar@2016-01-01.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version/border-case/border-case-invalid-patch => semantic-version/border-case/border-case-valid-major}/bar@2016-01-02.yang (53%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version/border-case/border-case-invalid-patch => semantic-version/border-case/border-case-valid-major}/bar@2016-01-03.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/semantic-version.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-01.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-02.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-03.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/semantic-version.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-01.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-02.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-03.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/semantic-version.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/complex/complex-1/bar@2016-01-03.yang (64%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/complex/complex-1/bar@2016-01-04.yang (64%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/foo.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/complex/complex-1/foobar@2016-01-31.yang (74%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/complex/complex-1/foobar@2016-02-28.yang (74%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/semantic-version.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/complex/complex-2/bar@2016-01-03.yang (64%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/complex/complex-2/bar@2016-01-04.yang (65%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foo.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/complex/complex-2/foobar@2016-01-31.yang (70%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/complex/complex-2/foobar@2016-02-27.yang (70%) rename yang/yang-parser-impl/src/test/resources/{rfc7950/openconfig-version => semantic-version/complex}/complex-2/foobar@2016-02-28.yang (70%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/semantic-version.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version/basic-import-invalid-2 => semantic-version/defaults/default-major-invalid}/bar.yang (53%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/defaults/default-major-invalid/foo.yang (67%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-invalid/semantic-version.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-valid/bar.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/defaults/default-major-valid/foo.yang (67%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-valid/semantic-version.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/defaults/defaults/bar.yang (100%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/defaults/defaults/foo.yang (100%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/bar@2016-01-01.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/ignoring-revision-2/bar@2016-01-31.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/semantic-version.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/bar@2016-01-01.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/semantic-version.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version/import/import-invalid-deprecated-2 => semantic-version/import/import-invalid-deprecated-1}/foo.yang (60%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-1/semantic-version.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version/import/import-invalid-deprecated-1 => semantic-version/import/import-invalid-deprecated-2}/foo.yang (60%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-2/semantic-version.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version/import/import-invalid-notsufficient-2 => semantic-version/import/import-invalid-notsufficient-1}/foo.yang (60%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-1/semantic-version.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version/import/import-invalid-notsufficient-1 => semantic-version/import/import-invalid-notsufficient-2}/foo.yang (60%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-2/semantic-version.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/import/import-valid/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/import/import-valid/semantic-version.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-01.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-02.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-03.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/multiple-modules/bar@2016-01-04.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-31.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/multiple-modules/bar@2016-02-28.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/semantic-version.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-01-01.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-01-02.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version/multiple/multiple-valid-specified => semantic-version/multiple/multiple-invalid-deprecated}/bar@2016-02-01.yang (53%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version/multiple/multiple-valid-specified => semantic-version/multiple/multiple-invalid-deprecated}/bar@2016-02-02.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/semantic-version.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-01-01.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-01-02.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version/multiple/multiple-invalid-deprecated => semantic-version/multiple/multiple-invalid-nosufficient}/bar@2016-02-01.yang (53%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version/multiple/multiple-invalid-deprecated => semantic-version/multiple/multiple-invalid-nosufficient}/bar@2016-02-02.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/semantic-version.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-01-01.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-01-02.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version/multiple/multiple-invalid-nosufficient => semantic-version/multiple/multiple-valid-defaults}/bar@2016-02-01.yang (53%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version/multiple/multiple-invalid-nosufficient => semantic-version/multiple/multiple-valid-defaults}/bar@2016-02-02.yang (53%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/multiple/multiple-valid-defaults/foo.yang (57%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/semantic-version.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-01-01.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-01-02.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version/multiple/multiple-valid-defaults => semantic-version/multiple/multiple-valid-specified}/bar@2016-02-01.yang (53%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version/multiple/multiple-valid-defaults => semantic-version/multiple/multiple-valid-specified}/bar@2016-02-02.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/semantic-version.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/node-test/bar@20160404.yang (57%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/node-test/bar@20160405.yang (62%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/node-test/bar@20160406.yang (65%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/node-test/bar@20170406.yang (68%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/node-test/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/node-test/semantic-version.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/position/position-head/bar.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/position/position-head/foo.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version/position/position-head/openconfig-extensions.yang => semantic-version/position/position-head/semantic-version.yang} (51%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/bar.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/semantic-version.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/position/position-tail/bar.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/position/position-tail/foo.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version/basic-3/openconfig-extensions.yang => semantic-version/position/position-tail/semantic-version.yang} (51%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/bar@2016-01-01.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/semantic-version.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/bar@2016-01-01.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/semantic-version.yang rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/yin-input/basic-import-invalid/bar@2016-01-01.yin (65%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/yin-input/basic-import-invalid/bar@2016-01-31.yin (65%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version/yin-input/basic-import => semantic-version/yin-input/basic-import-invalid}/foo@2016-02-01.yin (65%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/semantic-version@2016-02-02.yin rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/yin-input/basic-import/bar@2016-01-01.yin (65%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/yin-input/basic-import/bar@2016-01-31.yin (65%) rename yang/yang-parser-impl/src/test/resources/{openconfig-version/yin-input/basic-import-invalid => semantic-version/yin-input/basic-import}/foo@2016-02-01.yin (65%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/semantic-version@2016-02-02.yin create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic/bar@2016-01-31.yin rename yang/yang-parser-impl/src/test/resources/{openconfig-version => semantic-version}/yin-input/basic/foo@2016-02-01.yin (60%) create mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic/semantic-version@2016-02-02.yin diff --git a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/Module.java b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/Module.java index 0088db2558..d64a4de98c 100644 --- a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/Module.java +++ b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/Module.java @@ -61,9 +61,9 @@ import org.opendaylight.yangtools.concepts.SemVer; @Immutable public interface Module extends DataNodeContainer, SourceStreamAware, ModuleIdentifier, NotificationNodeContainer { /** - * Default openconfig version of Module. + * Default semantic version of Module. */ - SemVer DEFAULT_OPENCONFIG_VERSION = SemVer.create(0, 0, 0); + SemVer DEFAULT_SEMANTIC_VERSION = SemVer.create(0, 0, 0); /** * Returns the prefix of the module diff --git a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/ModuleIdentifier.java b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/ModuleIdentifier.java index 9ede1bf913..6afd21a3d5 100644 --- a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/ModuleIdentifier.java +++ b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/ModuleIdentifier.java @@ -55,16 +55,17 @@ public interface ModuleIdentifier { Date getRevision(); /** - * Returns the openconfig version of yang module. + * Returns the semantic version of yang module. * - * If the openconfig version is not specified, default openconfig version of + * If the semantic version is not specified, default semantic version of * module is returned. * - * @return SemVer openconfig version of yang module which is specified as + * @return SemVer semantic version of yang module which is specified as * argument of - * (http://openconfig.net/yang/openconfig-ext)openconfig-version statement + * (urn:opendaylight:yang:extension:semantic-version?revision + * =2016-02-02)semantic-version statement */ - default SemVer getOpenconfigVersion() { - return Module.DEFAULT_OPENCONFIG_VERSION; + default SemVer getSemanticVersion() { + return Module.DEFAULT_SEMANTIC_VERSION; } } diff --git a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/ModuleImport.java b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/ModuleImport.java index f165e3bceb..d352aeacbe 100644 --- a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/ModuleImport.java +++ b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/ModuleImport.java @@ -30,10 +30,10 @@ public interface ModuleImport extends DocumentedNode { Date getRevision(); /** - * @return Openconfig version of module to import + * @return Semantic version of module to import */ - default SemVer getOpenconfigVersion() { - return Module.DEFAULT_OPENCONFIG_VERSION; + default SemVer getSemanticVersion() { + return Module.DEFAULT_SEMANTIC_VERSION; } /** diff --git a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/OpenconfigVerSourceIdentifier.java b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/SemVerSourceIdentifier.java similarity index 59% rename from yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/OpenconfigVerSourceIdentifier.java rename to yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/SemVerSourceIdentifier.java index 496514a6a3..76c9ec507d 100644 --- a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/OpenconfigVerSourceIdentifier.java +++ b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/SemVerSourceIdentifier.java @@ -14,13 +14,13 @@ import org.opendaylight.yangtools.concepts.SemVer; import org.opendaylight.yangtools.yang.model.api.Module; /** - * YANG Schema source identifier with specified openconfig version + * YANG Schema source identifier with specified semantic version * * Simple transfer object represents identifier of source for YANG schema * (module or submodule), which consists of * * @@ -35,12 +35,12 @@ import org.opendaylight.yangtools.yang.model.api.Module; * and http://tools.ietf.org/html/rfc6022#section-3.1 ). */ @Beta -public final class OpenconfigVerSourceIdentifier extends SourceIdentifier { +public final class SemVerSourceIdentifier extends SourceIdentifier { private static final long serialVersionUID = 1L; private final SemVer semVer; /** - * Creates new YANG Schema openconfig-version source identifier. + * Creates new YANG Schema semVer source identifier. * * @param name * Name of schema @@ -48,66 +48,66 @@ public final class OpenconfigVerSourceIdentifier extends SourceIdentifier { * Optional of source revision in format YYYY-mm-dd. If not * present, default value will be used. * @param semVer - * openconfig version of source + * semantic version of source */ - OpenconfigVerSourceIdentifier(final String name, final Optional formattedRevision, final SemVer semVer) { + SemVerSourceIdentifier(final String name, final Optional formattedRevision, final SemVer semVer) { super(name, formattedRevision); - this.semVer = semVer == null ? Module.DEFAULT_OPENCONFIG_VERSION : semVer; + this.semVer = semVer == null ? Module.DEFAULT_SEMANTIC_VERSION : semVer; } /** - * Creates new YANG Schema openconfig-version source identifier. + * Creates new YANG Schema semVer source identifier. * * @param name * Name of schema * @param semVer - * openconfig version of source + * semantic version of source */ - OpenconfigVerSourceIdentifier(final String name, final SemVer semVer) { + SemVerSourceIdentifier(final String name, final SemVer semVer) { this(name, Optional.absent(), semVer); } /** - * Returns openconfig version of source or - * {@link Module#DEFAULT_OPENCONFIG_VERSION} if openconfig version was not + * Returns semantic version of source or + * {@link Module#DEFAULT_SEMANTIC_VERSION} if semantic version was not * supplied. * - * @return revision of source or {@link Module#DEFAULT_OPENCONFIG_VERSION} if + * @return revision of source or {@link Module#DEFAULT_SEMANTIC_VERSION} if * revision was not supplied. */ - public SemVer getOpenconfigVersion() { + public SemVer getSemanticVersion() { return semVer; } /** - * Creates new YANG Schema openconfig-version source identifier. + * Creates new YANG Schema semVer source identifier. * * @param moduleName * Name of schema * @param semVer - * openconfig version of source + * semantic version of source */ - public static OpenconfigVerSourceIdentifier create(final String moduleName, final SemVer semVer) { - return new OpenconfigVerSourceIdentifier(moduleName, semVer); + public static SemVerSourceIdentifier create(final String moduleName, final SemVer semVer) { + return new SemVerSourceIdentifier(moduleName, semVer); } /** - * Creates new YANG Schema openconfig-version source identifier. + * Creates new YANG Schema semVer source identifier. * * @param moduleName * Name of schema * @param revision * Revision of source in format YYYY-mm-dd * @param semVer - * openconfig version of source + * semantic version of source */ - public static OpenconfigVerSourceIdentifier create(final String moduleName, final String revision, + public static SemVerSourceIdentifier create(final String moduleName, final String revision, final SemVer semVer) { - return new OpenconfigVerSourceIdentifier(moduleName, Optional.of(revision), semVer); + return new SemVerSourceIdentifier(moduleName, Optional.of(revision), semVer); } /** - * Creates new YANG Schema openconfig-version source identifier. + * Creates new YANG Schema semVer source identifier. * * @param moduleName * Name of schema @@ -115,11 +115,11 @@ public final class OpenconfigVerSourceIdentifier extends SourceIdentifier { * Optional of source revision in format YYYY-mm-dd. If not * present, default value will be used. * @param semVer - * openconfig version of source + * semantic version of source */ - public static OpenconfigVerSourceIdentifier create(final String moduleName, + public static SemVerSourceIdentifier create(final String moduleName, final Optional revision, final SemVer semVer) { - return new OpenconfigVerSourceIdentifier(moduleName, revision, semVer); + return new SemVerSourceIdentifier(moduleName, revision, semVer); } @Override @@ -136,15 +136,15 @@ public final class OpenconfigVerSourceIdentifier extends SourceIdentifier { if (this == obj) { return true; } - if (!(obj instanceof OpenconfigVerSourceIdentifier)) { + if (!(obj instanceof SemVerSourceIdentifier)) { return false; } - final OpenconfigVerSourceIdentifier other = (OpenconfigVerSourceIdentifier) obj; + final SemVerSourceIdentifier other = (SemVerSourceIdentifier) obj; return Objects.equals(getName(), other.getName()) && Objects.equals(semVer, other.semVer); } @Override public String toString() { - return "OpenconfigVerSourceIdentifier [name=" + getName() + "(" + semVer + ")" + "@" + getRevision() + "]"; + return "SemVerSourceIdentifier [name=" + getName() + "(" + semVer + ")" + "@" + getRevision() + "]"; } } diff --git a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/SourceIdentifier.java b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/SourceIdentifier.java index 967a41f423..8692bedfe0 100644 --- a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/SourceIdentifier.java +++ b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/SourceIdentifier.java @@ -95,7 +95,7 @@ public abstract class SourceIdentifier implements Identifier, Immutable { } /** - * Return an interned reference to a equivalent OpenconfigVerSourceIdentifier. + * Return an interned reference to a equivalent SemVerSourceIdentifier. * * @return Interned reference, or this object if it was interned. */ @@ -124,14 +124,14 @@ public abstract class SourceIdentifier implements Identifier, Immutable { /** *

- * Since we've got two ways of model versioning (revision & openconfig version), + * Since we've got two ways of model versioning (revision & semantic version), * this method shouldn't be called directly anymore. Eventually, callers of this method * should be notified before method gets deleted. * @deprecated use either *

    - *
  • {@link OpenconfigVerSourceIdentifier#create(String, SemVer)}
  • - *
  • {@link OpenconfigVerSourceIdentifier#create(String, Optional, SemVer)}
  • - *
  • {@link OpenconfigVerSourceIdentifier#create(String, String, SemVer)}
  • + *
  • {@link SemVerSourceIdentifier#create(String, SemVer)}
  • + *
  • {@link SemVerSourceIdentifier#create(String, Optional, SemVer)}
  • + *
  • {@link SemVerSourceIdentifier#create(String, String, SemVer)}
  • *
* or *
    diff --git a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/StatementParserMode.java b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/StatementParserMode.java index c62266c2c9..e2e71a278d 100644 --- a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/StatementParserMode.java +++ b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/StatementParserMode.java @@ -16,8 +16,8 @@ public enum StatementParserMode { */ DEFAULT_MODE, /** - * Openconfig version mode of statement parser. If it is enabled, module - * imports are processed on the basis of openconfig versions. + * Semantic version mode of statement parser. If it is enabled, module + * imports are processed on the basis of semantic versions. */ - OPENCONFIG_VER_MODE + SEMVER_MODE } \ No newline at end of file diff --git a/yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/ModuleIdentifierImpl.java b/yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/ModuleIdentifierImpl.java index b4c1536dc2..cb59566eea 100644 --- a/yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/ModuleIdentifierImpl.java +++ b/yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/ModuleIdentifierImpl.java @@ -34,12 +34,12 @@ public final class ModuleIdentifierImpl implements ModuleIdentifier { final SemVer semVer) { this.name = checkNotNull(name); this.qnameModule = QNameModule.create(namespace.orElse(null), revision.orElse(null)); - this.semVer = (semVer == null ? Module.DEFAULT_OPENCONFIG_VERSION : semVer); + this.semVer = (semVer == null ? Module.DEFAULT_SEMANTIC_VERSION : semVer); } public static ModuleIdentifier create(final String name, final Optional namespace, final Optional revision) { - return create(name, namespace, revision, Module.DEFAULT_OPENCONFIG_VERSION); + return create(name, namespace, revision, Module.DEFAULT_SEMANTIC_VERSION); } public static ModuleIdentifier create(final String name, final Optional namespace, @@ -58,7 +58,7 @@ public final class ModuleIdentifierImpl implements ModuleIdentifier { } @Override - public SemVer getOpenconfigVersion() { + public SemVer getSemanticVersion() { return semVer; } @@ -106,7 +106,7 @@ public final class ModuleIdentifierImpl implements ModuleIdentifier { return false; } - if (!Objects.equals(getOpenconfigVersion(), other.getOpenconfigVersion())) { + if (!Objects.equals(getSemanticVersion(), other.getSemanticVersion())) { return false; } diff --git a/yang/yang-model-util/src/test/java/org/opendaylight/yangtools/yang/model/util/SchemaContextProxyTest.java b/yang/yang-model-util/src/test/java/org/opendaylight/yangtools/yang/model/util/SchemaContextProxyTest.java index 09d63dbf2e..52398a7142 100644 --- a/yang/yang-model-util/src/test/java/org/opendaylight/yangtools/yang/model/util/SchemaContextProxyTest.java +++ b/yang/yang-model-util/src/test/java/org/opendaylight/yangtools/yang/model/util/SchemaContextProxyTest.java @@ -648,8 +648,8 @@ public class SchemaContextProxyTest { } @Override - public SemVer getOpenconfigVersion() { - return module.getOpenconfigVersion(); + public SemVer getSemanticVersion() { + return module.getSemanticVersion(); } @Override diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/impl/util/YangModelDependencyInfo.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/impl/util/YangModelDependencyInfo.java index 53ba55347d..3ce0b60fe4 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/impl/util/YangModelDependencyInfo.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/impl/util/YangModelDependencyInfo.java @@ -120,11 +120,11 @@ public abstract class YangModelDependencyInfo { } /** - * Returns openconfig version of module + * Returns semantic version of module * - * @return openconfig version + * @return semantic version */ - public Optional getOpenconfigVersion() { + public Optional getSemanticVersion() { return semVer; } @@ -224,7 +224,7 @@ public abstract class YangModelDependencyInfo { private static YangModelDependencyInfo parseModuleContext(final StatementContext module, final String sourceName) { final String name = Utils.stringFromStringContext(module.argument(), getReference(sourceName, module)); final String latestRevision = getLatestRevision(module, sourceName); - final Optional semVer = Optional.fromNullable(getOpenconfigVersion(module, sourceName)); + final Optional semVer = Optional.fromNullable(getSemanticVersion(module, sourceName)); final ImmutableSet imports = parseImports(module, sourceName); final ImmutableSet includes = parseIncludes(module, sourceName); @@ -245,7 +245,7 @@ public abstract class YangModelDependencyInfo { getReference(sourceName, subStatementContext)); final Date revisionDate = (revisionDateStr == null) ? null : QName .parseRevision(revisionDateStr); - final Optional importSemVer = Optional.fromNullable(getOpenconfigVersion(subStatementContext, sourceName)); + final Optional importSemVer = Optional.fromNullable(getSemanticVersion(subStatementContext, sourceName)); result.add(new ModuleImportImpl(importedModuleName, revisionDate, importSemVer)); } @@ -253,10 +253,10 @@ public abstract class YangModelDependencyInfo { return ImmutableSet.copyOf(result); } - private static SemVer getOpenconfigVersion(final StatementContext statement, final String sourceName) { + private static SemVer getSemanticVersion(final StatementContext statement, final String sourceName) { final List subStatements = statement.statement(); String semVerString = null; - final String semVerStmtName = SupportedExtensionsMapping.OPENCONFIG_VERSION.getStatementName().getLocalName(); + final String semVerStmtName = SupportedExtensionsMapping.SEMANTIC_VERSION.getStatementName().getLocalName(); for (final StatementContext subStatement : subStatements) { final String subStatementName = Utils.trimPrefix(subStatement.keyword().getText()); if (semVerStmtName.equals(subStatementName)) { @@ -387,7 +387,8 @@ public abstract class YangModelDependencyInfo { @Override public String toString() { return "Module [name=" + getName() + ", revision=" + getRevision() + ", semanticVersion=" - + getOpenconfigVersion().or(Module.DEFAULT_OPENCONFIG_VERSION) + ", dependencies=" + getDependencies() + "]"; + + getSemanticVersion().or(Module.DEFAULT_SEMANTIC_VERSION) + ", dependencies=" + getDependencies() + + "]"; } } @@ -444,7 +445,7 @@ public abstract class YangModelDependencyInfo { public ModuleImportImpl(final String moduleName, final Date revision, final Optional semVer) { this.name = Preconditions.checkNotNull(moduleName, "Module name must not be null."); this.revision = revision; - this.semVer = semVer.or(Module.DEFAULT_OPENCONFIG_VERSION); + this.semVer = semVer.or(Module.DEFAULT_SEMANTIC_VERSION); } @Override @@ -458,7 +459,7 @@ public abstract class YangModelDependencyInfo { } @Override - public SemVer getOpenconfigVersion() { + public SemVer getSemanticVersion() { return this.semVer; } @@ -504,7 +505,7 @@ public abstract class YangModelDependencyInfo { return false; } - if (!Objects.equals(getOpenconfigVersion(), other.getOpenconfigVersion())) { + if (!Objects.equals(getSemanticVersion(), other.getSemanticVersion())) { return false; } return true; @@ -513,7 +514,7 @@ public abstract class YangModelDependencyInfo { @Override public String toString() { return "ModuleImportImpl [name=" + name + ", revision=" - + QName.formattedRevision(revision) + ", semanticVersion=" + getOpenconfigVersion() + "]"; + + QName.formattedRevision(revision) + ", semanticVersion=" + getSemanticVersion() + "]"; } } } diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/DependencyResolver.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/DependencyResolver.java index 6bce00a841..bc339f7f54 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/DependencyResolver.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/DependencyResolver.java @@ -175,7 +175,7 @@ abstract class DependencyResolver { } @Override - public SemVer getOpenconfigVersion() { + public SemVer getSemanticVersion() { return null; } diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/OpenconfigVerDependencyResolver.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/SemVerDependencyResolver.java similarity index 71% rename from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/OpenconfigVerDependencyResolver.java rename to yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/SemVerDependencyResolver.java index 3d7081d7bb..8567254762 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/OpenconfigVerDependencyResolver.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/SemVerDependencyResolver.java @@ -13,13 +13,13 @@ import java.util.Map; import org.opendaylight.yangtools.concepts.SemVer; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.model.api.ModuleImport; -import org.opendaylight.yangtools.yang.model.repo.api.OpenconfigVerSourceIdentifier; +import org.opendaylight.yangtools.yang.model.repo.api.SemVerSourceIdentifier; import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier; import org.opendaylight.yangtools.yang.parser.impl.util.YangModelDependencyInfo; -final class OpenconfigVerDependencyResolver extends DependencyResolver { +final class SemVerDependencyResolver extends DependencyResolver { - protected OpenconfigVerDependencyResolver(final Map depInfo) { + protected SemVerDependencyResolver(final Map depInfo) { super(depInfo); } @@ -27,7 +27,7 @@ final class OpenconfigVerDependencyResolver extends DependencyResolver { final String requestedModuleName = mi.getModuleName(); for (SourceIdentifier r : haystack) { if (requestedModuleName.equals(r.getName()) - && isCompatible(((OpenconfigVerSourceIdentifier) r).getOpenconfigVersion(), mi.getOpenconfigVersion())) { + && isCompatible(((SemVerSourceIdentifier) r).getSemanticVersion(), mi.getSemanticVersion())) { return r; } } @@ -42,7 +42,7 @@ final class OpenconfigVerDependencyResolver extends DependencyResolver { @Override protected boolean isKnown(final Collection haystack, final ModuleImport mi) { final String rev = mi.getRevision() != null ? QName.formattedRevision(mi.getRevision()) : null; - final OpenconfigVerSourceIdentifier msi = OpenconfigVerSourceIdentifier.create(mi.getModuleName(), Optional.fromNullable(rev), mi.getOpenconfigVersion()); + final SemVerSourceIdentifier msi = SemVerSourceIdentifier.create(mi.getModuleName(), Optional.fromNullable(rev), mi.getSemanticVersion()); // Quick lookup if (haystack.contains(msi)) { @@ -53,7 +53,7 @@ final class OpenconfigVerDependencyResolver extends DependencyResolver { return findCompatibleVersion(haystack, mi) != null; } - public static OpenconfigVerDependencyResolver create(final Map depInfo) { - return new OpenconfigVerDependencyResolver(depInfo); + public static SemVerDependencyResolver create(final Map depInfo) { + return new SemVerDependencyResolver(depInfo); } } \ No newline at end of file diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/SharedSchemaContextFactory.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/SharedSchemaContextFactory.java index 1f05583130..c9c3db8f73 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/SharedSchemaContextFactory.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/SharedSchemaContextFactory.java @@ -74,7 +74,7 @@ final class SharedSchemaContextFactory implements SchemaContextFactory { final Collection requiredSources, final StatementParserMode statementParserMode, final Set supportedFeatures) { return createSchemaContext(requiredSources, - statementParserMode == StatementParserMode.OPENCONFIG_VER_MODE ? this.semVerCache : this.cache, + statementParserMode == StatementParserMode.SEMVER_MODE ? this.semVerCache : this.cache, new AssembleSources(Optional.ofNullable(supportedFeatures), statementParserMode)); } @@ -183,7 +183,7 @@ final class SharedSchemaContextFactory implements SchemaContextFactory { this.supportedFeatures = supportedFeatures; this.statementParserMode = Preconditions.checkNotNull(statementParserMode); switch (statementParserMode) { - case OPENCONFIG_VER_MODE: + case SEMVER_MODE: this.getIdentifier = ASTSchemaSource::getSemVerIdentifier; break; default: @@ -200,8 +200,8 @@ final class SharedSchemaContextFactory implements SchemaContextFactory { LOG.debug("Resolving dependency reactor {}", deps); - final DependencyResolver res = this.statementParserMode == StatementParserMode.OPENCONFIG_VER_MODE - ? OpenconfigVerDependencyResolver.create(deps) : RevisionDependencyResolver.create(deps); + final DependencyResolver res = this.statementParserMode == StatementParserMode.SEMVER_MODE + ? SemVerDependencyResolver.create(deps) : RevisionDependencyResolver.create(deps); if (!res.getUnresolvedSources().isEmpty()) { LOG.debug("Omitting models {} due to unsatisfied imports {}", res.getUnresolvedSources(), res.getUnsatisfiedImports()); diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/ModelProcessingPhase.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/ModelProcessingPhase.java index 89792a3e60..3fe2ccc0f1 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/ModelProcessingPhase.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/ModelProcessingPhase.java @@ -16,7 +16,7 @@ public enum ModelProcessingPhase { * Preliminary cross-source relationship resolution phase which collects * available module names and module namespaces. It is necessary in order to * correct resolution of unknown statements used in linkage phase (e.g. - * openconfig version of yang modules). + * semantic version of yang modules). */ SOURCE_PRE_LINKAGE(INIT), /** diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/OpenconfigVersionModuleNamespace.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/SemanticVersionModuleNamespace.java similarity index 75% rename from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/OpenconfigVersionModuleNamespace.java rename to yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/SemanticVersionModuleNamespace.java index 7145a6a1e1..4f5f83eef9 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/OpenconfigVersionModuleNamespace.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/SemanticVersionModuleNamespace.java @@ -14,8 +14,8 @@ import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace; /** * Namespace class for storing Maps of all modules with the same name. This namespace is - * used only in case the openconfig versioning is enabled, otherwise it is empty. + * used only in case the semantic versioning is enabled, otherwise it is empty. */ @Beta -public interface OpenconfigVersionModuleNamespace extends IdentifierNamespace>> { +public interface SemanticVersionModuleNamespace extends IdentifierNamespace>> { } diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/OpenconfigVersionNamespace.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/SemanticVersionNamespace.java similarity index 76% rename from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/OpenconfigVersionNamespace.java rename to yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/SemanticVersionNamespace.java index 92dcfda494..40a7dbba5b 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/OpenconfigVersionNamespace.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/SemanticVersionNamespace.java @@ -12,8 +12,8 @@ import org.opendaylight.yangtools.concepts.SemVer; import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace; /** - * namespace class for storing openconfig version of yang modules + * namespace class for storing semantic version of yang modules */ @Beta -public interface OpenconfigVersionNamespace extends IdentifierNamespace, SemVer> { +public interface SemanticVersionNamespace extends IdentifierNamespace, SemVer> { } diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/StmtContext.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/StmtContext.java index df28f4dc4a..bd0e1d8322 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/StmtContext.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/StmtContext.java @@ -61,7 +61,7 @@ public interface StmtContext, E extends Effect boolean isConfiguration(); - boolean isEnabledOpenconfigVersioning(); + boolean isEnabledSemanticVersioning(); @Nonnull > V getFromNamespace( diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/ImpPrefixToOpenconfigVerModuleIdentifier.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/ImpPrefixToSemVerModuleIdentifier.java similarity index 81% rename from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/ImpPrefixToOpenconfigVerModuleIdentifier.java rename to yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/ImpPrefixToSemVerModuleIdentifier.java index 738a14e15c..d167832ea8 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/ImpPrefixToOpenconfigVerModuleIdentifier.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/ImpPrefixToSemVerModuleIdentifier.java @@ -13,8 +13,8 @@ import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace; /** * - * Source-specific mapping of prefixes to module identifier with specified openconfig version + * Source-specific mapping of prefixes to module identifier with specified semantic version */ @Beta -public interface ImpPrefixToOpenconfigVerModuleIdentifier extends IdentifierNamespace { +public interface ImpPrefixToSemVerModuleIdentifier extends IdentifierNamespace { } diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/StatementStreamSource.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/StatementStreamSource.java index 393adb3f55..25107e6a70 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/StatementStreamSource.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/StatementStreamSource.java @@ -32,7 +32,7 @@ import org.opendaylight.yangtools.yang.common.YangVersion; * supplied statement definition map. This step is used as preparatory cross-source * relationship resolution phase which collects available module names and namespaces. * It is necessary in order to correct resolution of unknown statements used by linkage - * phase (e.g. openconfig version of yang modules). + * phase (e.g. semantic version of yang modules). * *
  • {@link #writeLinkage(StatementWriter, QNameToStatementDefinition, PrefixToModule)} - * Source MUST emit only statements related in linkage, which are present in diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/BuildGlobalContext.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/BuildGlobalContext.java index ecd85d8b73..322b05ffb6 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/BuildGlobalContext.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/BuildGlobalContext.java @@ -80,7 +80,7 @@ class BuildGlobalContext extends NamespaceStorageSupport implements NamespaceBeh private final Map supports; private final Set sources = new HashSet<>(); private final Set supportedVersions; - private final boolean enabledOpenconfigVersions; + private final boolean enabledSemanticVersions; private Set libSources = new HashSet<>(); private ModelProcessingPhase currentPhase = ModelProcessingPhase.INIT; @@ -93,10 +93,10 @@ class BuildGlobalContext extends NamespaceStorageSupport implements NamespaceBeh switch (statementParserMode) { case DEFAULT_MODE: - enabledOpenconfigVersions = false; + enabledSemanticVersions = false; break; - case OPENCONFIG_VER_MODE: - enabledOpenconfigVersions = true; + case SEMVER_MODE: + enabledSemanticVersions = true; break; default: throw new IllegalArgumentException("Unhandled parser mode " + statementParserMode); @@ -109,8 +109,8 @@ class BuildGlobalContext extends NamespaceStorageSupport implements NamespaceBeh this.supportedVersions = ImmutableSet.copyOf(supports.get(ModelProcessingPhase.INIT).getSupportedVersions()); } - boolean isEnabledOpenconfigVersioning() { - return enabledOpenconfigVersions; + boolean isEnabledSemanticVersioning() { + return enabledSemanticVersions; } StatementSupportBundle getSupportsForPhase(final ModelProcessingPhase currentPhase) { @@ -122,8 +122,8 @@ class BuildGlobalContext extends NamespaceStorageSupport implements NamespaceBeh } void addLibSource(@Nonnull final StatementStreamSource libSource) { - Preconditions.checkState(!isEnabledOpenconfigVersioning(), - "Library sources are not supported in openconfig version mode currently."); + Preconditions.checkState(!isEnabledSemanticVersioning(), + "Library sources are not supported in semantic version mode currently."); Preconditions.checkState(currentPhase == ModelProcessingPhase.INIT, "Add library source is allowed in ModelProcessingPhase.INIT only"); libSources.add(new SourceSpecificContext(this, libSource)); diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/CrossSourceStatementReactor.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/CrossSourceStatementReactor.java index 5495c3ccff..c44e2463bc 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/CrossSourceStatementReactor.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/CrossSourceStatementReactor.java @@ -235,7 +235,7 @@ public final class CrossSourceStatementReactor { * are present in resulting SchemaContext. Any other library sources are * ignored and this also applies to error reporting. * - * Library sources are not supported in openconfig version mode currently. + * Library sources are not supported in semantic version mode currently. * * @param libSources * yang sources which should be added into library sources diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/RootStatementContext.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/RootStatementContext.java index fae13e73e8..f81050ff8e 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/RootStatementContext.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/RootStatementContext.java @@ -190,8 +190,8 @@ public class RootStatementContext, E extends E } @Override - public boolean isEnabledOpenconfigVersioning() { - return sourceContext.isEnabledOpenconfigVersioning(); + public boolean isEnabledSemanticVersioning() { + return sourceContext.isEnabledSemanticVersioning(); } @Override diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/SourceSpecificContext.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/SourceSpecificContext.java index 0fe22b13db..ee72425c42 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/SourceSpecificContext.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/SourceSpecificContext.java @@ -90,8 +90,8 @@ public class SourceSpecificContext implements NamespaceStorageNode, NamespaceBeh this.source = Preconditions.checkNotNull(source); } - boolean isEnabledOpenconfigVersioning(){ - return currentContext.isEnabledOpenconfigVersioning(); + boolean isEnabledSemanticVersioning(){ + return currentContext.isEnabledSemanticVersioning(); } ModelProcessingPhase getInProgressPhase() { diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/SubstatementContext.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/SubstatementContext.java index fabe7692b1..d2e5c733d3 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/SubstatementContext.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/SubstatementContext.java @@ -322,8 +322,8 @@ final class SubstatementContext, E extends Eff } @Override - public boolean isEnabledOpenconfigVersioning() { - return parent.isEnabledOpenconfigVersioning(); + public boolean isEnabledSemanticVersioning() { + return parent.isEnabledSemanticVersioning(); } @Override diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/ImportStatementDefinition.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/ImportStatementDefinition.java index 884e2b7da3..77337197b9 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/ImportStatementDefinition.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/ImportStatementDefinition.java @@ -39,13 +39,13 @@ import org.opendaylight.yangtools.yang.parser.spi.meta.InferenceException; import org.opendaylight.yangtools.yang.parser.spi.meta.ModelActionBuilder; import org.opendaylight.yangtools.yang.parser.spi.meta.ModelActionBuilder.InferenceAction; import org.opendaylight.yangtools.yang.parser.spi.meta.ModelActionBuilder.Prerequisite; -import org.opendaylight.yangtools.yang.parser.spi.meta.OpenconfigVersionModuleNamespace; -import org.opendaylight.yangtools.yang.parser.spi.meta.OpenconfigVersionNamespace; +import org.opendaylight.yangtools.yang.parser.spi.meta.SemanticVersionModuleNamespace; +import org.opendaylight.yangtools.yang.parser.spi.meta.SemanticVersionNamespace; import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext; import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext.Mutable; import org.opendaylight.yangtools.yang.parser.spi.source.ImpPrefixToModuleIdentifier; import org.opendaylight.yangtools.yang.parser.spi.source.ImpPrefixToNamespace; -import org.opendaylight.yangtools.yang.parser.spi.source.ImpPrefixToOpenconfigVerModuleIdentifier; +import org.opendaylight.yangtools.yang.parser.spi.source.ImpPrefixToSemVerModuleIdentifier; import org.opendaylight.yangtools.yang.parser.spi.source.ImportedModuleContext; import org.opendaylight.yangtools.yang.parser.spi.source.ModuleCtxToModuleIdentifier; import org.opendaylight.yangtools.yang.parser.spi.source.ModuleNameToNamespace; @@ -58,7 +58,7 @@ public class ImportStatementDefinition extends .builder(YangStmtMapping.IMPORT) .addMandatory(YangStmtMapping.PREFIX) .addOptional(YangStmtMapping.REVISION_DATE) - .addOptional(SupportedExtensionsMapping.OPENCONFIG_VERSION) + .addOptional(SupportedExtensionsMapping.SEMANTIC_VERSION) .build(); public ImportStatementDefinition() { @@ -123,8 +123,8 @@ public class ImportStatementDefinition extends @Override public void onLinkageDeclared( final Mutable> stmt) { - if (stmt.isEnabledOpenconfigVersioning()) { - OpenconfigVersionImport.onLinkageDeclared(stmt); + if (stmt.isEnabledSemanticVersioning()) { + SemanticVersionImport.onLinkageDeclared(stmt); } else { RevisionImport.onLinkageDeclared(stmt); } @@ -219,8 +219,8 @@ public class ImportStatementDefinition extends } } - private static class OpenconfigVersionImport { - private OpenconfigVersionImport() { + private static class SemanticVersionImport { + private SemanticVersionImport() { throw new UnsupportedOperationException("Utility class"); } @@ -245,7 +245,7 @@ public class ImportStatementDefinition extends if (importedModuleEntry != null) { importedModule = importedModuleEntry.getValue(); importedModuleIdentifier = importedModule.getFromNamespace(ModuleCtxToModuleIdentifier.class, importedModule); - semVerModuleIdentifier = createOpenconfigVerModuleIdentifier(importedModuleIdentifier, importedModuleEntry.getKey()); + semVerModuleIdentifier = createSemVerModuleIdentifier(importedModuleIdentifier, importedModuleEntry.getKey()); } else { throw new InferenceException(stmt.getStatementSourceReference(), "Unable to find module compatible with requested import [%s(%s)].", impIdentifier @@ -255,7 +255,7 @@ public class ImportStatementDefinition extends linkageTarget.get().addToNs(ImportedModuleContext.class, importedModuleIdentifier, importedModule); final String impPrefix = firstAttributeOf(stmt.declaredSubstatements(), PrefixStatement.class); stmt.addToNs(ImpPrefixToModuleIdentifier.class, impPrefix, importedModuleIdentifier); - stmt.addToNs(ImpPrefixToOpenconfigVerModuleIdentifier.class, impPrefix, semVerModuleIdentifier); + stmt.addToNs(ImpPrefixToSemVerModuleIdentifier.class, impPrefix, semVerModuleIdentifier); final URI modNs = firstAttributeOf(importedModule.declaredSubstatements(), NamespaceStatement.class); stmt.addToNs(URIStringToImpPrefix.class, modNs.toString(), impPrefix); @@ -273,9 +273,9 @@ public class ImportStatementDefinition extends } private static SemVer getRequestedImportVersion(final Mutable impStmt) { - SemVer requestedImportVersion = impStmt.getFromNamespace(OpenconfigVersionNamespace.class, impStmt); + SemVer requestedImportVersion = impStmt.getFromNamespace(SemanticVersionNamespace.class, impStmt); if (requestedImportVersion == null) { - requestedImportVersion = Module.DEFAULT_OPENCONFIG_VERSION; + requestedImportVersion = Module.DEFAULT_SEMANTIC_VERSION; } return requestedImportVersion; } @@ -283,7 +283,7 @@ public class ImportStatementDefinition extends private static Entry> findRecentCompatibleModuleEntry(final String moduleName, final Mutable> impStmt) { NavigableMap> allRelevantModulesMap = impStmt.getFromNamespace( - OpenconfigVersionModuleNamespace.class, moduleName); + SemanticVersionModuleNamespace.class, moduleName); if (allRelevantModulesMap == null) { return null; } @@ -303,7 +303,7 @@ public class ImportStatementDefinition extends Optional.of(SimpleDateFormatUtil.DEFAULT_DATE_IMP)); } - private static ModuleIdentifier createOpenconfigVerModuleIdentifier(final ModuleIdentifier importedModuleIdentifier, + private static ModuleIdentifier createSemVerModuleIdentifier(final ModuleIdentifier importedModuleIdentifier, final SemVer semVer) { return ModuleIdentifierImpl.create(importedModuleIdentifier.getName(), Optional.ofNullable(importedModuleIdentifier.getNamespace()), diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/ModuleStatementSupport.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/ModuleStatementSupport.java index a3b9fee0aa..2fbdad58e6 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/ModuleStatementSupport.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/ModuleStatementSupport.java @@ -30,8 +30,8 @@ import org.opendaylight.yangtools.yang.parser.spi.NamespaceToModule; import org.opendaylight.yangtools.yang.parser.spi.PreLinkageModuleNamespace; import org.opendaylight.yangtools.yang.parser.spi.SubstatementValidator; import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport; -import org.opendaylight.yangtools.yang.parser.spi.meta.OpenconfigVersionModuleNamespace; -import org.opendaylight.yangtools.yang.parser.spi.meta.OpenconfigVersionNamespace; +import org.opendaylight.yangtools.yang.parser.spi.meta.SemanticVersionModuleNamespace; +import org.opendaylight.yangtools.yang.parser.spi.meta.SemanticVersionNamespace; import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext; import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext.Mutable; import org.opendaylight.yangtools.yang.parser.spi.source.ImpPrefixToModuleIdentifier; @@ -77,7 +77,7 @@ public class ModuleStatementSupport extends .addAny(YangStmtMapping.TYPEDEF) .addAny(YangStmtMapping.USES) .addOptional(YangStmtMapping.YANG_VERSION) - .addOptional(SupportedExtensionsMapping.OPENCONFIG_VERSION) + .addOptional(SupportedExtensionsMapping.SEMANTIC_VERSION) .build(); public ModuleStatementSupport() { @@ -169,25 +169,25 @@ public class ModuleStatementSupport extends stmt.addToNs(ModuleIdentifierToModuleQName.class, moduleIdentifier, qNameModule); stmt.addToNs(ImpPrefixToModuleIdentifier.class, modulePrefix, moduleIdentifier); - if (stmt.isEnabledOpenconfigVersioning()) { - addToOpenconfigVerModuleNamespace(stmt); + if (stmt.isEnabledSemanticVersioning()) { + addToSemVerModuleNamespace(stmt); } } - private static void addToOpenconfigVerModuleNamespace( + private static void addToSemVerModuleNamespace( final Mutable> stmt) { final String moduleName = stmt.getStatementArgument(); NavigableMap> modulesMap = stmt.getFromNamespace( - OpenconfigVersionModuleNamespace.class, moduleName); + SemanticVersionModuleNamespace.class, moduleName); if (modulesMap == null) { modulesMap = new TreeMap<>(); } - SemVer moduleSemVer = stmt.getFromNamespace(OpenconfigVersionNamespace.class, stmt); + SemVer moduleSemVer = stmt.getFromNamespace(SemanticVersionNamespace.class, stmt); if(moduleSemVer == null) { - moduleSemVer = Module.DEFAULT_OPENCONFIG_VERSION; + moduleSemVer = Module.DEFAULT_SEMANTIC_VERSION; } modulesMap.put(moduleSemVer, stmt); - stmt.addToNs(OpenconfigVersionModuleNamespace.class, moduleName, modulesMap); + stmt.addToNs(SemanticVersionModuleNamespace.class, moduleName, modulesMap); } @Override diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/OpenconfigVersionStatementImpl.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/SemanticVersionStatementImpl.java similarity index 76% rename from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/OpenconfigVersionStatementImpl.java rename to yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/SemanticVersionStatementImpl.java index fb04dcd57b..33ef638c3b 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/OpenconfigVersionStatementImpl.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/SemanticVersionStatementImpl.java @@ -14,27 +14,27 @@ import org.opendaylight.yangtools.yang.model.api.stmt.UnknownStatement; import org.opendaylight.yangtools.yang.parser.spi.SubstatementValidator; import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractDeclaredStatement; import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport; -import org.opendaylight.yangtools.yang.parser.spi.meta.OpenconfigVersionNamespace; +import org.opendaylight.yangtools.yang.parser.spi.meta.SemanticVersionNamespace; import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext; -import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.OpenconfigVersionEffectiveStatementImpl; +import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.SemanticVersionEffectiveStatementImpl; @Beta -public final class OpenconfigVersionStatementImpl extends AbstractDeclaredStatement implements +public final class SemanticVersionStatementImpl extends AbstractDeclaredStatement implements UnknownStatement { private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder( - SupportedExtensionsMapping.OPENCONFIG_VERSION).build(); + SupportedExtensionsMapping.SEMANTIC_VERSION).build(); - OpenconfigVersionStatementImpl( + SemanticVersionStatementImpl( final StmtContext, ?> context) { super(context); } - public static class OpenconfigVersionSupport + public static class SemanticVersionSupport extends AbstractStatementSupport, EffectiveStatement>> { - public OpenconfigVersionSupport() { - super(SupportedExtensionsMapping.OPENCONFIG_VERSION); + public SemanticVersionSupport() { + super(SupportedExtensionsMapping.SEMANTIC_VERSION); } @Override @@ -44,19 +44,19 @@ public final class OpenconfigVersionStatementImpl extends AbstractDeclaredStatem @Override public void onLinkageDeclared(final StmtContext.Mutable,EffectiveStatement>> stmt) { - stmt.addToNs(OpenconfigVersionNamespace.class, stmt.getParentContext(), stmt.getStatementArgument()); + stmt.addToNs(SemanticVersionNamespace.class, stmt.getParentContext(), stmt.getStatementArgument()); } @Override public UnknownStatement createDeclared( final StmtContext, ?> ctx) { - return new OpenconfigVersionStatementImpl(ctx); + return new SemanticVersionStatementImpl(ctx); } @Override public EffectiveStatement> createEffective( final StmtContext, EffectiveStatement>> ctx) { - return new OpenconfigVersionEffectiveStatementImpl(ctx); + return new SemanticVersionEffectiveStatementImpl(ctx); } @Override diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/SupportedExtensionsMapping.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/SupportedExtensionsMapping.java index f25f0a6e02..f21322162d 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/SupportedExtensionsMapping.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/SupportedExtensionsMapping.java @@ -16,16 +16,16 @@ import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement; import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement; import org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition; import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.AnyxmlSchemaLocationEffectiveStatementImpl; -import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.OpenconfigVersionEffectiveStatementImpl; +import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.SemanticVersionEffectiveStatementImpl; @Beta public enum SupportedExtensionsMapping implements StatementDefinition { ANYXML_SCHEMA_LOCATION("urn:opendaylight:yang:extension:yang-ext", "2013-07-09", AnyxmlSchemaLocationStatementImpl.class, AnyxmlSchemaLocationEffectiveStatementImpl.class, "anyxml-schema-location", "target-node", false), - OPENCONFIG_VERSION("http://openconfig.net/yang/openconfig-ext", OpenconfigVersionStatementImpl.class, - OpenconfigVersionEffectiveStatementImpl.class, - "openconfig-version", "semver", false); + SEMANTIC_VERSION("urn:opendaylight:yang:extension:semantic-version", "2016-02-02", + SemanticVersionStatementImpl.class, SemanticVersionEffectiveStatementImpl.class, + "semantic-version", "semantic-version", false); private final Class> type; private final Class> effectiveType; diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/YangInferencePipeline.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/YangInferencePipeline.java index aeeb70b316..7b283fcb61 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/YangInferencePipeline.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/YangInferencePipeline.java @@ -31,8 +31,8 @@ import org.opendaylight.yangtools.yang.parser.spi.TypeNamespace; import org.opendaylight.yangtools.yang.parser.spi.meta.DerivedIdentitiesNamespace; import org.opendaylight.yangtools.yang.parser.spi.meta.ModelProcessingPhase; import org.opendaylight.yangtools.yang.parser.spi.meta.QNameCacheNamespace; -import org.opendaylight.yangtools.yang.parser.spi.meta.OpenconfigVersionModuleNamespace; -import org.opendaylight.yangtools.yang.parser.spi.meta.OpenconfigVersionNamespace; +import org.opendaylight.yangtools.yang.parser.spi.meta.SemanticVersionModuleNamespace; +import org.opendaylight.yangtools.yang.parser.spi.meta.SemanticVersionNamespace; import org.opendaylight.yangtools.yang.parser.spi.meta.StatementDefinitionNamespace; import org.opendaylight.yangtools.yang.parser.spi.meta.StatementSupportBundle; import org.opendaylight.yangtools.yang.parser.spi.source.AnyxmlSchemaLocationNamespace; @@ -42,7 +42,7 @@ import org.opendaylight.yangtools.yang.parser.spi.source.BelongsToPrefixToModule import org.opendaylight.yangtools.yang.parser.spi.source.BelongsToPrefixToModuleName; import org.opendaylight.yangtools.yang.parser.spi.source.ImpPrefixToModuleIdentifier; import org.opendaylight.yangtools.yang.parser.spi.source.ImpPrefixToNamespace; -import org.opendaylight.yangtools.yang.parser.spi.source.ImpPrefixToOpenconfigVerModuleIdentifier; +import org.opendaylight.yangtools.yang.parser.spi.source.ImpPrefixToSemVerModuleIdentifier; import org.opendaylight.yangtools.yang.parser.spi.source.ImportedModuleContext; import org.opendaylight.yangtools.yang.parser.spi.source.IncludedModuleContext; import org.opendaylight.yangtools.yang.parser.spi.source.IncludedSubmoduleNameToIdentifier; @@ -143,10 +143,10 @@ public final class YangInferencePipeline { .addSupport(sourceLocal(BelongsToModuleContext.class)) .addSupport(sourceLocal(QNameToStatementDefinition.class)) .addSupport(sourceLocal(BelongsToPrefixToModuleName.class)) - .addSupport(new OpenconfigVersionStatementImpl.OpenconfigVersionSupport()) - .addSupport(global(OpenconfigVersionNamespace.class)) - .addSupport(global(OpenconfigVersionModuleNamespace.class)) - .addSupport(sourceLocal(ImpPrefixToOpenconfigVerModuleIdentifier.class)) + .addSupport(new SemanticVersionStatementImpl.SemanticVersionSupport()) + .addSupport(global(SemanticVersionNamespace.class)) + .addSupport(global(SemanticVersionModuleNamespace.class)) + .addSupport(sourceLocal(ImpPrefixToSemVerModuleIdentifier.class)) .build(); public static final StatementSupportBundle STMT_DEF_BUNDLE = StatementSupportBundle diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/AbstractEffectiveModule.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/AbstractEffectiveModule.java index 68ae3ade28..46409984e6 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/AbstractEffectiveModule.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/AbstractEffectiveModule.java @@ -93,8 +93,8 @@ abstract class AbstractEffectiveModule> exte final YangVersionEffectiveStatementImpl yangVersionStmt = firstEffective(YangVersionEffectiveStatementImpl.class); this.yangVersion = (yangVersionStmt == null) ? YangVersion.VERSION_1 : yangVersionStmt.argument(); - final OpenconfigVersionEffectiveStatementImpl semanticVersionStmt = firstEffective(OpenconfigVersionEffectiveStatementImpl.class); - this.semanticVersion = (semanticVersionStmt == null) ? DEFAULT_OPENCONFIG_VERSION : semanticVersionStmt.argument(); + final SemanticVersionEffectiveStatementImpl semanticVersionStmt = firstEffective(SemanticVersionEffectiveStatementImpl.class); + this.semanticVersion = (semanticVersionStmt == null) ? DEFAULT_SEMANTIC_VERSION : semanticVersionStmt.argument(); final OrganizationEffectiveStatementImpl organizationStmt = firstEffective(OrganizationEffectiveStatementImpl.class); this.organization = (organizationStmt == null) ? null : organizationStmt.argument(); @@ -250,7 +250,7 @@ abstract class AbstractEffectiveModule> exte this.unknownNodes = ImmutableList.copyOf(unknownNodesInit); this.augmentations = ImmutableSet.copyOf(augmentationsInit); - if (ctx.isEnabledOpenconfigVersioning()) { + if (ctx.isEnabledSemanticVersioning()) { this.imports = ImmutableSet.copyOf(importsInit); } else { this.imports = ImmutableSet.copyOf(resolveModuleImports(importsInit, ctx)); @@ -412,7 +412,7 @@ abstract class AbstractEffectiveModule> exte } @Override - public SemVer getOpenconfigVersion() { + public SemVer getSemanticVersion() { return semanticVersion; } diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ImportEffectiveStatementImpl.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ImportEffectiveStatementImpl.java index da2e3f6544..8209c346a8 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ImportEffectiveStatementImpl.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ImportEffectiveStatementImpl.java @@ -18,7 +18,7 @@ import org.opendaylight.yangtools.yang.model.api.ModuleImport; import org.opendaylight.yangtools.yang.model.api.stmt.ImportStatement; import org.opendaylight.yangtools.yang.parser.spi.meta.MissingSubstatementException; import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext; -import org.opendaylight.yangtools.yang.parser.spi.source.ImpPrefixToOpenconfigVerModuleIdentifier; +import org.opendaylight.yangtools.yang.parser.spi.source.ImpPrefixToSemVerModuleIdentifier; public class ImportEffectiveStatementImpl extends DeclaredEffectiveStatementBase implements ModuleImport { @@ -42,15 +42,15 @@ public class ImportEffectiveStatementImpl extends DeclaredEffectiveStatementBase ctx.getStatementSourceReference()); } - if (!ctx.isEnabledOpenconfigVersioning()) { + if (!ctx.isEnabledSemanticVersioning()) { RevisionDateEffectiveStatementImpl revisionDateStmt = firstEffective(RevisionDateEffectiveStatementImpl.class); this.revision = (revisionDateStmt == null) ? SimpleDateFormatUtil.DEFAULT_DATE_IMP : revisionDateStmt .argument(); - this.semVer = Module.DEFAULT_OPENCONFIG_VERSION; + this.semVer = Module.DEFAULT_SEMANTIC_VERSION; } else { - ModuleIdentifier importedModuleIdentifier = ctx.getFromNamespace(ImpPrefixToOpenconfigVerModuleIdentifier.class, prefix); + ModuleIdentifier importedModuleIdentifier = ctx.getFromNamespace(ImpPrefixToSemVerModuleIdentifier.class, prefix); revision = importedModuleIdentifier.getRevision(); - semVer = importedModuleIdentifier.getOpenconfigVersion(); + semVer = importedModuleIdentifier.getSemanticVersion(); } DescriptionEffectiveStatementImpl descriptionStmt = firstEffective(DescriptionEffectiveStatementImpl.class); @@ -71,7 +71,7 @@ public class ImportEffectiveStatementImpl extends DeclaredEffectiveStatementBase } @Override - public SemVer getOpenconfigVersion() { + public SemVer getSemanticVersion() { return semVer; } @@ -115,7 +115,7 @@ public class ImportEffectiveStatementImpl extends DeclaredEffectiveStatementBase @Override public String toString() { return MoreObjects.toStringHelper(this).add("moduleName", getModuleName()) - .add("revision", getRevision()).add("openconfig version", getOpenconfigVersion()) + .add("revision", getRevision()).add("semantic version", getSemanticVersion()) .add("prefix", getPrefix()).add("description", getDescription()) .add("reference", getReference()).toString(); } diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ModuleImportImpl.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ModuleImportImpl.java index 2a38ab2bf2..fccc90be9f 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ModuleImportImpl.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ModuleImportImpl.java @@ -21,14 +21,14 @@ final class ModuleImportImpl implements ModuleImport { private final String prefix; public ModuleImportImpl(final String moduleName, final Date revision, final String prefix) { - this(moduleName, revision, prefix, Module.DEFAULT_OPENCONFIG_VERSION); + this(moduleName, revision, prefix, Module.DEFAULT_SEMANTIC_VERSION); } public ModuleImportImpl(final String moduleName, final Date revision, final String prefix, final SemVer semVer) { this.moduleName = Preconditions.checkNotNull(moduleName, "Module name must not be null."); this.revision = revision; this.prefix = Preconditions.checkNotNull(prefix, "Import prefix must not be null."); - this.semVer = Preconditions.checkNotNull(semVer, "Openconfig version of module must not be null."); + this.semVer = Preconditions.checkNotNull(semVer, "Semantic version of module must not be null."); } @Override @@ -42,7 +42,7 @@ final class ModuleImportImpl implements ModuleImport { } @Override - public SemVer getOpenconfigVersion() { + public SemVer getSemanticVersion() { return semVer; } @@ -83,7 +83,7 @@ final class ModuleImportImpl implements ModuleImport { if (!Objects.equals(getPrefix(), other.getPrefix())) { return false; } - if (!Objects.equals(getOpenconfigVersion(), other.getOpenconfigVersion())) { + if (!Objects.equals(getSemanticVersion(), other.getSemanticVersion())) { return false; } return true; diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/OpenconfigVersionEffectiveStatementImpl.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/SemanticVersionEffectiveStatementImpl.java similarity index 90% rename from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/OpenconfigVersionEffectiveStatementImpl.java rename to yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/SemanticVersionEffectiveStatementImpl.java index 6d8d68fe63..cb7428f7de 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/OpenconfigVersionEffectiveStatementImpl.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/SemanticVersionEffectiveStatementImpl.java @@ -18,12 +18,12 @@ import org.opendaylight.yangtools.yang.model.api.stmt.UnknownStatement; import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext; @Beta -public final class OpenconfigVersionEffectiveStatementImpl extends +public final class SemanticVersionEffectiveStatementImpl extends UnknownEffectiveStatementBase { private final SchemaPath path; - public OpenconfigVersionEffectiveStatementImpl( + public SemanticVersionEffectiveStatementImpl( final StmtContext, ?> ctx) { super(ctx); path = ctx.getParentContext().getSchemaPath().get().createChild(getNodeType()); @@ -62,7 +62,7 @@ public final class OpenconfigVersionEffectiveStatementImpl extends if (getClass() != obj.getClass()) { return false; } - OpenconfigVersionEffectiveStatementImpl other = (OpenconfigVersionEffectiveStatementImpl) obj; + SemanticVersionEffectiveStatementImpl other = (SemanticVersionEffectiveStatementImpl) obj; if (!Objects.equals(path, other.path)) { return false; } diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc7950/ImportStatementRfc7950Support.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc7950/ImportStatementRfc7950Support.java index e442bad03c..30ff823413 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc7950/ImportStatementRfc7950Support.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc7950/ImportStatementRfc7950Support.java @@ -24,7 +24,7 @@ public class ImportStatementRfc7950Support extends ImportStatementDefinition { .builder(YangStmtMapping.IMPORT) .addMandatory(YangStmtMapping.PREFIX) .addOptional(YangStmtMapping.REVISION_DATE) - .addOptional(SupportedExtensionsMapping.OPENCONFIG_VERSION) + .addOptional(SupportedExtensionsMapping.SEMANTIC_VERSION) .addOptional(YangStmtMapping.DESCRIPTION) .addOptional(YangStmtMapping.REFERENCE) .build(); diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc7950/ModuleStatementRfc7950Support.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc7950/ModuleStatementRfc7950Support.java index 2a99221f38..124dfabe4a 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc7950/ModuleStatementRfc7950Support.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc7950/ModuleStatementRfc7950Support.java @@ -44,7 +44,7 @@ public class ModuleStatementRfc7950Support extends ModuleStatementSupport { .addAny(YangStmtMapping.TYPEDEF) .addAny(YangStmtMapping.USES) .addMandatory(YangStmtMapping.YANG_VERSION) - .addOptional(SupportedExtensionsMapping.OPENCONFIG_VERSION) + .addOptional(SupportedExtensionsMapping.SEMANTIC_VERSION) .build(); @Override diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/util/ASTSchemaSource.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/util/ASTSchemaSource.java index f1899959e1..44aaeba0bd 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/util/ASTSchemaSource.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/util/ASTSchemaSource.java @@ -7,7 +7,7 @@ */ package org.opendaylight.yangtools.yang.parser.util; -import static org.opendaylight.yangtools.yang.model.api.Module.DEFAULT_OPENCONFIG_VERSION; +import static org.opendaylight.yangtools.yang.model.api.Module.DEFAULT_SEMANTIC_VERSION; import com.google.common.annotations.Beta; import com.google.common.base.Function; @@ -19,7 +19,7 @@ import org.antlr.v4.runtime.ParserRuleContext; import org.opendaylight.yangtools.yang.model.parser.api.YangSyntaxErrorException; import org.opendaylight.yangtools.yang.model.repo.api.RevisionSourceIdentifier; import org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation; -import org.opendaylight.yangtools.yang.model.repo.api.OpenconfigVerSourceIdentifier; +import org.opendaylight.yangtools.yang.model.repo.api.SemVerSourceIdentifier; import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier; import org.opendaylight.yangtools.yang.parser.impl.util.YangModelDependencyInfo; @@ -48,12 +48,12 @@ public final class ASTSchemaSource implements SchemaSourceRepresentation { public static final Function GET_AST = ASTSchemaSource::getAST; private final YangModelDependencyInfo depInfo; - private final OpenconfigVerSourceIdentifier semVerId; + private final SemVerSourceIdentifier semVerId; private final ParserRuleContext tree; private final SourceIdentifier id; private final String symbolicName; - private ASTSchemaSource(@Nonnull final SourceIdentifier id, @Nonnull final OpenconfigVerSourceIdentifier semVerId, + private ASTSchemaSource(@Nonnull final SourceIdentifier id, @Nonnull final SemVerSourceIdentifier semVerId, @Nonnull final ParserRuleContext tree, @Nonnull final YangModelDependencyInfo depInfo, @Nullable final String symbolicName) { this.depInfo = Preconditions.checkNotNull(depInfo); @@ -76,7 +76,7 @@ public final class ASTSchemaSource implements SchemaSourceRepresentation { throws YangSyntaxErrorException { final YangModelDependencyInfo depInfo = YangModelDependencyInfo.fromAST(name, tree); final SourceIdentifier id = getSourceId(depInfo); - final OpenconfigVerSourceIdentifier semVerId = getOpenconfigVerSourceId(depInfo); + final SemVerSourceIdentifier semVerId = getSemVerSourceId(depInfo); return new ASTSchemaSource(id, semVerId, tree, depInfo, null); } @@ -86,12 +86,12 @@ public final class ASTSchemaSource implements SchemaSourceRepresentation { : RevisionSourceIdentifier.create(name, depInfo.getFormattedRevision()); } - private static OpenconfigVerSourceIdentifier getOpenconfigVerSourceId(final YangModelDependencyInfo depInfo) { + private static SemVerSourceIdentifier getSemVerSourceId(final YangModelDependencyInfo depInfo) { return depInfo.getFormattedRevision() == null - ? OpenconfigVerSourceIdentifier.create(depInfo.getName(), - depInfo.getOpenconfigVersion().or(DEFAULT_OPENCONFIG_VERSION)) - : OpenconfigVerSourceIdentifier.create(depInfo.getName(), depInfo.getFormattedRevision(), - depInfo.getOpenconfigVersion().or(DEFAULT_OPENCONFIG_VERSION)); + ? SemVerSourceIdentifier.create(depInfo.getName(), + depInfo.getSemanticVersion().or(DEFAULT_SEMANTIC_VERSION)) + : SemVerSourceIdentifier.create(depInfo.getName(), depInfo.getFormattedRevision(), + depInfo.getSemanticVersion().or(DEFAULT_SEMANTIC_VERSION)); } /** @@ -158,11 +158,11 @@ public final class ASTSchemaSource implements SchemaSourceRepresentation { final YangModelDependencyInfo depInfo = YangModelDependencyInfo.fromAST(identifier.getName(), tree); final SourceIdentifier id = getSourceId(depInfo); - final OpenconfigVerSourceIdentifier semVerId; - if (identifier instanceof OpenconfigVerSourceIdentifier && !depInfo.getOpenconfigVersion().isPresent()) { - semVerId = (OpenconfigVerSourceIdentifier) identifier; + final SemVerSourceIdentifier semVerId; + if (identifier instanceof SemVerSourceIdentifier && !depInfo.getSemanticVersion().isPresent()) { + semVerId = (SemVerSourceIdentifier) identifier; } else { - semVerId = getOpenconfigVerSourceId(depInfo); + semVerId = getSemVerSourceId(depInfo); } return new ASTSchemaSource(id, semVerId, tree, depInfo, symbolicName); @@ -179,7 +179,7 @@ public final class ASTSchemaSource implements SchemaSourceRepresentation { return Optional.ofNullable(symbolicName); } - public OpenconfigVerSourceIdentifier getSemVerIdentifier() { + public SemVerSourceIdentifier getSemVerIdentifier() { return semVerId; } diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/repo/OpenconfigVerSharedSchemaRepositoryTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/repo/SemVerSharedSchemaRepositoryTest.java similarity index 86% rename from yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/repo/OpenconfigVerSharedSchemaRepositoryTest.java rename to yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/repo/SemVerSharedSchemaRepositoryTest.java index 377f93bb59..2c8b2ff9c9 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/repo/OpenconfigVerSharedSchemaRepositoryTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/repo/SemVerSharedSchemaRepositoryTest.java @@ -24,23 +24,23 @@ import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource; import org.opendaylight.yangtools.yang.parser.util.ASTSchemaSource; import org.opendaylight.yangtools.yang.parser.util.TextToASTTransformer; -public class OpenconfigVerSharedSchemaRepositoryTest { +public class SemVerSharedSchemaRepositoryTest { @Test public void testSemVerSharedSchemaRepository() throws Exception { final SharedSchemaRepository sharedSchemaRepository = new SharedSchemaRepository( - "openconfig-ver-shared-schema-repo-test"); + "sem-ver-shared-schema-repo-test"); final SettableSchemaProvider bar = getImmediateYangSourceProviderFromResource( - "/openconfig-version/openconfigver-shared-schema-repository/bar@2016-01-01.yang"); + "/semantic-version/semver-shared-schema-repository/bar@2016-01-01.yang"); bar.register(sharedSchemaRepository); bar.setResult(); final SettableSchemaProvider foo = getImmediateYangSourceProviderFromResource( - "/openconfig-version/openconfigver-shared-schema-repository/foo.yang"); + "/semantic-version/semver-shared-schema-repository/foo.yang"); foo.register(sharedSchemaRepository); foo.setResult(); final SettableSchemaProvider semVer = getImmediateYangSourceProviderFromResource( - "/openconfig-version/openconfigver-shared-schema-repository/openconfig-extensions.yang"); + "/semantic-version/semver-shared-schema-repository/semantic-version.yang"); semVer.register(sharedSchemaRepository); semVer.setResult(); @@ -49,12 +49,12 @@ public class OpenconfigVerSharedSchemaRepositoryTest { final CheckedFuture inetAndTopologySchemaContextFuture = fact .createSchemaContext(Lists.newArrayList(bar.getId(), foo.getId(), semVer.getId()), - StatementParserMode.OPENCONFIG_VER_MODE); + StatementParserMode.SEMVER_MODE); assertTrue(inetAndTopologySchemaContextFuture.isDone()); assertSchemaContext(inetAndTopologySchemaContextFuture.checkedGet(), 3); final CheckedFuture barSchemaContextFuture = fact - .createSchemaContext(Lists.newArrayList(bar.getId(), semVer.getId()), StatementParserMode.OPENCONFIG_VER_MODE); + .createSchemaContext(Lists.newArrayList(bar.getId(), semVer.getId()), StatementParserMode.SEMVER_MODE); assertTrue(barSchemaContextFuture.isDone()); assertSchemaContext(barSchemaContextFuture.checkedGet(), 2); } @@ -64,15 +64,15 @@ public class OpenconfigVerSharedSchemaRepositoryTest { final SharedSchemaRepository sharedSchemaRepository = new SharedSchemaRepository("shared-schema-repo-test"); final SettableSchemaProvider bar = getImmediateYangSourceProviderFromResource( - "/openconfig-version/shared-schema-repository/bar@2016-01-01.yang"); + "/semantic-version/shared-schema-repository/bar@2016-01-01.yang"); bar.register(sharedSchemaRepository); bar.setResult(); final SettableSchemaProvider foo = getImmediateYangSourceProviderFromResource( - "/openconfig-version/shared-schema-repository/foo.yang"); + "/semantic-version/shared-schema-repository/foo.yang"); foo.register(sharedSchemaRepository); foo.setResult(); final SettableSchemaProvider semVer = getImmediateYangSourceProviderFromResource( - "/openconfig-version/shared-schema-repository/openconfig-extensions.yang"); + "/semantic-version/shared-schema-repository/semantic-version.yang"); semVer.register(sharedSchemaRepository); semVer.setResult(); diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionBorderCaseTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionBorderCaseTest.java similarity index 57% rename from yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionBorderCaseTest.java rename to yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionBorderCaseTest.java index fd3171fe9a..8c5e2f1130 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionBorderCaseTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionBorderCaseTest.java @@ -5,7 +5,7 @@ * 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.yangtools.yang.stmt.openconfigver; +package org.opendaylight.yangtools.yang.stmt.semver; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -21,62 +21,62 @@ import org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode; import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException; import org.opendaylight.yangtools.yang.stmt.StmtTestUtils; -public class OpenconfigVersionBorderCaseTest { +public class SemanticVersionBorderCaseTest { @Test public void borderCaseValidMajorTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/border-case/border-case-valid-major", - StatementParserMode.OPENCONFIG_VER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/border-case/border-case-valid-major", + StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) + Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) .iterator().next(); - assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); Module bar = StmtTestUtils.findImportedModule(context, foo, "bar"); - assertEquals(SemVer.valueOf("5.5.5"), bar.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("5.5.5"), bar.getSemanticVersion()); } @Test public void borderCaseValidMinorTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/border-case/border-case-valid-minor", - StatementParserMode.OPENCONFIG_VER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/border-case/border-case-valid-minor", + StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) + Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) .iterator().next(); - assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); Module bar = StmtTestUtils.findImportedModule(context, foo, "bar"); - assertEquals(SemVer.valueOf("5.6.5"), bar.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("5.6.5"), bar.getSemanticVersion()); } @Test public void borderCaseValidPatchTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/border-case/border-case-valid-patch", - StatementParserMode.OPENCONFIG_VER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/border-case/border-case-valid-patch", + StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) + Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) .iterator().next(); - assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); Module bar = StmtTestUtils.findImportedModule(context, foo, "bar"); - assertEquals(SemVer.valueOf("5.5.6"), bar.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("5.5.6"), bar.getSemanticVersion()); } @Test public void borderCaseInvalidMajorTest() throws Exception { try { - StmtTestUtils.parseYangSources("/openconfig-version/border-case/border-case-invalid-major", - StatementParserMode.OPENCONFIG_VER_MODE); - fail("Test should fail due to invalid openconfig version"); + StmtTestUtils.parseYangSources("/semantic-version/border-case/border-case-invalid-major", + StatementParserMode.SEMVER_MODE); + fail("Test should fail due to invalid semantic version"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage() .startsWith("Unable to find module compatible with requested import [bar(5.5.5)].")); @@ -86,9 +86,9 @@ public class OpenconfigVersionBorderCaseTest { @Test public void borderCaseInvalidMinorTest() throws Exception { try { - StmtTestUtils.parseYangSources("/openconfig-version/border-case/border-case-invalid-minor", - StatementParserMode.OPENCONFIG_VER_MODE); - fail("Test should fail due to invalid openconfig version"); + StmtTestUtils.parseYangSources("/semantic-version/border-case/border-case-invalid-minor", + StatementParserMode.SEMVER_MODE); + fail("Test should fail due to invalid semantic version"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage() .startsWith("Unable to find module compatible with requested import [bar(5.5.5)].")); @@ -98,9 +98,9 @@ public class OpenconfigVersionBorderCaseTest { @Test public void borderCaseInvalidPatchTest() throws Exception { try { - StmtTestUtils.parseYangSources("/openconfig-version/border-case/border-case-invalid-patch", - StatementParserMode.OPENCONFIG_VER_MODE); - fail("Test should fail due to invalid openconfig version"); + StmtTestUtils.parseYangSources("/semantic-version/border-case/border-case-invalid-patch", + StatementParserMode.SEMVER_MODE); + fail("Test should fail due to invalid semantic version"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage() .startsWith("Unable to find module compatible with requested import [bar(5.5.5)].")); diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionComplexTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionComplexTest.java similarity index 79% rename from yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionComplexTest.java rename to yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionComplexTest.java index 83a2304218..48b6efb80a 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionComplexTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionComplexTest.java @@ -5,7 +5,7 @@ * 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.yangtools.yang.stmt.openconfigver; +package org.opendaylight.yangtools.yang.stmt.semver; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -21,19 +21,19 @@ import org.opendaylight.yangtools.yang.model.util.RevisionAwareXPathImpl; import org.opendaylight.yangtools.yang.model.util.SchemaContextUtil; import org.opendaylight.yangtools.yang.stmt.StmtTestUtils; -public class OpenconfigVersionComplexTest { +public class SemanticVersionComplexTest { @Test public void complexTest1() throws Exception { - final SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/complex/complex-1", - StatementParserMode.OPENCONFIG_VER_MODE); + final SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/complex/complex-1", + StatementParserMode.SEMVER_MODE); verifySchemaContextTest1(context); } @Test public void complexTest1Yang1_1() throws Exception { - final SchemaContext context = StmtTestUtils.parseYangSources("/rfc7950/openconfig-version/complex-1", - StatementParserMode.OPENCONFIG_VER_MODE); + final SchemaContext context = StmtTestUtils.parseYangSources("/rfc7950/semantic-version/complex-1", + StatementParserMode.SEMVER_MODE); verifySchemaContextTest1(context); } @@ -42,17 +42,17 @@ public class OpenconfigVersionComplexTest { final Module foo = context.findModuleByNamespace(URI.create("foo")).iterator().next(); final Module semVer = context.findModuleByNamespace( - URI.create("http://openconfig.net/yang/openconfig-ext")).iterator().next(); + URI.create("urn:opendaylight:yang:extension:semantic-version")).iterator().next(); // check module versions - assertEquals(SemVer.valueOf("1.3.95"), semVer.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("1.50.2"), foo.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("1.3.95"), semVer.getSemanticVersion()); + assertEquals(SemVer.valueOf("1.50.2"), foo.getSemanticVersion()); final Module bar = StmtTestUtils.findImportedModule(context, foo, "bar"); - assertEquals(SemVer.valueOf("1.2.6"), bar.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("1.2.6"), bar.getSemanticVersion()); final Module foobar = StmtTestUtils.findImportedModule(context, bar, "foobar"); - assertEquals(SemVer.valueOf("2.26.465"), foobar.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("2.26.465"), foobar.getSemanticVersion()); // check imported components assertNotNull("This component should be present", SchemaContextUtil.findDataSchemaNode(context, foo, @@ -71,15 +71,15 @@ public class OpenconfigVersionComplexTest { @Test public void complexTest2() throws Exception { - final SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/complex/complex-2", - StatementParserMode.OPENCONFIG_VER_MODE); + final SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/complex/complex-2", + StatementParserMode.SEMVER_MODE); verifySchemaContextTest2(context); } @Test public void complexTest2Yang1_1() throws Exception { - final SchemaContext context = StmtTestUtils.parseYangSources("/rfc7950/openconfig-version/complex-2", - StatementParserMode.OPENCONFIG_VER_MODE); + final SchemaContext context = StmtTestUtils.parseYangSources("/rfc7950/semantic-version/complex-2", + StatementParserMode.SEMVER_MODE); verifySchemaContextTest2(context); } @@ -88,17 +88,17 @@ public class OpenconfigVersionComplexTest { final Module foo = context.findModuleByNamespace(URI.create("foo")).iterator().next(); final Module semVer = context.findModuleByNamespace(URI.create( - "http://openconfig.net/yang/openconfig-ext")).iterator().next(); + "urn:opendaylight:yang:extension:semantic-version")).iterator().next(); // check module versions - assertEquals(SemVer.valueOf("2.5.50"), semVer.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("2.32.2"), foo.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("2.5.50"), semVer.getSemanticVersion()); + assertEquals(SemVer.valueOf("2.32.2"), foo.getSemanticVersion()); final Module bar = StmtTestUtils.findImportedModule(context, foo, "bar"); - assertEquals(SemVer.valueOf("4.9.8"), bar.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("4.9.8"), bar.getSemanticVersion()); final Module foobar = StmtTestUtils.findImportedModule(context, bar, "foobar"); - assertEquals(SemVer.valueOf("7.13.99"), foobar.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("7.13.99"), foobar.getSemanticVersion()); // check used augmentations assertNotNull("This component should be present", SchemaContextUtil.findDataSchemaNode(context, bar, diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionDefaultsTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionDefaultsTest.java similarity index 69% rename from yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionDefaultsTest.java rename to yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionDefaultsTest.java index 7b84eadb75..6dea1b3525 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionDefaultsTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionDefaultsTest.java @@ -5,7 +5,7 @@ * 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.yangtools.yang.stmt.openconfigver; +package org.opendaylight.yangtools.yang.stmt.semver; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -21,40 +21,40 @@ import org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode; import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException; import org.opendaylight.yangtools.yang.stmt.StmtTestUtils; -public class OpenconfigVersionDefaultsTest { +public class SemanticVersionDefaultsTest { @Test public void defaultsTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/defaults/defaults", - StatementParserMode.OPENCONFIG_VER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/defaults/defaults", + StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); Module bar = context.findModuleByNamespace(new URI("bar")).iterator().next(); - assertEquals(SemVer.valueOf("0.0.0"), foo.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.0.0"), bar.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.0.0"), foo.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.0.0"), bar.getSemanticVersion()); } @Test public void defaultMajorValidTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/defaults/default-major-valid", - StatementParserMode.OPENCONFIG_VER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/defaults/default-major-valid", + StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); Module bar = context.findModuleByNamespace(new URI("bar")).iterator().next(); - assertEquals(SemVer.valueOf("0.0.0"), foo.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.99.99"), bar.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.0.0"), foo.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.99.99"), bar.getSemanticVersion()); } @Test public void defaultMajorInvalidTest() throws Exception { try { - StmtTestUtils.parseYangSources("/openconfig-version/defaults/default-major-invalid", - StatementParserMode.OPENCONFIG_VER_MODE); - fail("Test should fail due to invalid openconfig version"); + StmtTestUtils.parseYangSources("/semantic-version/defaults/default-major-invalid", + StatementParserMode.SEMVER_MODE); + fail("Test should fail due to invalid semantic version"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage() .startsWith("Unable to find module compatible with requested import [bar(0.0.0)].")); diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionIgnoringRevisionTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionIgnoringRevisionTest.java similarity index 60% rename from yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionIgnoringRevisionTest.java rename to yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionIgnoringRevisionTest.java index 2250c1e7dc..ee52231261 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionIgnoringRevisionTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionIgnoringRevisionTest.java @@ -5,7 +5,7 @@ * 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.yangtools.yang.stmt.openconfigver; +package org.opendaylight.yangtools.yang.stmt.semver; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -18,37 +18,37 @@ import org.opendaylight.yangtools.yang.model.api.SchemaContext; import org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode; import org.opendaylight.yangtools.yang.stmt.StmtTestUtils; -public class OpenconfigVersionIgnoringRevisionTest { +public class SemanticVersionIgnoringRevisionTest { @Test public void ignoringRevisionTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/ignoring-revision", - StatementParserMode.OPENCONFIG_VER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/ignoring-revision", + StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); Module bar = context.findModuleByNamespace(new URI("bar")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) + Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) .iterator().next(); - assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.2"), bar.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.2"), bar.getSemanticVersion()); } @Test public void ignoringRevision2Test() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/ignoring-revision-2", - StatementParserMode.OPENCONFIG_VER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/ignoring-revision-2", + StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) + Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) .iterator().next(); Module bar = StmtTestUtils.findImportedModule(context, foo, "bar"); - assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.2"), bar.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.2"), bar.getSemanticVersion()); } } diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionImportTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionImportTest.java similarity index 57% rename from yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionImportTest.java rename to yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionImportTest.java index d6ab9af420..7f37b2b01c 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionImportTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionImportTest.java @@ -5,7 +5,7 @@ * 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.yangtools.yang.stmt.openconfigver; +package org.opendaylight.yangtools.yang.stmt.semver; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -21,65 +21,65 @@ import org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode; import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException; import org.opendaylight.yangtools.yang.stmt.StmtTestUtils; -public class OpenconfigVersionImportTest { +public class SemanticVersionImportTest { @Test public void importValidTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/import/import-valid", - StatementParserMode.OPENCONFIG_VER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/import/import-valid", + StatementParserMode.SEMVER_MODE); assertNotNull(context); - Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) + Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) .iterator().next(); - assertEquals(SemVer.valueOf("1.0.0"), semVer.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("1.0.0"), semVer.getSemanticVersion()); } @Test public void importInvalidDeprecatedTest1() throws Exception { try { - StmtTestUtils.parseYangSources("/openconfig-version/import/import-invalid-deprecated-1", - StatementParserMode.OPENCONFIG_VER_MODE); - fail("Test should fail due to invalid import of openconfig-version module"); + StmtTestUtils.parseYangSources("/semantic-version/import/import-invalid-deprecated-1", + StatementParserMode.SEMVER_MODE); + fail("Test should fail due to invalid import of semantic-version module"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage().startsWith( - "Unable to find module compatible with requested import " + "[openconfig-extensions(1.0.0)].")); + "Unable to find module compatible with requested import " + "[semantic-version(1.0.0)].")); } } @Test public void importInvalidDeprecatedTest2() throws Exception { try { - StmtTestUtils.parseYangSources("/openconfig-version/import/import-invalid-deprecated-2", - StatementParserMode.OPENCONFIG_VER_MODE); - fail("Test should fail due to invalid import of openconfig-version module"); + StmtTestUtils.parseYangSources("/semantic-version/import/import-invalid-deprecated-2", + StatementParserMode.SEMVER_MODE); + fail("Test should fail due to invalid import of semantic-version module"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage().startsWith( - "Unable to find module compatible with requested import " + "[openconfig-extensions(0.9.9)].")); + "Unable to find module compatible with requested import " + "[semantic-version(0.9.9)].")); } } @Test public void importInvalidNotsufficientTest1() throws Exception { try { - StmtTestUtils.parseYangSources("/openconfig-version/import/import-invalid-notsufficient-1", - StatementParserMode.OPENCONFIG_VER_MODE); - fail("Test should fail due to invalid import of openconfig-version module"); + StmtTestUtils.parseYangSources("/semantic-version/import/import-invalid-notsufficient-1", + StatementParserMode.SEMVER_MODE); + fail("Test should fail due to invalid import of semantic-version module"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage().startsWith( - "Unable to find module compatible with requested import " + "[openconfig-extensions(2.0.0)].")); + "Unable to find module compatible with requested import " + "[semantic-version(2.0.0)].")); } } @Test public void importInvalidNotsufficientTest2() throws Exception { try { - StmtTestUtils.parseYangSources("/openconfig-version/import/import-invalid-notsufficient-2", - StatementParserMode.OPENCONFIG_VER_MODE); - fail("Test should fail due to invalid import of openconfig-version module"); + StmtTestUtils.parseYangSources("/semantic-version/import/import-invalid-notsufficient-2", + StatementParserMode.SEMVER_MODE); + fail("Test should fail due to invalid import of semantic-version module"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage().startsWith( - "Unable to find module compatible with requested import " + "[openconfig-extensions(2.0.5)].")); + "Unable to find module compatible with requested import " + "[semantic-version(2.0.5)].")); } } } diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionMultipleImportTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionMultipleImportTest.java similarity index 66% rename from yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionMultipleImportTest.java rename to yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionMultipleImportTest.java index 90a19121c8..c8e4673ebb 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionMultipleImportTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionMultipleImportTest.java @@ -5,7 +5,7 @@ * 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.yangtools.yang.stmt.openconfigver; +package org.opendaylight.yangtools.yang.stmt.semver; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -23,14 +23,14 @@ import org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode; import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException; import org.opendaylight.yangtools.yang.stmt.StmtTestUtils; -public class OpenconfigVersionMultipleImportTest { +public class SemanticVersionMultipleImportTest { @Test public void multipleInvalidDeprecatedTest() throws Exception { try { - StmtTestUtils.parseYangSources("/openconfig-version/multiple/multiple-invalid-deprecated", - StatementParserMode.OPENCONFIG_VER_MODE); - fail("Test should fail due to invalid openconfig version"); + StmtTestUtils.parseYangSources("/semantic-version/multiple/multiple-invalid-deprecated", + StatementParserMode.SEMVER_MODE); + fail("Test should fail due to invalid semantic version"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage() .startsWith("Unable to find module compatible with requested import [bar(1.0.0)].")); @@ -40,9 +40,9 @@ public class OpenconfigVersionMultipleImportTest { @Test public void multipleInvalidNosufficientTest() throws Exception { try { - StmtTestUtils.parseYangSources("/openconfig-version/multiple/multiple-invalid-nosufficient", - StatementParserMode.OPENCONFIG_VER_MODE); - fail("Test should fail due to invalid openconfig version"); + StmtTestUtils.parseYangSources("/semantic-version/multiple/multiple-invalid-nosufficient", + StatementParserMode.SEMVER_MODE); + fail("Test should fail due to invalid semantic version"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage() .startsWith("Unable to find module compatible with requested import [bar(2.5.5)].")); @@ -51,34 +51,34 @@ public class OpenconfigVersionMultipleImportTest { @Test public void multipleValidDefaultsTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/multiple/multiple-valid-defaults", - StatementParserMode.OPENCONFIG_VER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/multiple/multiple-valid-defaults", + StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) + Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) .iterator().next(); - assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); Module bar = findImportedModule(context, foo, "bar"); - assertEquals(SemVer.valueOf("0.9.5"), bar.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.9.5"), bar.getSemanticVersion()); } @Test public void multipleValidSpecifiedTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/multiple/multiple-valid-specified", - StatementParserMode.OPENCONFIG_VER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/multiple/multiple-valid-specified", + StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) + Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) .iterator().next(); - assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); Module bar = findImportedModule(context, foo, "bar"); - assertEquals(SemVer.valueOf("5.5.6"), bar.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("5.5.6"), bar.getSemanticVersion()); } private static Module findImportedModule(final SchemaContext context, final Module rootModule, diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionPositionTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionPositionTest.java similarity index 56% rename from yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionPositionTest.java rename to yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionPositionTest.java index 2f5125c330..0c817baf00 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionPositionTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionPositionTest.java @@ -5,7 +5,7 @@ * 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.yangtools.yang.stmt.openconfigver; +package org.opendaylight.yangtools.yang.stmt.semver; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -18,53 +18,53 @@ import org.opendaylight.yangtools.yang.model.api.SchemaContext; import org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode; import org.opendaylight.yangtools.yang.stmt.StmtTestUtils; -public class OpenconfigVersionPositionTest { +public class SemanticVersionPositionTest { @Test public void positionHeadTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/position/position-head", - StatementParserMode.OPENCONFIG_VER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/position/position-head", + StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); Module bar = context.findModuleByNamespace(new URI("bar")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) + Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) .iterator().next(); - assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.2"), bar.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.2"), bar.getSemanticVersion()); } @Test public void positionMiddleTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/position/position-middle", - StatementParserMode.OPENCONFIG_VER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/position/position-middle", + StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); Module bar = context.findModuleByNamespace(new URI("bar")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) + Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) .iterator().next(); - assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.2"), bar.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.2"), bar.getSemanticVersion()); } @Test public void positiontailTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/position/position-tail", - StatementParserMode.OPENCONFIG_VER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/position/position-tail", + StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); Module bar = context.findModuleByNamespace(new URI("bar")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) + Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) .iterator().next(); - assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.2"), bar.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.2"), bar.getSemanticVersion()); } } diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionTest.java similarity index 63% rename from yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionTest.java rename to yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionTest.java index c88f9bcfb0..23c2b10466 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionTest.java @@ -5,7 +5,7 @@ * 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.yangtools.yang.stmt.openconfigver; +package org.opendaylight.yangtools.yang.stmt.semver; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -27,90 +27,90 @@ import org.opendaylight.yangtools.yang.model.util.SchemaContextUtil; import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException; import org.opendaylight.yangtools.yang.stmt.StmtTestUtils; -public class OpenconfigVersionTest { +public class SemanticVersionTest { @Test public void basicTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/basic", - StatementParserMode.OPENCONFIG_VER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/basic", + StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); Module bar = context.findModuleByNamespace(new URI("bar")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) + Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) .iterator().next(); - assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.2"), bar.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.2"), bar.getSemanticVersion()); } @Test public void basicTest2() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/basic-2", - StatementParserMode.OPENCONFIG_VER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/basic-2", + StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); Module bar = context.findModuleByNamespace(new URI("bar")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) + Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) .iterator().next(); - assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.2"), bar.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.2"), bar.getSemanticVersion()); } @Test public void basicTest3() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/basic-3", - StatementParserMode.OPENCONFIG_VER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/basic-3", + StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) + Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) .iterator().next(); - assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); } @Test public void basicImportTest1() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/basic-import-1", - StatementParserMode.OPENCONFIG_VER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/basic-import-1", + StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) + Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) .iterator().next(); - assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); Module bar = StmtTestUtils.findImportedModule(context, foo, "bar"); - assertEquals(SemVer.valueOf("0.1.2"), bar.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.2"), bar.getSemanticVersion()); } @Test public void multipleModulesTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/multiple-modules", - StatementParserMode.OPENCONFIG_VER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/multiple-modules", + StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) + Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) .iterator().next(); - assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); Module bar = StmtTestUtils.findImportedModule(context, foo, "bar"); - assertEquals(SemVer.valueOf("0.10.4"), bar.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.10.4"), bar.getSemanticVersion()); } @Test public void basicImportErrTest1() throws Exception { try { - StmtTestUtils.parseYangSources("/openconfig-version/basic-import-invalid-1", StatementParserMode.OPENCONFIG_VER_MODE); - fail("Test should fail due to invalid openconfig version"); + StmtTestUtils.parseYangSources("/semantic-version/basic-import-invalid-1", StatementParserMode.SEMVER_MODE); + fail("Test should fail due to invalid semantic version"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage() .startsWith("Unable to find module compatible with requested import [bar(0.1.2)].")); @@ -120,8 +120,8 @@ public class OpenconfigVersionTest { @Test public void basicImportErrTest2() throws Exception { try { - StmtTestUtils.parseYangSources("/openconfig-version/basic-import-invalid-2", StatementParserMode.OPENCONFIG_VER_MODE); - fail("Test should fail due to invalid openconfig version"); + StmtTestUtils.parseYangSources("/semantic-version/basic-import-invalid-2", StatementParserMode.SEMVER_MODE); + fail("Test should fail due to invalid semantic version"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage() .startsWith("Unable to find module compatible with requested import [bar(0.1.2)].")); @@ -130,18 +130,18 @@ public class OpenconfigVersionTest { @Test public void nodeTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/node-test", - StatementParserMode.OPENCONFIG_VER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/node-test", + StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) + Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) .iterator().next(); - assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("2016.1.1"), foo.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); + assertEquals(SemVer.valueOf("2016.1.1"), foo.getSemanticVersion()); Module bar = StmtTestUtils.findImportedModule(context, foo, "bar"); - assertEquals(SemVer.valueOf("2016.4.6"), bar.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("2016.4.6"), bar.getSemanticVersion()); QName root = QName.create("foo", "2016-01-01", "foo-root"); QName container20160404 = QName.create("foo", "2016-01-01", "con20160404"); diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/yin/YinOpenconfigVersionTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/yin/YinSemanticVersionTest.java similarity index 66% rename from yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/yin/YinOpenconfigVersionTest.java rename to yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/yin/YinSemanticVersionTest.java index 0ac9054381..1b1039b7da 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/yin/YinOpenconfigVersionTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/yin/YinSemanticVersionTest.java @@ -6,7 +6,7 @@ * and is available at http://www.eclipse.org/legal/epl-v10.html */ -package org.opendaylight.yangtools.yang.stmt.openconfigver.yin; +package org.opendaylight.yangtools.yang.stmt.semver.yin; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -25,46 +25,46 @@ import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException; import org.opendaylight.yangtools.yang.parser.spi.source.SourceException; import org.opendaylight.yangtools.yang.stmt.StmtTestUtils; -public class YinOpenconfigVersionTest { +public class YinSemanticVersionTest { @Test public void basicTest() throws SourceException, FileNotFoundException, ReactorException, URISyntaxException { - SchemaContext context = StmtTestUtils.parseYinSources("/openconfig-version/yin-input/basic", - StatementParserMode.OPENCONFIG_VER_MODE); + SchemaContext context = StmtTestUtils.parseYinSources("/semantic-version/yin-input/basic", + StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); Module bar = context.findModuleByNamespace(new URI("bar")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) + Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) .iterator().next(); - assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.2"), bar.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.2"), bar.getSemanticVersion()); } @Test public void basicImportTest1() throws SourceException, FileNotFoundException, ReactorException, URISyntaxException { - SchemaContext context = StmtTestUtils.parseYinSources("/openconfig-version/yin-input/basic-import", - StatementParserMode.OPENCONFIG_VER_MODE); + SchemaContext context = StmtTestUtils.parseYinSources("/semantic-version/yin-input/basic-import", + StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) + Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) .iterator().next(); - assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); Module bar = StmtTestUtils.findImportedModule(context, foo, "bar"); - assertEquals(SemVer.valueOf("0.1.2"), bar.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.2"), bar.getSemanticVersion()); } @Test public void basicImportErrTest1() throws SourceException, FileNotFoundException, ReactorException, URISyntaxException { try { - StmtTestUtils.parseYinSources("/openconfig-version/yin-input/basic-import-invalid", StatementParserMode.OPENCONFIG_VER_MODE); - fail("Test should fail due to invalid openconfig version"); + StmtTestUtils.parseYinSources("/semantic-version/yin-input/basic-import-invalid", StatementParserMode.SEMVER_MODE); + fail("Test should fail due to invalid semantic version"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage() .startsWith("Unable to find module compatible with requested import [bar(0.1.2)].")); diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-2/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-2/openconfig-extensions.yang deleted file mode 100644 index 23e90e3f34..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-2/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-3/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-3/foo.yang deleted file mode 100644 index 3945e5439d..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-3/foo.yang +++ /dev/null @@ -1,15 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/foo.yang deleted file mode 100644 index 1a1c25a5c7..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - import bar { prefix bar; oc-ext:openconfig-version "0.1.2";} - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/foo.yang deleted file mode 100644 index 1a1c25a5c7..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - import bar { prefix bar; oc-ext:openconfig-version "0.1.2";} - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-2/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-2/foo.yang deleted file mode 100644 index 2b37c2422b..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-2/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - import bar { prefix bar; revision-date 2016-01-31; oc-ext:openconfig-version "0.1.2";} - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-2/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-2/openconfig-extensions.yang deleted file mode 100644 index 23e90e3f34..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-2/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic/foo.yang deleted file mode 100644 index 2b37c2422b..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - import bar { prefix bar; revision-date 2016-01-31; oc-ext:openconfig-version "0.1.2";} - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic/openconfig-extensions.yang deleted file mode 100644 index 23e90e3f34..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/foo.yang deleted file mode 100644 index 4edb32ed1c..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - import bar { prefix bar; oc-ext:openconfig-version "5.5.5"; } - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/openconfig-extensions.yang deleted file mode 100644 index 23e90e3f34..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/foo.yang deleted file mode 100644 index 4edb32ed1c..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - import bar { prefix bar; oc-ext:openconfig-version "5.5.5"; } - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/openconfig-extensions.yang deleted file mode 100644 index 23e90e3f34..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/bar@2016-01-01.yang deleted file mode 100644 index 68b2f665e0..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - oc-ext:openconfig-version "5.5.2"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/foo.yang deleted file mode 100644 index 4edb32ed1c..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - import bar { prefix bar; oc-ext:openconfig-version "5.5.5"; } - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/openconfig-extensions.yang deleted file mode 100644 index 23e90e3f34..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/bar@2016-01-01.yang deleted file mode 100644 index 38172e4baa..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - oc-ext:openconfig-version "4.5.5"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/foo.yang deleted file mode 100644 index 4edb32ed1c..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - import bar { prefix bar; oc-ext:openconfig-version "5.5.5"; } - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/openconfig-extensions.yang deleted file mode 100644 index 23e90e3f34..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-01.yang deleted file mode 100644 index 5f6dfc8f8f..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - oc-ext:openconfig-version "5.4.5"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-02.yang deleted file mode 100644 index 2221251649..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-02.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-02" { - description "Initial version"; - } - oc-ext:openconfig-version "5.5.5"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-03.yang deleted file mode 100644 index 00929184e2..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-03.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-03" { - description "Initial version"; - } - oc-ext:openconfig-version "5.6.5"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/foo.yang deleted file mode 100644 index 4edb32ed1c..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - import bar { prefix bar; oc-ext:openconfig-version "5.5.5"; } - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/openconfig-extensions.yang deleted file mode 100644 index 23e90e3f34..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-01.yang deleted file mode 100644 index 6f0b2ae242..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - oc-ext:openconfig-version "5.5.4"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-02.yang deleted file mode 100644 index 2221251649..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-02.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-02" { - description "Initial version"; - } - oc-ext:openconfig-version "5.5.5"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-03.yang deleted file mode 100644 index 2b35449bb8..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-03.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-03" { - description "Initial version"; - } - oc-ext:openconfig-version "5.5.6"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/foo.yang deleted file mode 100644 index 4edb32ed1c..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - import bar { prefix bar; oc-ext:openconfig-version "5.5.5"; } - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/openconfig-extensions.yang deleted file mode 100644 index 23e90e3f34..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/foo.yang deleted file mode 100644 index 9caffd9106..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/foo.yang +++ /dev/null @@ -1,13 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "1.0.0"; } - import bar { prefix bar; oc-ext:openconfig-version "1.2.5"; } - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "1.50.02"; -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/openconfig-extensions.yang deleted file mode 100644 index 6cff937b92..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "1.3.95"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foo.yang deleted file mode 100644 index 5f534911c7..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foo.yang +++ /dev/null @@ -1,13 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.5.40"; } - import bar { prefix bar; oc-ext:openconfig-version "4.1.1"; } - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "2.32.2"; -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/openconfig-extensions.yang deleted file mode 100644 index 9b021b6590..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "2.5.50"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-invalid/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-invalid/openconfig-extensions.yang deleted file mode 100644 index 23e90e3f34..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-invalid/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-valid/bar.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-valid/bar.yang deleted file mode 100644 index 62e0506d75..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-valid/bar.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-31" { - description "Initial version"; - } - oc-ext:openconfig-version "0.99.99"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-valid/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-valid/openconfig-extensions.yang deleted file mode 100644 index 23e90e3f34..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-valid/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/bar@2016-01-01.yang deleted file mode 100644 index 2a435be8fa..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.2"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/foo.yang deleted file mode 100644 index 2b37c2422b..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - import bar { prefix bar; revision-date 2016-01-31; oc-ext:openconfig-version "0.1.2";} - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/openconfig-extensions.yang deleted file mode 100644 index 23e90e3f34..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/bar@2016-01-01.yang deleted file mode 100644 index 2a435be8fa..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.2"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/foo.yang deleted file mode 100644 index 2b37c2422b..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - import bar { prefix bar; revision-date 2016-01-31; oc-ext:openconfig-version "0.1.2";} - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/openconfig-extensions.yang deleted file mode 100644 index 23e90e3f34..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-1/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-1/openconfig-extensions.yang deleted file mode 100644 index 4601af98ba..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-1/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "2.0.0"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-2/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-2/openconfig-extensions.yang deleted file mode 100644 index a310b5cadc..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-2/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "1.0.0"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-1/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-1/openconfig-extensions.yang deleted file mode 100644 index a310b5cadc..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-1/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "1.0.0"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-2/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-2/openconfig-extensions.yang deleted file mode 100644 index 4601af98ba..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-2/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "2.0.0"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-valid/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-valid/foo.yang deleted file mode 100644 index 7d043d9f43..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-valid/foo.yang +++ /dev/null @@ -1,14 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "1.0.0"; } - - revision "2016-02-01" { - description "Initial version"; - } - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-valid/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-valid/openconfig-extensions.yang deleted file mode 100644 index a310b5cadc..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-valid/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "1.0.0"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-01.yang deleted file mode 100644 index ff09241e6e..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-02.yang deleted file mode 100644 index 4280db0c12..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-02.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-02" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.2"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-03.yang deleted file mode 100644 index c2ff5a957d..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-03.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-03" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.3"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-31.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-31.yang deleted file mode 100644 index 2e84793fd7..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-31.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-31" { - description "Initial version"; - } - oc-ext:openconfig-version "1.1.2"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/foo.yang deleted file mode 100644 index 1a1c25a5c7..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - import bar { prefix bar; oc-ext:openconfig-version "0.1.2";} - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/openconfig-extensions.yang deleted file mode 100644 index 23e90e3f34..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-01-01.yang deleted file mode 100644 index f701a5be23..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - oc-ext:openconfig-version "2.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-01-02.yang deleted file mode 100644 index c65cd27e2a..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-01-02.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-02" { - description "Initial version"; - } - oc-ext:openconfig-version "2.1.2"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/foo.yang deleted file mode 100644 index 243aa3504a..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - import bar { prefix bar; revision-date 2016-01-31; oc-ext:openconfig-version "1.0.0"; } - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/openconfig-extensions.yang deleted file mode 100644 index 23e90e3f34..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-01-01.yang deleted file mode 100644 index ae8c8d5184..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - oc-ext:openconfig-version "2.0.0"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-01-02.yang deleted file mode 100644 index 7aff7c5956..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-01-02.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-02" { - description "Initial version"; - } - oc-ext:openconfig-version "2.1.0"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/foo.yang deleted file mode 100644 index f5c591b85e..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - import bar { prefix bar; oc-ext:openconfig-version "2.5.5"; } - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/openconfig-extensions.yang deleted file mode 100644 index 23e90e3f34..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-01-01.yang deleted file mode 100644 index 5679d89d6d..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.0.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-01-02.yang deleted file mode 100644 index 0f94048b8b..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-01-02.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-02" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.0"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/openconfig-extensions.yang deleted file mode 100644 index 23e90e3f34..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-01-01.yang deleted file mode 100644 index 720eee21e2..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - oc-ext:openconfig-version "4.4.0"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-01-02.yang deleted file mode 100644 index a6116f3e96..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-01-02.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-02" { - description "Initial version"; - } - oc-ext:openconfig-version "5.5.0"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/foo.yang deleted file mode 100644 index 4edb32ed1c..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - import bar { prefix bar; oc-ext:openconfig-version "5.5.5"; } - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/openconfig-extensions.yang deleted file mode 100644 index 23e90e3f34..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/foo.yang deleted file mode 100644 index c723cc5732..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/foo.yang +++ /dev/null @@ -1,18 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - import bar { prefix bar; revision-date 2017-04-06; oc-ext:openconfig-version "2016.4.5"; } - - revision 2016-01-01 { - description "test"; - } - - oc-ext:openconfig-version "2016.1.1"; - - container foo-root { - uses bar:grp; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/openconfig-extensions.yang deleted file mode 100644 index 23e90e3f34..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/bar@2016-01-01.yang deleted file mode 100644 index 2a435be8fa..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.2"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/foo.yang deleted file mode 100644 index 2b37c2422b..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - import bar { prefix bar; revision-date 2016-01-31; oc-ext:openconfig-version "0.1.2";} - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/openconfig-extensions.yang deleted file mode 100644 index 23e90e3f34..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-head/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-head/foo.yang deleted file mode 100644 index 41b5fdf39a..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-head/foo.yang +++ /dev/null @@ -1,17 +0,0 @@ -module foo { - oc-ext:openconfig-version "0.1.1"; - import bar { prefix bar; revision-date 2016-01-31; oc-ext:openconfig-version "0.1.2";} - - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-02-01" { - description "Initial version"; - } - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/bar.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/bar.yang deleted file mode 100644 index b973ab3f4c..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/bar.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-31" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.2"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/foo.yang deleted file mode 100644 index 2b37c2422b..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - import bar { prefix bar; revision-date 2016-01-31; oc-ext:openconfig-version "0.1.2";} - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/openconfig-extensions.yang deleted file mode 100644 index 23e90e3f34..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-tail/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-tail/foo.yang deleted file mode 100644 index 005ef0b304..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-tail/foo.yang +++ /dev/null @@ -1,17 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-02-01" { - description "Initial version"; - } - - container root { - } - - oc-ext:openconfig-version "0.1.1"; - import bar { prefix bar; revision-date 2016-01-31; oc-ext:openconfig-version "0.1.2";} -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-tail/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-tail/openconfig-extensions.yang deleted file mode 100644 index 40d9fb97cc..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-tail/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } - - oc-ext:openconfig-version "0.0.1"; -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/bar@2016-01-01.yang deleted file mode 100644 index 2a435be8fa..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.2"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/foo.yang deleted file mode 100644 index 67ef0679ce..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } - import bar { prefix bar; revision-date 2016-01-01; oc-ext:openconfig-version "0.1.2";} - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/openconfig-extensions.yang deleted file mode 100644 index 23e90e3f34..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/openconfig-extensions@2017-01-29.yin b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/openconfig-extensions@2017-01-29.yin deleted file mode 100644 index e93a5a76fb..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/openconfig-extensions@2017-01-29.yin +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - OpenConfig working group - - - OpenConfig working group www.openconfig.net - - - - This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined. - - - - - Added extension for annotating encrypted values. - - - TBD - - - - - Initial OpenConfig public release - - - TBD - - - - - Initial revision - - - TBD - - - - - - - - - - The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data. - - - - - - - This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext. - - - - \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/openconfig-extensions@2016-01-29.yin b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/openconfig-extensions@2016-01-29.yin deleted file mode 100644 index e93a5a76fb..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/openconfig-extensions@2016-01-29.yin +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - OpenConfig working group - - - OpenConfig working group www.openconfig.net - - - - This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined. - - - - - Added extension for annotating encrypted values. - - - TBD - - - - - Initial OpenConfig public release - - - TBD - - - - - Initial revision - - - TBD - - - - - - - - - - The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data. - - - - - - - This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext. - - - - \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic/bar@2016-01-31.yin b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic/bar@2016-01-31.yin deleted file mode 100644 index a3a644f944..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic/bar@2016-01-31.yin +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic/openconfig-extensions@2017-01-29.yin b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic/openconfig-extensions@2017-01-29.yin deleted file mode 100644 index e93a5a76fb..0000000000 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic/openconfig-extensions@2017-01-29.yin +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - OpenConfig working group - - - OpenConfig working group www.openconfig.net - - - - This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined. - - - - - Added extension for annotating encrypted values. - - - TBD - - - - - Initial OpenConfig public release - - - TBD - - - - - Initial revision - - - TBD - - - - - - - - - - The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data. - - - - - - - This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext. - - - - \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/foo.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/foo.yang deleted file mode 100644 index 087c05f8b3..0000000000 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/foo.yang +++ /dev/null @@ -1,13 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1.1; - - import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "1.0.0"; } - import bar { prefix bar; oc-ext:openconfig-version "1.2.5"; } - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "1.50.02"; -} diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/openconfig-extensions.yang deleted file mode 100644 index ff84c41722..0000000000 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1.1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "1.3.95"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foo.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foo.yang deleted file mode 100644 index 734f5543c1..0000000000 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foo.yang +++ /dev/null @@ -1,13 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1.1; - - import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.5.40"; } - import bar { prefix bar; oc-ext:openconfig-version "4.1.1"; } - - revision "2016-02-01" { - description "Initial version"; - } - oc-ext:openconfig-version "2.32.2"; -} diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/openconfig-extensions.yang deleted file mode 100644 index 9b021b6590..0000000000 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/openconfig-extensions.yang +++ /dev/null @@ -1,84 +0,0 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; - - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; - } - - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "2.5.50"; - - extension openconfig-version { - argument "semver" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/bar@2016-01-03.yang similarity index 64% rename from yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/bar@2016-01-03.yang rename to yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/bar@2016-01-03.yang index 3f495b84be..207b4bdb84 100644 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/bar@2016-01-03.yang +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/bar@2016-01-03.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1.1; - import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "1.2.012"; } - import foobar { prefix foobar; oc-ext:openconfig-version "2.25.3"; } + import semantic-version { prefix sv; sv:semantic-version "1.2.012"; } + import foobar { prefix foobar; sv:semantic-version "2.25.3"; } revision "2016-01-03" { description "Imported version"; } - oc-ext:openconfig-version "1.2.6"; + sv:semantic-version "1.2.6"; container root { container test-container { diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/bar@2016-01-04.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/bar@2016-01-04.yang similarity index 64% rename from yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/bar@2016-01-04.yang rename to yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/bar@2016-01-04.yang index 7490e8df60..8328cbecca 100644 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/bar@2016-01-04.yang +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/bar@2016-01-04.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1.1; - import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "1.2.210"; } - import foobar { prefix foobar; oc-ext:openconfig-version "2.25.3"; } + import semantic-version { prefix sv; sv:semantic-version "1.2.210"; } + import foobar { prefix foobar; sv:semantic-version "2.25.3"; } revision "2016-01-04" { description "Not-imported version"; } - oc-ext:openconfig-version "2.200.200"; + sv:semantic-version "2.200.200"; container root { container test-container { diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/foo.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/foo.yang new file mode 100644 index 0000000000..e3828f085f --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/foo.yang @@ -0,0 +1,13 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1.1; + + import semantic-version { prefix sv; sv:semantic-version "1.0.0"; } + import bar { prefix bar; sv:semantic-version "1.2.5"; } + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "1.50.02"; +} diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/foobar@2016-01-31.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/foobar@2016-01-31.yang similarity index 74% rename from yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/foobar@2016-01-31.yang rename to yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/foobar@2016-01-31.yang index 89863b20a1..773bc65a7a 100644 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/foobar@2016-01-31.yang +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/foobar@2016-01-31.yang @@ -3,12 +3,12 @@ module foobar { prefix foobar; yang-version 1.1; - import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "1.2.95"; } + import semantic-version { prefix sv; sv:semantic-version "1.2.95"; } revision "2016-01-31" { description "Not-imported version"; } - oc-ext:openconfig-version "2.25.2"; + sv:semantic-version "2.25.2"; grouping test-grouping { leaf name { diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/foobar@2016-02-28.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/foobar@2016-02-28.yang similarity index 74% rename from yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/foobar@2016-02-28.yang rename to yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/foobar@2016-02-28.yang index 132e305b21..4c92e9f30f 100644 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/foobar@2016-02-28.yang +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/foobar@2016-02-28.yang @@ -3,12 +3,12 @@ module foobar { prefix foobar; yang-version 1.1; - import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "1.3.95"; } + import semantic-version { prefix sv; sv:semantic-version "1.3.95"; } revision "2016-02-28" { description "Imported version"; } - oc-ext:openconfig-version "2.26.465"; + sv:semantic-version "2.26.465"; grouping test-grouping { leaf name { diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/semantic-version.yang similarity index 51% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/openconfig-extensions.yang rename to yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/semantic-version.yang index 23e90e3f34..14dc274ebe 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/openconfig-extensions.yang +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/semantic-version.yang @@ -1,40 +1,15 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1.1; - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; + revision 2016-02-02 { + description "Initial verison"; } + sv:semantic-version "1.3.95"; - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { + extension semantic-version { + argument "semantic-version" { yin-element false; } description @@ -69,16 +44,4 @@ module openconfig-extensions { The version number is stored in the module meta-data."; } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file +} diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/bar@2016-01-03.yang similarity index 64% rename from yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/bar@2016-01-03.yang rename to yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/bar@2016-01-03.yang index fe922ff142..f11bdb0943 100644 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/bar@2016-01-03.yang +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/bar@2016-01-03.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.0.40"; } - import foobar { prefix foobar; oc-ext:openconfig-version "7.12.54"; } + import semantic-version { prefix sv; sv:semantic-version "2.0.40"; } + import foobar { prefix foobar; sv:semantic-version "7.12.54"; } revision "2016-01-03" { description "Imported version"; } - oc-ext:openconfig-version "4.9.8"; + sv:semantic-version "4.9.8"; augment "/foobar:root/foobar:test-container" { leaf should-present-leaf-1 { diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/bar@2016-01-04.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/bar@2016-01-04.yang similarity index 66% rename from yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/bar@2016-01-04.yang rename to yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/bar@2016-01-04.yang index 858bb0466d..712b379c01 100644 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/bar@2016-01-04.yang +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/bar@2016-01-04.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1.1; - import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.0.50"; } - import foobar { prefix foobar; oc-ext:openconfig-version "7.12.54"; } + import semantic-version { prefix sv; sv:semantic-version "2.0.50"; } + import foobar { prefix foobar; sv:semantic-version "7.12.54"; } revision "2016-01-04" { description "Not-imported version"; } - oc-ext:openconfig-version "3.0.5"; + sv:semantic-version "3.0.5"; augment "/foobar:root/foobar:test-container" { leaf should-not-be-present-leaf-1 { diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foo.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foo.yang new file mode 100644 index 0000000000..3955eb50f4 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foo.yang @@ -0,0 +1,13 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1.1; + + import semantic-version { prefix sv; sv:semantic-version "2.5.40"; } + import bar { prefix bar; sv:semantic-version "4.1.1"; } + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "2.32.2"; +} diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foobar@2016-01-31.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foobar@2016-01-31.yang similarity index 70% rename from yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foobar@2016-01-31.yang rename to yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foobar@2016-01-31.yang index 7c7ac1aaa3..435bea628d 100644 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foobar@2016-01-31.yang +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foobar@2016-01-31.yang @@ -3,12 +3,12 @@ module foobar { prefix foobar; yang-version 1; - import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.1.950"; } + import semantic-version { prefix sv; sv:semantic-version "2.1.950"; } revision "2016-01-31" { description "Not-imported version"; } - oc-ext:openconfig-version "8.0.0"; + sv:semantic-version "8.0.0"; container root { leaf included-not-correct-mark { diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foobar@2016-02-27.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foobar@2016-02-27.yang similarity index 70% rename from yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foobar@2016-02-27.yang rename to yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foobar@2016-02-27.yang index 930c1162f4..8b8f48e1a7 100644 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foobar@2016-02-27.yang +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foobar@2016-02-27.yang @@ -3,12 +3,12 @@ module foobar { prefix foobar; yang-version 1; - import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.5.50"; } + import semantic-version { prefix sv; sv:semantic-version "2.5.50"; } revision "2016-02-27" { description "Not-imported version"; } - oc-ext:openconfig-version "7.13.0"; + sv:semantic-version "7.13.0"; container root { leaf included-not-correct-mark { diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foobar@2016-02-28.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foobar@2016-02-28.yang similarity index 70% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foobar@2016-02-28.yang rename to yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foobar@2016-02-28.yang index 676834c3dd..c45a020a52 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foobar@2016-02-28.yang +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foobar@2016-02-28.yang @@ -3,12 +3,12 @@ module foobar { prefix foobar; yang-version 1; - import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.5.50"; } + import semantic-version { prefix sv; sv:semantic-version "2.5.50"; } revision "2016-02-28" { description "Imported version"; } - oc-ext:openconfig-version "7.13.99"; + sv:semantic-version "7.13.99"; container root { leaf included-correct-mark { diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/semantic-version.yang similarity index 51% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/openconfig-extensions.yang rename to yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/semantic-version.yang index 23e90e3f34..a7e5ba2a62 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/openconfig-extensions.yang +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/semantic-version.yang @@ -1,40 +1,15 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; + revision 2016-02-02 { + description "Initial verison"; } + sv:semantic-version "2.5.50"; - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { + extension semantic-version { + argument "semantic-version" { yin-element false; } description @@ -69,16 +44,4 @@ module openconfig-extensions { The version number is stored in the module meta-data."; } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-2/bar.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-2/bar.yang similarity index 60% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/basic-2/bar.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/basic-2/bar.yang index 64c9a19254..5664e68ba9 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-2/bar.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-2/bar.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29;} + import semantic-version { prefix sv; revision-date 2016-02-02;} revision "2016-01-31" { description "Initial version"; } - oc-ext:openconfig-version "0.1.2"; + sv:semantic-version "0.1.2"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-2/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-2/foo.yang similarity index 66% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/basic-2/foo.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/basic-2/foo.yang index 22a7e1571f..01fe8e8905 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-2/foo.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-2/foo.yang @@ -3,13 +3,13 @@ module foo { prefix foo; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29;} + import semantic-version { prefix sv; revision-date 2016-02-02;} import bar { prefix bar; revision-date 2016-01-31;} revision "2016-02-01" { description "Initial version"; } - oc-ext:openconfig-version "0.1.1"; + sv:semantic-version "0.1.1"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-2/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-2/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-2/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-3/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-3/foo.yang new file mode 100644 index 0000000000..537f5d7ac6 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-3/foo.yang @@ -0,0 +1,15 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-3/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-3/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-3/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/bar@2016-01-01.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/bar@2016-01-01.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/bar@2016-01-01.yang index eca43da12e..54da0db564 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/bar@2016-01-01.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/bar@2016-01-01.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-01-01" { description "Initial version"; } - oc-ext:openconfig-version "5.2.5"; + sv:semantic-version "0.1.2"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/bar@2016-01-31.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/bar@2016-01-31.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/bar@2016-01-31.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/bar@2016-01-31.yang index 2e84793fd7..e61a340d48 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/bar@2016-01-31.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/bar@2016-01-31.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-01-31" { description "Initial version"; } - oc-ext:openconfig-version "1.1.2"; + sv:semantic-version "1.1.2"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/foo.yang new file mode 100644 index 0000000000..220c9cc582 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import bar { prefix bar; sv:semantic-version "0.1.2";} + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/bar@2016-01-01.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/bar@2016-01-01.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/bar@2016-01-01.yang index 5ccae0cdcf..2e94728149 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/bar@2016-01-01.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/bar@2016-01-01.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-01-01" { description "Initial version"; } - oc-ext:openconfig-version "2.5.5"; + sv:semantic-version "1.1.2"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/bar@2016-01-31.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/bar@2016-01-31.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/bar@2016-01-31.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/bar@2016-01-31.yang index 4f4f69514c..d3d101b61b 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/bar@2016-01-31.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/bar@2016-01-31.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-01-31" { description "Initial version"; } - oc-ext:openconfig-version "1.1.3"; + sv:semantic-version "1.1.3"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/foo.yang new file mode 100644 index 0000000000..220c9cc582 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import bar { prefix bar; sv:semantic-version "0.1.2";} + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic/bar.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-2/bar.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/basic/bar.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-2/bar.yang index b973ab3f4c..e61a340d48 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic/bar.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-2/bar.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-01-31" { description "Initial version"; } - oc-ext:openconfig-version "0.1.2"; + sv:semantic-version "1.1.2"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-2/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-2/foo.yang new file mode 100644 index 0000000000..dda1144dff --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-2/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import bar { prefix bar; revision-date 2016-01-31; sv:semantic-version "0.1.2";} + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-2/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-2/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-2/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-invalid/bar.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic/bar.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-invalid/bar.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/basic/bar.yang index 049c662137..2adc1363ba 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-invalid/bar.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/basic/bar.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-01-31" { description "Initial version"; } - oc-ext:openconfig-version "1.0.0"; + sv:semantic-version "0.1.2"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic/foo.yang new file mode 100644 index 0000000000..dda1144dff --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/basic/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import bar { prefix bar; revision-date 2016-01-31; sv:semantic-version "0.1.2";} + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/basic/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/bar@2016-01-01.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/bar@2016-01-01.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/bar@2016-01-01.yang index e1c85adb8b..e016dde777 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/bar@2016-01-01.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/bar@2016-01-01.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-01-01" { description "Initial version"; } - oc-ext:openconfig-version "1.1.2"; + sv:semantic-version "2.5.5"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/bar@2016-01-02.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/bar@2016-01-02.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/bar@2016-01-02.yang index 2221251649..fa2cc103a5 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/bar@2016-01-02.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/bar@2016-01-02.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-01-02" { description "Initial version"; } - oc-ext:openconfig-version "5.5.5"; + sv:semantic-version "3.5.5"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/bar@2016-01-03.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/bar@2016-01-03.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/bar@2016-01-03.yang index 2aa155d43b..8bbaa12721 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/bar@2016-01-03.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/bar@2016-01-03.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-01-03" { description "Initial version"; } - oc-ext:openconfig-version "6.5.5"; + sv:semantic-version "4.5.5"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/foo.yang new file mode 100644 index 0000000000..c89c60d0df --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import bar { prefix bar; sv:semantic-version "5.5.5"; } + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/bar@2016-01-01.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/bar@2016-01-01.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/bar@2016-01-01.yang index 2a435be8fa..06c3e48f38 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/bar@2016-01-01.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/bar@2016-01-01.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-01-01" { description "Initial version"; } - oc-ext:openconfig-version "0.1.2"; + sv:semantic-version "5.2.5"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/bar@2016-01-02.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/bar@2016-01-02.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/bar@2016-01-02.yang index 4cc416c5b3..0b59caee3a 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/bar@2016-01-02.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/bar@2016-01-02.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-01-02" { description "Initial version"; } - oc-ext:openconfig-version "3.5.5"; + sv:semantic-version "5.3.5"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/bar@2016-01-03.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/bar@2016-01-03.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/bar@2016-01-03.yang index 7ba0f33e95..4826af89a6 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/bar@2016-01-03.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/bar@2016-01-03.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-01-03" { description "Initial version"; } - oc-ext:openconfig-version "4.5.5"; + sv:semantic-version "5.4.5"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/foo.yang new file mode 100644 index 0000000000..c89c60d0df --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import bar { prefix bar; sv:semantic-version "5.5.5"; } + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/bar@2016-01-01.yang new file mode 100644 index 0000000000..f6dd765b7f --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + sv:semantic-version "5.5.2"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/bar@2016-01-02.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/bar@2016-01-02.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/bar@2016-01-02.yang index dc86015a47..1398079f2c 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/bar@2016-01-02.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/bar@2016-01-02.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-01-02" { description "Initial version"; } - oc-ext:openconfig-version "5.3.5"; + sv:semantic-version "5.5.3"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/bar@2016-01-03.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/bar@2016-01-03.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/bar@2016-01-03.yang index 5a3afb60a5..714f1de10b 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/bar@2016-01-03.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/bar@2016-01-03.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-01-03" { description "Initial version"; } - oc-ext:openconfig-version "5.4.5"; + sv:semantic-version "5.5.4"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/foo.yang new file mode 100644 index 0000000000..c89c60d0df --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import bar { prefix bar; sv:semantic-version "5.5.5"; } + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/bar@2016-01-01.yang new file mode 100644 index 0000000000..c331b9ec67 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + sv:semantic-version "4.5.5"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/bar@2016-01-02.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/bar@2016-01-02.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/bar@2016-01-02.yang index b780b3db4b..920c18af50 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/bar@2016-01-02.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/bar@2016-01-02.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-01-02" { description "Initial version"; } - oc-ext:openconfig-version "5.5.3"; + sv:semantic-version "5.5.5"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/bar@2016-01-03.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/bar@2016-01-03.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/bar@2016-01-03.yang index 391975aa77..f04a98e343 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/bar@2016-01-03.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/bar@2016-01-03.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-01-03" { description "Initial version"; } - oc-ext:openconfig-version "5.5.4"; + sv:semantic-version "6.5.5"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/foo.yang new file mode 100644 index 0000000000..c89c60d0df --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import bar { prefix bar; sv:semantic-version "5.5.5"; } + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-01.yang new file mode 100644 index 0000000000..c129995474 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + sv:semantic-version "5.4.5"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-02.yang new file mode 100644 index 0000000000..920c18af50 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-02.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-02" { + description "Initial version"; + } + sv:semantic-version "5.5.5"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-03.yang new file mode 100644 index 0000000000..da8327c89d --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-03.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-03" { + description "Initial version"; + } + sv:semantic-version "5.6.5"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/foo.yang new file mode 100644 index 0000000000..c89c60d0df --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import bar { prefix bar; sv:semantic-version "5.5.5"; } + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-01.yang new file mode 100644 index 0000000000..939c7e81fd --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + sv:semantic-version "5.5.4"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-02.yang new file mode 100644 index 0000000000..920c18af50 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-02.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-02" { + description "Initial version"; + } + sv:semantic-version "5.5.5"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-03.yang new file mode 100644 index 0000000000..5d3f96d0ff --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-03.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-03" { + description "Initial version"; + } + sv:semantic-version "5.5.6"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/foo.yang new file mode 100644 index 0000000000..c89c60d0df --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import bar { prefix bar; sv:semantic-version "5.5.5"; } + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/bar@2016-01-03.yang similarity index 64% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/bar@2016-01-03.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/bar@2016-01-03.yang index 138dbad9fd..a7b14f1dfe 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/bar@2016-01-03.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/bar@2016-01-03.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "1.2.012"; } - import foobar { prefix foobar; oc-ext:openconfig-version "2.25.3"; } + import semantic-version { prefix sv; sv:semantic-version "1.2.012"; } + import foobar { prefix foobar; sv:semantic-version "2.25.3"; } revision "2016-01-03" { description "Imported version"; } - oc-ext:openconfig-version "1.2.6"; + sv:semantic-version "1.2.6"; container root { container test-container { diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/bar@2016-01-04.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/bar@2016-01-04.yang similarity index 64% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/bar@2016-01-04.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/bar@2016-01-04.yang index 10d176b9f5..eaff86f9c6 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/bar@2016-01-04.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/bar@2016-01-04.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "1.2.210"; } - import foobar { prefix foobar; oc-ext:openconfig-version "2.25.3"; } + import semantic-version { prefix sv; sv:semantic-version "1.2.210"; } + import foobar { prefix foobar; sv:semantic-version "2.25.3"; } revision "2016-01-04" { description "Not-imported version"; } - oc-ext:openconfig-version "2.200.200"; + sv:semantic-version "2.200.200"; container root { container test-container { diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/foo.yang new file mode 100644 index 0000000000..bce4b87d0b --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/foo.yang @@ -0,0 +1,13 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; sv:semantic-version "1.0.0"; } + import bar { prefix bar; sv:semantic-version "1.2.5"; } + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "1.50.02"; +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/foobar@2016-01-31.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/foobar@2016-01-31.yang similarity index 74% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/foobar@2016-01-31.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/foobar@2016-01-31.yang index 173082532d..6efe81dfc9 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/foobar@2016-01-31.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/foobar@2016-01-31.yang @@ -3,12 +3,12 @@ module foobar { prefix foobar; yang-version 1; - import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "1.2.95"; } + import semantic-version { prefix sv; sv:semantic-version "1.2.95"; } revision "2016-01-31" { description "Not-imported version"; } - oc-ext:openconfig-version "2.25.2"; + sv:semantic-version "2.25.2"; grouping test-grouping { leaf name { diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/foobar@2016-02-28.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/foobar@2016-02-28.yang similarity index 74% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/foobar@2016-02-28.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/foobar@2016-02-28.yang index 5e647e9c30..867d25eb0b 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/foobar@2016-02-28.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/foobar@2016-02-28.yang @@ -3,12 +3,12 @@ module foobar { prefix foobar; yang-version 1; - import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "1.3.95"; } + import semantic-version { prefix sv; sv:semantic-version "1.3.95"; } revision "2016-02-28" { description "Imported version"; } - oc-ext:openconfig-version "2.26.465"; + sv:semantic-version "2.26.465"; grouping test-grouping { leaf name { diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/semantic-version.yang new file mode 100644 index 0000000000..a8de91cac2 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "1.3.95"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/bar@2016-01-03.yang similarity index 64% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/bar@2016-01-03.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/bar@2016-01-03.yang index fe922ff142..f11bdb0943 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/bar@2016-01-03.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/bar@2016-01-03.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.0.40"; } - import foobar { prefix foobar; oc-ext:openconfig-version "7.12.54"; } + import semantic-version { prefix sv; sv:semantic-version "2.0.40"; } + import foobar { prefix foobar; sv:semantic-version "7.12.54"; } revision "2016-01-03" { description "Imported version"; } - oc-ext:openconfig-version "4.9.8"; + sv:semantic-version "4.9.8"; augment "/foobar:root/foobar:test-container" { leaf should-present-leaf-1 { diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/bar@2016-01-04.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/bar@2016-01-04.yang similarity index 65% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/bar@2016-01-04.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/bar@2016-01-04.yang index c232860931..1066b8a9b6 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/bar@2016-01-04.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/bar@2016-01-04.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.0.50"; } - import foobar { prefix foobar; oc-ext:openconfig-version "7.12.54"; } + import semantic-version { prefix sv; sv:semantic-version "2.0.50"; } + import foobar { prefix foobar; sv:semantic-version "7.12.54"; } revision "2016-01-04" { description "Not-imported version"; } - oc-ext:openconfig-version "3.0.5"; + sv:semantic-version "3.0.5"; augment "/foobar:root/foobar:test-container" { leaf should-not-be-present-leaf-1 { diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foo.yang new file mode 100644 index 0000000000..5be60d8920 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foo.yang @@ -0,0 +1,13 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; sv:semantic-version "2.5.40"; } + import bar { prefix bar; sv:semantic-version "4.1.1"; } + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "2.32.2"; +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foobar@2016-01-31.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foobar@2016-01-31.yang similarity index 70% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foobar@2016-01-31.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foobar@2016-01-31.yang index 7c7ac1aaa3..435bea628d 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foobar@2016-01-31.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foobar@2016-01-31.yang @@ -3,12 +3,12 @@ module foobar { prefix foobar; yang-version 1; - import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.1.950"; } + import semantic-version { prefix sv; sv:semantic-version "2.1.950"; } revision "2016-01-31" { description "Not-imported version"; } - oc-ext:openconfig-version "8.0.0"; + sv:semantic-version "8.0.0"; container root { leaf included-not-correct-mark { diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foobar@2016-02-27.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foobar@2016-02-27.yang similarity index 70% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foobar@2016-02-27.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foobar@2016-02-27.yang index 930c1162f4..8b8f48e1a7 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foobar@2016-02-27.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foobar@2016-02-27.yang @@ -3,12 +3,12 @@ module foobar { prefix foobar; yang-version 1; - import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.5.50"; } + import semantic-version { prefix sv; sv:semantic-version "2.5.50"; } revision "2016-02-27" { description "Not-imported version"; } - oc-ext:openconfig-version "7.13.0"; + sv:semantic-version "7.13.0"; container root { leaf included-not-correct-mark { diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foobar@2016-02-28.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foobar@2016-02-28.yang similarity index 70% rename from yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foobar@2016-02-28.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foobar@2016-02-28.yang index 676834c3dd..c45a020a52 100644 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foobar@2016-02-28.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foobar@2016-02-28.yang @@ -3,12 +3,12 @@ module foobar { prefix foobar; yang-version 1; - import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.5.50"; } + import semantic-version { prefix sv; sv:semantic-version "2.5.50"; } revision "2016-02-28" { description "Imported version"; } - oc-ext:openconfig-version "7.13.99"; + sv:semantic-version "7.13.99"; container root { leaf included-correct-mark { diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/semantic-version.yang new file mode 100644 index 0000000000..a7e5ba2a62 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "2.5.50"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-2/bar.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-invalid/bar.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-2/bar.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-invalid/bar.yang index 2e84793fd7..e7fe6096d5 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-2/bar.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-invalid/bar.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-01-31" { description "Initial version"; } - oc-ext:openconfig-version "1.1.2"; + sv:semantic-version "1.0.0"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-invalid/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-invalid/foo.yang similarity index 67% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-invalid/foo.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-invalid/foo.yang index 3db561357f..e81c79130b 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-invalid/foo.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-invalid/foo.yang @@ -3,7 +3,7 @@ module foo { prefix foo; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } import bar { prefix bar; revision-date 2016-01-31; } revision "2016-02-01" { diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-invalid/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-invalid/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-invalid/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-valid/bar.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-valid/bar.yang new file mode 100644 index 0000000000..678f4f60e9 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-valid/bar.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-31" { + description "Initial version"; + } + sv:semantic-version "0.99.99"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-valid/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-valid/foo.yang similarity index 67% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-valid/foo.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-valid/foo.yang index 3db561357f..e81c79130b 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-valid/foo.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-valid/foo.yang @@ -3,7 +3,7 @@ module foo { prefix foo; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } import bar { prefix bar; revision-date 2016-01-31; } revision "2016-02-01" { diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-valid/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-valid/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-valid/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/defaults/bar.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/defaults/bar.yang similarity index 100% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/defaults/bar.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/defaults/defaults/bar.yang diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/defaults/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/defaults/foo.yang similarity index 100% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/defaults/foo.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/defaults/defaults/foo.yang diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/bar@2016-01-01.yang new file mode 100644 index 0000000000..54da0db564 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + sv:semantic-version "0.1.2"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/bar@2016-01-31.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/bar@2016-01-31.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/bar@2016-01-31.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/bar@2016-01-31.yang index 2e84793fd7..e61a340d48 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/bar@2016-01-31.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/bar@2016-01-31.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-01-31" { description "Initial version"; } - oc-ext:openconfig-version "1.1.2"; + sv:semantic-version "1.1.2"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/foo.yang new file mode 100644 index 0000000000..dda1144dff --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import bar { prefix bar; revision-date 2016-01-31; sv:semantic-version "0.1.2";} + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/bar@2016-01-01.yang new file mode 100644 index 0000000000..54da0db564 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + sv:semantic-version "0.1.2"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/foo.yang new file mode 100644 index 0000000000..dda1144dff --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import bar { prefix bar; revision-date 2016-01-31; sv:semantic-version "0.1.2";} + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-2/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-1/foo.yang similarity index 60% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-2/foo.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-1/foo.yang index 6a217a9e22..a6c665bd3e 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-2/foo.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-1/foo.yang @@ -3,7 +3,7 @@ module foo { prefix foo; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.9.9"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "1.0.0"; } revision "2016-02-01" { description "Initial version"; diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-1/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-1/semantic-version.yang new file mode 100644 index 0000000000..ca9b177b6a --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-1/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "2.0.0"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-1/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-2/foo.yang similarity index 60% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-1/foo.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-2/foo.yang index 7d043d9f43..eacb99e2bf 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-1/foo.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-2/foo.yang @@ -3,7 +3,7 @@ module foo { prefix foo; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "1.0.0"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.9.9"; } revision "2016-02-01" { description "Initial version"; diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-2/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-2/semantic-version.yang new file mode 100644 index 0000000000..5b1f6163d5 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-2/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "1.0.0"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-2/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-1/foo.yang similarity index 60% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-2/foo.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-1/foo.yang index 987eea37ca..74446cc940 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-2/foo.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-1/foo.yang @@ -3,7 +3,7 @@ module foo { prefix foo; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "2.0.5"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "2.0.0"; } revision "2016-02-01" { description "Initial version"; diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-1/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-1/semantic-version.yang new file mode 100644 index 0000000000..5b1f6163d5 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-1/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "1.0.0"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-1/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-2/foo.yang similarity index 60% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-1/foo.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-2/foo.yang index 12837d617b..d069eef1cb 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-1/foo.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-2/foo.yang @@ -3,7 +3,7 @@ module foo { prefix foo; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "2.0.0"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "2.0.5"; } revision "2016-02-01" { description "Initial version"; diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-2/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-2/semantic-version.yang new file mode 100644 index 0000000000..ca9b177b6a --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-2/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "2.0.0"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-valid/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-valid/foo.yang new file mode 100644 index 0000000000..a6c665bd3e --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-valid/foo.yang @@ -0,0 +1,14 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "1.0.0"; } + + revision "2016-02-01" { + description "Initial version"; + } + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-valid/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-valid/semantic-version.yang new file mode 100644 index 0000000000..5b1f6163d5 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-valid/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "1.0.0"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-01.yang new file mode 100644 index 0000000000..fdab507214 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + sv:semantic-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-02.yang new file mode 100644 index 0000000000..388f7f15a3 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-02.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-02" { + description "Initial version"; + } + sv:semantic-version "0.1.2"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-03.yang new file mode 100644 index 0000000000..1b7d0e319f --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-03.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-03" { + description "Initial version"; + } + sv:semantic-version "0.1.3"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-04.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-04.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-04.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-04.yang index afa6b30163..adb243687a 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-04.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-04.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-01-04" { description "Initial version"; } - oc-ext:openconfig-version "0.10.4"; + sv:semantic-version "0.10.4"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-31.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-31.yang new file mode 100644 index 0000000000..e61a340d48 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-31.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-31" { + description "Initial version"; + } + sv:semantic-version "1.1.2"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-02-28.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-02-28.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-02-28.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-02-28.yang index c6968db878..b4a6511ef4 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-02-28.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-02-28.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-02-28" { description "Initial version"; } - oc-ext:openconfig-version "1.2.28"; + sv:semantic-version "1.2.28"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/foo.yang new file mode 100644 index 0000000000..220c9cc582 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import bar { prefix bar; sv:semantic-version "0.1.2";} + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-01-01.yang new file mode 100644 index 0000000000..6352253fb4 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + sv:semantic-version "2.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-01-02.yang new file mode 100644 index 0000000000..db806e8d6d --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-01-02.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-02" { + description "Initial version"; + } + sv:semantic-version "2.1.2"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-02-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-02-01.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-02-01.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-02-01.yang index 26049d4e98..69e3d6cca8 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-02-01.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-02-01.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-02-01" { description "Initial version"; } - oc-ext:openconfig-version "5.5.5"; + sv:semantic-version "4.1.1"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-02-02.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-02-02.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-02-02.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-02-02.yang index 0bf5091c20..13c579cceb 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-02-02.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-02-02.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-02-02" { description "Initial version"; } - oc-ext:openconfig-version "5.5.6"; + sv:semantic-version "5.0.0"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/foo.yang new file mode 100644 index 0000000000..3a2ab942c2 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import bar { prefix bar; revision-date 2016-01-31; sv:semantic-version "1.0.0"; } + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-01-01.yang new file mode 100644 index 0000000000..4422f6d2d9 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + sv:semantic-version "2.0.0"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-01-02.yang new file mode 100644 index 0000000000..9d916f6b27 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-01-02.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-02" { + description "Initial version"; + } + sv:semantic-version "2.1.0"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-02-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-02-01.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-02-01.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-02-01.yang index 2371e1a22a..30367614c7 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-02-01.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-02-01.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-02-01" { description "Initial version"; } - oc-ext:openconfig-version "4.1.1"; + sv:semantic-version "2.5.0"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-02-02.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-02-02.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-02-02.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-02-02.yang index 03cdd7eb3f..f27a9efd35 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-02-02.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-02-02.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-02-02" { description "Initial version"; } - oc-ext:openconfig-version "5.0.0"; + sv:semantic-version "2.5.4"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/foo.yang new file mode 100644 index 0000000000..ec773ae546 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import bar { prefix bar; sv:semantic-version "2.5.5"; } + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-01-01.yang new file mode 100644 index 0000000000..5c6572cd05 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + sv:semantic-version "0.0.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-01-02.yang new file mode 100644 index 0000000000..b819db324a --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-01-02.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-02" { + description "Initial version"; + } + sv:semantic-version "0.1.0"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-02-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-02-01.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-02-01.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-02-01.yang index 5f124dbf0d..4405fa975b 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-02-01.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-02-01.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-02-01" { description "Initial version"; } - oc-ext:openconfig-version "2.5.0"; + sv:semantic-version "0.9.5"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-02-02.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-02-02.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-02-02.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-02-02.yang index 7fd4d004f0..54506080ba 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-02-02.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-02-02.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-02-02" { description "Initial version"; } - oc-ext:openconfig-version "2.5.4"; + sv:semantic-version "1.0.0"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/foo.yang similarity index 57% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/foo.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/foo.yang index 25ec2fb4c9..3da8de0a25 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/foo.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/foo.yang @@ -3,13 +3,13 @@ module foo { prefix foo; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } import bar { prefix bar; } revision "2016-02-01" { description "Initial version"; } - oc-ext:openconfig-version "0.1.1"; + sv:semantic-version "0.1.1"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-01-01.yang new file mode 100644 index 0000000000..732609a657 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + sv:semantic-version "4.4.0"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-01-02.yang new file mode 100644 index 0000000000..82dd7efcba --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-01-02.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-02" { + description "Initial version"; + } + sv:semantic-version "5.5.0"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-02-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-02-01.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-02-01.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-02-01.yang index 6a2560ad18..32edae48fb 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-02-01.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-02-01.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-02-01" { description "Initial version"; } - oc-ext:openconfig-version "0.9.5"; + sv:semantic-version "5.5.5"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-02-02.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-02-02.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-02-02.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-02-02.yang index d343e2a047..a4d94b5af8 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-02-02.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-02-02.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-02-02" { description "Initial version"; } - oc-ext:openconfig-version "1.0.0"; + sv:semantic-version "5.5.6"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/foo.yang new file mode 100644 index 0000000000..c89c60d0df --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import bar { prefix bar; sv:semantic-version "5.5.5"; } + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20160404.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20160404.yang similarity index 57% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20160404.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20160404.yang index 5e70700d79..69270ae685 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20160404.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20160404.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision 2016-04-04 { description "test"; } - oc-ext:openconfig-version "2016.4.4"; + sv:semantic-version "2016.4.4"; grouping grp { container con20160404 { diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20160405.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20160405.yang similarity index 62% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20160405.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20160405.yang index 97faa03d8c..f2bc4bee73 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20160405.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20160405.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision 2016-04-05 { description "test"; } - oc-ext:openconfig-version "2016.4.5"; + sv:semantic-version "2016.4.5"; grouping grp { container con20160404 { diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20160406.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20160406.yang similarity index 65% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20160406.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20160406.yang index d2bd0f3711..46d63f0751 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20160406.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20160406.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision 2016-04-06 { description "test"; } - oc-ext:openconfig-version "2016.4.6"; + sv:semantic-version "2016.4.6"; grouping grp { container con20160404 { diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20170406.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20170406.yang similarity index 68% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20170406.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20170406.yang index bff38fc2cf..21066d44e6 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20170406.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20170406.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision 2017-04-06 { description "test"; } - oc-ext:openconfig-version "2017.4.6"; + sv:semantic-version "2017.4.6"; grouping grp { container con20160404 { diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/foo.yang new file mode 100644 index 0000000000..b4af34672c --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/foo.yang @@ -0,0 +1,18 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import bar { prefix bar; revision-date 2017-04-06; sv:semantic-version "2016.4.5"; } + + revision 2016-01-01 { + description "test"; + } + + sv:semantic-version "2016.1.1"; + + container foo-root { + uses bar:grp; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-head/bar.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-head/bar.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-head/bar.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/position/position-head/bar.yang index 9e6429c7b2..868ce014a0 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-head/bar.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-head/bar.yang @@ -1,11 +1,11 @@ module bar { - oc-ext:openconfig-version "0.1.2"; + sv:semantic-version "0.1.2"; namespace "bar"; prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-01-31" { description "Initial version"; diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-head/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-head/foo.yang new file mode 100644 index 0000000000..4aee60f5bb --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-head/foo.yang @@ -0,0 +1,17 @@ +module foo { + sv:semantic-version "0.1.1"; + import bar { prefix bar; revision-date 2016-01-31; sv:semantic-version "0.1.2";} + + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-02-01" { + description "Initial version"; + } + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-head/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-head/semantic-version.yang similarity index 51% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-head/openconfig-extensions.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/position/position-head/semantic-version.yang index 43c5f3a2bf..3879c0670b 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-head/openconfig-extensions.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-head/semantic-version.yang @@ -1,39 +1,16 @@ -module openconfig-extensions { - oc-ext:openconfig-version "0.0.1"; - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; +module semantic-version { + sv:semantic-version "0.0.1"; - organization "OpenConfig working group"; + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; + revision 2016-02-02 { + description "Initial verison"; } - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - extension openconfig-version { - argument "semver" { + extension semantic-version { + argument "semantic-version" { yin-element false; } description @@ -68,16 +45,4 @@ module openconfig-extensions { The version number is stored in the module meta-data."; } - - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/bar.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/bar.yang new file mode 100644 index 0000000000..2adc1363ba --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/bar.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-31" { + description "Initial version"; + } + sv:semantic-version "0.1.2"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/foo.yang new file mode 100644 index 0000000000..dda1144dff --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import bar { prefix bar; revision-date 2016-01-31; sv:semantic-version "0.1.2";} + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-tail/bar.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-tail/bar.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-tail/bar.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/position/position-tail/bar.yang index 65b82d4a65..8ce6838c35 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-tail/bar.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-tail/bar.yang @@ -3,7 +3,7 @@ module bar { prefix bar; yang-version 1; - import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } revision "2016-01-31" { description "Initial version"; @@ -12,5 +12,5 @@ module bar { container root { } - oc-ext:openconfig-version "0.1.2"; + sv:semantic-version "0.1.2"; } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-tail/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-tail/foo.yang new file mode 100644 index 0000000000..67e9025fc4 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-tail/foo.yang @@ -0,0 +1,17 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-02-01" { + description "Initial version"; + } + + container root { + } + + sv:semantic-version "0.1.1"; + import bar { prefix bar; revision-date 2016-01-31; sv:semantic-version "0.1.2";} +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-3/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-tail/semantic-version.yang similarity index 51% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/basic-3/openconfig-extensions.yang rename to yang/yang-parser-impl/src/test/resources/semantic-version/position/position-tail/semantic-version.yang index 23e90e3f34..ca84e112e2 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-3/openconfig-extensions.yang +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-tail/semantic-version.yang @@ -1,40 +1,14 @@ -module openconfig-extensions { - yang-version "1"; - namespace "http://openconfig.net/yang/openconfig-ext"; - prefix "oc-ext"; +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; - organization "OpenConfig working group"; - - contact - "OpenConfig working group - www.openconfig.net"; - - description - "This module provides extensions to the YANG language to allow - OpenConfig specific functionality and meta-data to be defined."; - - revision "2017-01-29" { - description - "Added extension for annotating encrypted values."; - reference "TBD"; - } - - revision "2015-10-09" { - description - "Initial OpenConfig public release"; - reference "TBD"; + revision 2016-02-02 { + description "Initial verison"; } - revision "2015-10-05" { - description - "Initial revision"; - reference "TBD"; - } - - oc-ext:openconfig-version "0.0.1"; - - extension openconfig-version { - argument "semver" { + extension semantic-version { + argument "semantic-version" { yin-element false; } description @@ -70,15 +44,5 @@ module openconfig-extensions { The version number is stored in the module meta-data."; } - extension openconfig-encrypted-value { - description - "This extension provides an annotation on schema nodes to - indicate that the corresponding value should be stored and - reported in encrypted form. - Clients reading the configuration or applied configuration - for the node should expect to receive only the encrypted value. - This annotation may be used on nodes such as secure passwords - in which the device never reports a cleartext value, even - if the input is provided as cleartext."; - } -} \ No newline at end of file + sv:semantic-version "0.0.1"; +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/bar@2016-01-01.yang new file mode 100644 index 0000000000..54da0db564 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + sv:semantic-version "0.1.2"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/foo.yang new file mode 100644 index 0000000000..dda1144dff --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import bar { prefix bar; revision-date 2016-01-31; sv:semantic-version "0.1.2";} + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/bar@2016-01-01.yang new file mode 100644 index 0000000000..54da0db564 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + sv:semantic-version "0.1.2"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/foo.yang new file mode 100644 index 0000000000..fd7d13f655 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import bar { prefix bar; revision-date 2016-01-01; sv:semantic-version "0.1.2";} + + revision "2016-02-01" { + description "Initial version"; + } + sv:semantic-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/semantic-version.yang new file mode 100644 index 0000000000..dd92de6883 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/semantic-version.yang @@ -0,0 +1,47 @@ +module semantic-version { + namespace "urn:opendaylight:yang:extension:semantic-version"; + prefix sv; + yang-version 1; + + revision 2016-02-02 { + description "Initial verison"; + } + sv:semantic-version "0.0.1"; + + extension semantic-version { + argument "semantic-version" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/bar@2016-01-01.yin b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/bar@2016-01-01.yin similarity index 65% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/bar@2016-01-01.yin rename to yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/bar@2016-01-01.yin index 60c968dfea..6b4cfb5247 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/bar@2016-01-01.yin +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/bar@2016-01-01.yin @@ -1,13 +1,13 @@ + xmlns:sv="urn:opendaylight:yang:extension:semantic-version" name="bar"> - - + + - + @@ -16,7 +16,7 @@ - + diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/bar@2016-01-31.yin b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/bar@2016-01-31.yin similarity index 65% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/bar@2016-01-31.yin rename to yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/bar@2016-01-31.yin index 31f989b3bd..97d3dea508 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/bar@2016-01-31.yin +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/bar@2016-01-31.yin @@ -1,13 +1,13 @@ + xmlns:sv="urn:opendaylight:yang:extension:semantic-version" name="bar"> - - + + - + @@ -16,7 +16,7 @@ - + diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/foo@2016-02-01.yin b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/foo@2016-02-01.yin similarity index 65% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/foo@2016-02-01.yin rename to yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/foo@2016-02-01.yin index 3183859ffa..19c5ea64d9 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/foo@2016-02-01.yin +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/foo@2016-02-01.yin @@ -1,18 +1,18 @@ + xmlns:sv="urn:opendaylight:yang:extension:semantic-version" name="foo"> - + - - + + - + @@ -21,7 +21,7 @@ - + diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/semantic-version@2016-02-02.yin b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/semantic-version@2016-02-02.yin new file mode 100644 index 0000000000..fe7aeb9346 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/semantic-version@2016-02-02.yin @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data. + + + + \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/bar@2016-01-01.yin b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/bar@2016-01-01.yin similarity index 65% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/bar@2016-01-01.yin rename to yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/bar@2016-01-01.yin index a3e08f19b4..ab75b3a61e 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/bar@2016-01-01.yin +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/bar@2016-01-01.yin @@ -1,13 +1,13 @@ + xmlns:sv="urn:opendaylight:yang:extension:semantic-version" name="bar"> - - + + - + @@ -16,7 +16,7 @@ - + diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/bar@2016-01-31.yin b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/bar@2016-01-31.yin similarity index 65% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/bar@2016-01-31.yin rename to yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/bar@2016-01-31.yin index 959624bed2..224c76744d 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/bar@2016-01-31.yin +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/bar@2016-01-31.yin @@ -1,13 +1,13 @@ + xmlns:sv="urn:opendaylight:yang:extension:semantic-version" name="bar"> - - + + - + @@ -16,7 +16,7 @@ - + diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/foo@2016-02-01.yin b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/foo@2016-02-01.yin similarity index 65% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/foo@2016-02-01.yin rename to yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/foo@2016-02-01.yin index 3183859ffa..19c5ea64d9 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/foo@2016-02-01.yin +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/foo@2016-02-01.yin @@ -1,18 +1,18 @@ + xmlns:sv="urn:opendaylight:yang:extension:semantic-version" name="foo"> - + - - + + - + @@ -21,7 +21,7 @@ - + diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/semantic-version@2016-02-02.yin b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/semantic-version@2016-02-02.yin new file mode 100644 index 0000000000..fe7aeb9346 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/semantic-version@2016-02-02.yin @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data. + + + + \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic/bar@2016-01-31.yin b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic/bar@2016-01-31.yin new file mode 100644 index 0000000000..b3fe6a230a --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic/bar@2016-01-31.yin @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic/foo@2016-02-01.yin b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic/foo@2016-02-01.yin similarity index 60% rename from yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic/foo@2016-02-01.yin rename to yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic/foo@2016-02-01.yin index 663286d2bf..19c5ea64d9 100644 --- a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic/foo@2016-02-01.yin +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic/foo@2016-02-01.yin @@ -1,18 +1,18 @@ + xmlns:sv="urn:opendaylight:yang:extension:semantic-version" name="foo"> - + - - - - + + + + @@ -21,7 +21,7 @@ - + diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic/semantic-version@2016-02-02.yin b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic/semantic-version@2016-02-02.yin new file mode 100644 index 0000000000..fe7aeb9346 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic/semantic-version@2016-02-02.yin @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data. + + + + \ No newline at end of file -- 2.36.6